From 33b96e7357f506df0bc84b8612d540ac210cb69e Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Fri, 16 Sep 2016 16:13:17 +0200 Subject: [PATCH] B #4781: ceph delete image if it fails being created --- src/tm_mad/ceph/mkimage | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/tm_mad/ceph/mkimage b/src/tm_mad/ceph/mkimage index eb5b70a006..2e5dc3f4d0 100755 --- a/src/tm_mad/ceph/mkimage +++ b/src/tm_mad/ceph/mkimage @@ -24,6 +24,28 @@ # - vmid is the id of the VM # - dsid is the target datastore (0 is the system datastore) +function ssh_exec_and_log_no_exit +{ + SSH_EXEC_ERR=`$SSH $1 bash -s 2>&1 1>/dev/null <