]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: fix report of non-active commit completion
authorEric Blake <eblake@redhat.com>
Fri, 13 Mar 2015 15:56:48 +0000 (09:56 -0600)
committerCole Robinson <crobinso@redhat.com>
Tue, 28 Apr 2015 15:06:41 +0000 (11:06 -0400)
Commit f182da20 (v1.2.6) caused a slight regression in virsh
reporting of a non-active block job; where it used to state
"Commit complete", it now states "Now in synchronized phase".
But the synchronized phase is only possible for an active commit.

For a reproducer, I created a chain 'a <- b <- c <- d <- e' and
ran virsh blockcommit $dom vda --top c --base a --verbose --wait

* tools/virsh-domain.c (cmdBlockCommit): Synchronized phase is
only possible on active commits.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit ceec58ac9eaf14e2769f0a4c7ef66994e7c3b5f9)

tools/virsh-domain.c

index 4bc70ffa4183528939985e981f5c98c84727d375..0abd1b561b0b9d1c3944ad4c05f61f0c065f7677 100644 (file)
@@ -2015,7 +2015,7 @@ cmdBlockCommit(vshControl *ctl, const vshCmd *cmd)
         vshPrint(ctl, "\n%s", _("Commit aborted"));
     else if (pivot)
         vshPrint(ctl, "\n%s", _("Successfully pivoted"));
-    else if (!finish)
+    else if (!finish && active)
         vshPrint(ctl, "\n%s", _("Now in synchronized phase"));
     else
         vshPrint(ctl, "\n%s", _("Commit complete"));