1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #5385: properly manage undeployed states (ceph) (#1255)

This commit is contained in:
Jan Orel 2021-05-27 16:37:19 +02:00 committed by GitHub
parent 54169999e1
commit 22d2adadc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,6 +134,17 @@ CEPH_CONF="${XPATH_ELEMENTS[j++]}"
CEPH_MOVE_TO_TRASH="${XPATH_ELEMENTS[j++]:-$CEPH_TRASH}"
POOL_NAME="${XPATH_ELEMENTS[j++]:-$POOL_NAME}"
if is_undeployed "$VM_ID" "$DST_HOST"; then
# get BRIDGE_LIST from datastore
XPATH="${DRIVER_PATH}/../../datastore/xpath.rb --stdin"
IFS= read -r -d '' BRIDGE_LIST < <(onedatastore show -x "$DS_ID" \
| $XPATH /DATASTORE/TEMPLATE/BRIDGE_LIST )
if [ -n "$BRIDGE_LIST" ]; then # If BRIDGE_LIST is not defined FE must have access to CEPH cluster
DST_HOST=$(get_destination_host)
fi
fi
# No need to delete no cloned images
if [ "$CLONE" = "NO" ]; then
exit 0