cozystack/packages/system/linstor/hack/plunger/plunger-controller.sh
xy2 a7425b0caf
Add linstor plunger scripts as sidecars (#672)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced new management scripts for automating controller
maintenance tasks and satellite operations, including automatic cleanup
and reconnection of resources.
- Added dynamic configuration templates to streamline container image
management and refine deployment settings for enhanced security and
monitoring.
- Rolled out updated configurations for satellite deployments, improving
network performance and resource handling.
- New YAML configurations for Linstor satellites have been added,
enhancing TLS management and pod specifications.

- **Revert**
- Removed legacy configuration resources to consolidate and simplify
system management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-03-05 18:49:05 +01:00

25 lines
600 B
Bash
Executable file

#!/bin/bash
set -e
terminate() {
echo "Caught signal, terminating"
exit 0
}
trap terminate SIGINT SIGQUIT SIGTERM
echo "Running Linstor controller plunger:"
cat "${0}"
while true; do
# timeout at the start of the loop to give some time for the linstor-controller to start
sleep 30 &
pid=$!
wait $pid
# workaround for https://github.com/LINBIT/linstor-server/issues/437
# try to delete snapshots that are stuck in the DELETE state
linstor -m s l \
| jq -r '.[][] | select(.flags | contains(["DELETE"])) | "linstor snapshot delete \(.resource_name) \(.name)"' \
| sh -x
done