File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,16 +21,16 @@ while true; do
2121 # Detect orphaned loop devices and detach them
2222 # the `/` path could not be a backing file for a loop device, so it's a good indicator of a stuck loop device
2323 # TODO describe the issue in more detail
24- losetup --json \
25- | jq -r ' .[][]
26- | select(."back-file" == "/ (deleted)")
27- | " echo Detaching stuck loop device \(.name);
28- set -x;
29- losetup --detach \(.name)" ' \
30- | sh
24+ # Using the direct /usr/sbin/ losetup as the linstor-satellite image has own wrapper in /usr/local
25+ stale_loopbacks= $( /usr/sbin/losetup --json | jq -r ' .[][] | select(."back-file" == "/ (deleted)").name ' )
26+ for stale_device in $stale_loopbacks ; do (
27+ echo " Detaching stuck loop device ${stale_device} "
28+ set -x
29+ /usr/sbin/ losetup --detach " ${stale_device} "
30+ ) ; done
3131
3232 # Detect secondary volumes that lost connection and can be simply reconnected
33- disconnected_secondaries=$( drbdadm status | awk ' /pvc-.*role:Secondary.*force-io-failures:yes/ {print $1}' )
33+ disconnected_secondaries=$( drbdadm status 2> /dev/null | awk ' /pvc-.*role:Secondary.*force-io-failures:yes/ {print $1}' )
3434 for secondary in $disconnected_secondaries ; do (
3535 echo " Trying to reconnect secondary volume ${secondary} "
3636 set -x
Original file line number Diff line number Diff line change 1616 - " /scripts/plunger-satellite.sh"
1717 securityContext :
1818 capabilities :
19+ add :
20+ - NET_ADMIN
21+ - SYS_ADMIN
1922 drop :
2023 - ALL
24+ privileged : true
2125 # make some room for live debugging
2226 readOnlyRootFilesystem : false
2327 volumeMounts :
You can’t perform that action at this time.
0 commit comments