Use consistent naming of components
Rename "pvcd" to "pvcnoded", and "pvc-api" to "pvcapid" so names for the daemons are fully consistent. Update the names of the configuration files as well to match this new formatting. References #79
This commit is contained in:
13
node-daemon/pvcnoded/fixrbdlocks
Executable file
13
node-daemon/pvcnoded/fixrbdlocks
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
for disk in $( sudo rbd list ${BLSE_STORAGE_POOL_VM} | grep "^${vm}" ); do
|
||||
echo -e " Disk: $disk"
|
||||
locks="$( sudo rbd lock list ${BLSE_STORAGE_POOL_VM}/${disk} | grep '^client' )"
|
||||
echo "${locks}"
|
||||
if [[ -n "${locks}" ]]; then
|
||||
echo -e " LOCK FOUND! Clearing."
|
||||
locker="$( awk '{ print $1 }' <<<"${locks}" )"
|
||||
id="$( awk '{ print $2" "$3 }' <<<"${locks}" )"
|
||||
sudo rbd lock remove ${BLSE_STORAGE_POOL_VM}/${disk} "${id}" "${locker}"
|
||||
fi
|
||||
done
|
Reference in New Issue
Block a user