Bug 807545 - the programming continue to run when executing virsh snapshot-list with --roots and --from mutually exclusive options
the programming continue to run when executing virsh snapshot-list with --roo...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
x86_64 Linux
high Severity medium
: rc
: ---
Assigned To: Alex Jia
Virtualization Bugs
:
Depends On: 837544
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-28 02:18 EDT by Alex Jia
Modified: 2013-02-21 02:09 EST (History)
8 users (show)

See Also:
Fixed In Version: libvirt-0.9.13-3.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:09:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alex Jia 2012-03-28 02:18:42 EDT
Description of problem:
--roots and --from are mutually exclusive options for virsh snapshot-list command, however, the programming just raises a error without exiting.

Version-Release number of selected component (if applicable):
# rpm -q libvirt-client
libvirt-client-0.9.10-8.el6.x86_64

How reproducible:
always

Steps to Reproduce:
# virsh list
 Id    Name                           State
----------------------------------------------------
 14    foo                            running

1. # virsh snapshot-create-as foo --name "hello"
Domain snapshot hello created

# virsh snapshot-create-as foo --name "libvirt"
Domain snapshot libvirt created

Notes, in order to show some details, I created a 'libvirt' child snapshot based on 'hello' snapsthot, in fact, it's not necessary.

2. # virsh snapshot-list foo --roots --from "hello"
error: --roots and --from are mutually exclusive
 Name                 Creation Time             State
------------------------------------------------------------
 libvirt              2012-03-28 13:46:51 +0800 running

  
Actual results:
error: --roots and --from are mutually exclusive
 Name                 Creation Time             State
------------------------------------------------------------
 libvirt              2012-03-28 13:46:51 +0800 running

Expected results:
The programming should be terminated when meeting a error.

Additional info:
Comment 1 Alex Jia 2012-03-28 02:23:10 EDT
Patch for upstream:
https://www.redhat.com/archives/libvir-list/2012-March/msg01235.html
Comment 2 Dave Allan 2012-03-28 11:03:38 EDT
Alex, is this virsh only or does it affect any user of the api?
Comment 3 Alex Jia 2012-03-28 11:11:19 EDT
(In reply to comment #2)
> Alex, is this virsh only or does it affect any user of the api?

Hello Dave,
It's a virsh layer bug and hasn't effect on a API, so don't worry about it.

Alex
Comment 7 Daniel Veillard 2012-07-17 10:45:41 EDT
Commit 03ca3317a66b7ae5a1a6323487cad99b506cb714 upstream,

Daniel
Comment 9 Huang Wenlong 2012-08-13 06:01:35 EDT
Verify this bug with :

libvirt-0.10.0-0rc0.el6.x86_64


1) perpare  a domain  with snapshot 


2) run --roots --from snapshot-list
#  virsh snapshot-list ga --roots --from "hello"
error: --roots and --from are mutually exclusive
Comment 10 errata-xmlrpc 2013-02-21 02:09:18 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0276.html

Note You need to log in before you can comment on or make changes to this bug.