[libvirt] [PATCH] virsh: fix report of non-active commit completion

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> --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 1a364bb..b4e9cb0 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -2018,7 +2018,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")); -- 2.1.0

On 03/13/2015 12:04 PM, Eric Blake wrote:
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> --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ACK John

On 03/13/2015 07:47 PM, John Ferlan wrote:
On 03/13/2015 12:04 PM, Eric Blake wrote:
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> --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ACK
I've pushed this and the other two you reviewed today. Thanks for the review. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
John Ferlan