Bug 807545

Summary: the programming continue to run when executing virsh snapshot-list with --roots and --from mutually exclusive options
Product: Red Hat Enterprise Linux 6 Reporter: Alex Jia <ajia>
Component: libvirtAssignee: Alex Jia <ajia>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 6.3CC: acathrow, dallan, dyasny, dyuan, mzhan, rwu, veillard, whuang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
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 07:09:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 837544    
Bug Blocks:    

Description Alex Jia 2012-03-28 06:18:42 UTC
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 06:23:10 UTC
Patch for upstream:
https://www.redhat.com/archives/libvir-list/2012-March/msg01235.html

Comment 2 Dave Allan 2012-03-28 15:03:38 UTC
Alex, is this virsh only or does it affect any user of the api?

Comment 3 Alex Jia 2012-03-28 15:11:19 UTC
(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 14:45:41 UTC
Commit 03ca3317a66b7ae5a1a6323487cad99b506cb714 upstream,

Daniel

Comment 9 Huang Wenlong 2012-08-13 10:01:35 UTC
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 07:09:18 UTC
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