0001-suggestion-for-bug-4299.patch

Anton Todorov, 03/20/2016 09:11 PM

Download (2.03 KB)

View differences:

src/tm_mad/ceph/snap_create_live
91 91
SNAP_CREATE_CMD=$(cat <<EOF
92 92
    set -e
93 93

  
94
    if virsh -c $LIBVIRT_URI domfsfreeze $DEPLOY_ID ; then
95
        trap "virsh -c $LIBVIRT_URI domfsthaw $DEPLOY_ID" EXIT TERM INT HUP
94
    if virsh -c \$LIBVIRT_URI domfsfreeze $DEPLOY_ID ; then
95
        trap "virsh -c \$LIBVIRT_URI domfsthaw $DEPLOY_ID" EXIT TERM INT HUP
96 96
    fi
97 97

  
98 98
    RBD="${RBD}"
src/tm_mad/qcow2/snap_create_live
132 132
FILENAME="/tmp/snapshot-$VMID-$DISK_ID-$SNAP_ID"
133 133
echo "$DOC" > \$FILENAME
134 134

  
135
if virsh -c $LIBVIRT_URI domfsfreeze $DEPLOY_ID ; then
136
    trap "virsh -c $LIBVIRT_URI domfsthaw $DEPLOY_ID" EXIT TERM INT HUP
135
if virsh -c \$LIBVIRT_URI domfsfreeze $DEPLOY_ID ; then
136
    trap "virsh -c \$LIBVIRT_URI domfsthaw $DEPLOY_ID" EXIT TERM INT HUP
137 137
fi
138 138

  
139
virsh -c qemu:///system snapshot-create $DEPLOY_ID --disk-only --atomic \
139
virsh -c \$LIBVIRT_URI snapshot-create $DEPLOY_ID --disk-only --atomic \
140 140
    --xmlfile \$FILENAME
141 141

  
142 142
rm \${FILENAME}
143
-