Merge "Don't clobber all iSCSI connections during nova cleanup"
This commit is contained in:
commit
9cb8e57482
7
lib/nova
7
lib/nova
@ -156,8 +156,11 @@ function cleanup_nova() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Logout and delete iscsi sessions
|
# Logout and delete iscsi sessions
|
||||||
sudo iscsiadm --mode node | grep $VOLUME_NAME_PREFIX | cut -d " " -f2 | xargs sudo iscsiadm --mode node --logout || true
|
tgts=$(sudo iscsiadm --mode node | grep $VOLUME_NAME_PREFIX | cut -d ' ' -f2)
|
||||||
sudo iscsiadm --mode node | grep $VOLUME_NAME_PREFIX | cut -d " " -f2 | sudo iscsiadm --mode node --op delete || true
|
for target in $tgts; do
|
||||||
|
sudo iscsiadm --mode node -T $target --logout || true
|
||||||
|
done
|
||||||
|
sudo iscsiadm --mode node --op delete || true
|
||||||
|
|
||||||
# Clean out the instances directory.
|
# Clean out the instances directory.
|
||||||
sudo rm -rf $NOVA_INSTANCES_PATH/*
|
sudo rm -rf $NOVA_INSTANCES_PATH/*
|
||||||
|
Loading…
Reference in New Issue
Block a user