Merge "Don't clobber all iSCSI connections during nova cleanup"

This commit is contained in:
Jenkins 2013-03-28 23:25:54 +00:00 committed by Gerrit Code Review
commit 9cb8e57482

View File

@ -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/*