Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

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