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

b #5699: Skip deactivation on FT states fs_lvm_ssh

This commit is contained in:
Ruben S. Montero 2022-01-18 11:09:10 +01:00
parent 0b9fafe80a
commit 7fdb46a650
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87
2 changed files with 11 additions and 3 deletions

View File

@ -79,9 +79,10 @@ if [ "$(is_disk "$SRC_PATH")" -eq 1 ]; then
DST_DEV="/dev/${DST_VG_NAME}/${LV_NAME}"
# skip deactivate for `onevm resume` (after stop or undeploy)
# 9(49) = PROLOG_RESUME(+FAILURE)
# 9(49) = PROLOG_RESUME(+FAILURE)
# 31(50) = PROLOG_UNDEPLOY(+FAILURE)
if ! [[ "$LCM_STATE" =~ ^(9|31|49|50)$ ]]; then
# 60(61) = PROLOG_MIGRATE_UNKNOWN(+FAILURE)
if ! [[ "$LCM_STATE" =~ ^(9|31|49|50|60|61)$ ]]; then
# deactivate
CMD=$(cat <<EOF
set -ex -o pipefail

View File

@ -26,6 +26,9 @@
SRC=$1
DST=$2
VMID=$3
DSID=$4
if [ -z "${ONE_LOCATION}" ]; then
TMCOMMON=/var/lib/one/remotes/tm/tm_common.sh
else
@ -57,7 +60,11 @@ if [ "$(is_disk $DST_PATH)" -eq 1 ]; then
exit 0
fi
if [ "$(lcm_state)" -eq 60 ]; then
#Do not try to move any files in PROLOG_MIGRATE_UNKNOWN (60) or
#PROLOG_MIGRATE_UNKNOWN_FAILURE (61)
LCM_STATE=$(lcm_state "$VMID")
if ! [[ "$LCM_STATE" =~ ^(60|61)$ ]]; then
log "Not moving files from $SRC_HOST in FT mode"
exit 0
fi