From 019683206560ab0eae06f93c343269580f5779b8 Mon Sep 17 00:00:00 2001 From: Anton Todorov Date: Mon, 21 Nov 2016 17:50:46 +0200 Subject: [PATCH] tm/ceph {pre,post}migrate do nothing if not SYSTEM DS The proposed solution partially addresses bug #4924 IMO in case of SYSTEM DS on shared filesystem the TM_MAD must be 'shared'. In this case the tm/ceph/mv will not be called but then {pre,post}migrate is called by migrate-other. In that case there is no work for Ceph. --- src/tm_mad/ceph/postmigrate | 7 +++++++ src/tm_mad/ceph/premigrate | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/tm_mad/ceph/postmigrate b/src/tm_mad/ceph/postmigrate index f56874e4fe..37bf1bb7ae 100755 --- a/src/tm_mad/ceph/postmigrate +++ b/src/tm_mad/ceph/postmigrate @@ -53,6 +53,13 @@ fi #-------------------------------------------------------------------------------- +if [ -n "$7" ]; then + log "Called from tm/$7 but I've nothing to do" + exit 0 +fi + +#-------------------------------------------------------------------------------- + migrate_other "$@" exec_and_log "$SSH $SRC_HOST rm -rf $DST_PATH" diff --git a/src/tm_mad/ceph/premigrate b/src/tm_mad/ceph/premigrate index c4845d40c5..892eb0ef01 100755 --- a/src/tm_mad/ceph/premigrate +++ b/src/tm_mad/ceph/premigrate @@ -53,6 +53,13 @@ fi #-------------------------------------------------------------------------------- +if [ -n "$7" ]; then + log "Called from tm/$7 but I've nothing to do" + exit 0 +fi + +#-------------------------------------------------------------------------------- + DST_PATH_DIRNAME=`dirname $DST_PATH` DST_PATH_BASENAME=`basename $DST_PATH`