From d62585174ea8b68faad59a128819776f93a1e87e Mon Sep 17 00:00:00 2001 From: Jan Orel Date: Tue, 12 Nov 2019 15:00:39 +0100 Subject: [PATCH] B #3244: Prevent race condition in ln.ssh (#3935) Don't evaluate presence of the SRC_SNAP_DIR on hypervisor, but rather on the frontend to prevent race condition. --- src/tm_mad/qcow2/ln.ssh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/tm_mad/qcow2/ln.ssh b/src/tm_mad/qcow2/ln.ssh index 745e500ea8b..b63038e2c61 100755 --- a/src/tm_mad/qcow2/ln.ssh +++ b/src/tm_mad/qcow2/ln.ssh @@ -49,7 +49,6 @@ DST_SNAP_DIR=${DST_PATH}.snap DST_FILE=`basename $DST_PATH` DST_DIR=`dirname $DST_PATH` -SRC_HOST=`arg_host $SRC` SRC_PATH=`arg_path $SRC` SRC_SNAP_DIR=${SRC_PATH}.snap @@ -64,21 +63,26 @@ ssh_make_path $DST_HOST $DST_DIR 'ssh' #------------------------------------------------------------------------------- log "Copying $SRC_PATH in $DST" -CMD=$(cat <