Bug 673499
Summary: | Some virsh vol-* commands require the pool option, but don't indicate this when they fail | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Justin Clift <jclift> |
Component: | libvirt | Assignee: | Osier Yang <jyang> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 6.0 | CC: | dallan, dyuan, eblake, jyang, kwade, mzhan, rwu, syeghiay, whuang, xen-maint, yupzhang, zpeng |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
No documentation needed.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2012-06-20 06:25:57 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: |
Description
Justin Clift
2011-01-28 13:37:17 UTC
Ugh. Typo in the "Description of problem". Where is says "If the vol-path IS given... " it should be "ISN'T given". :( This is NOTABUG, as there are multiple ways to lookup a volume, 1) virStorageVolLookupByName, 2) virStorageVolLookupByPath, 3) virStorageVolLookupByKey, only 1) needs a pool as argument, the other 2 only just need a connection to hypervisor, as another argument of them is global uniq (key/path). So if no "--pool" is specified, "vol-path" and "vol-dumpxml" will try to get the volume with methods 2) or 3). Means "--pool" is not necessary. Hey Osier, When did it start checking for a volume in the available pools, before returning an error? For example, with the version I'd filed the bug against, doing "vol-path myrh6" would give an error, as there wasn't enough info available for it to figure out where to check. I guess by "So if no "--pool" is specified, "vol-path" and "vol-dumpxml" will try to get the volume with methods 2) or 3)." you're meaning it will now check for "myrh6" in all of the available pools, then provide info for first match or something. Is that correct? (In reply to comment #8) > Hey Osier, > > When did it start checking for a volume in the available pools, before > returning an error? > > For example, with the version I'd filed the bug against, doing "vol-path myrh6" > would give an error, as there wasn't enough info available for it to figure out > where to check. That's because 'myrh6' is neither a path nor a key, but a name relative to a pool. > > I guess by "So if no "--pool" is specified, "vol-path" and "vol-dumpxml" will > try to get the volume with methods 2) or 3)." you're meaning it will now check > for "myrh6" in all of the available pools, then provide info for first match or > something. No, to date, we've never had virsh look for myrh6 in all the available pools (although that might be a nice feature enhancement, if we can find a single volume named myrh6 among all the pools; while still failing if myrh6 is ambiguous between multiple pools). IMO we should just add a suggestion to the failure message as we do for some others: "perhaps you need to specify --pool?" Yeah, adjusting the failure message seems like the simplest option. Eric's sounds more user friendly though, as it lets people "type less" and still get the result they want (when it's deterministic). ;) <snip> No, to date, we've never had virsh look for myrh6 in all the available pools (although that might be a nice feature enhancement, if we can find a single volume named myrh6 among all the pools; while still failing if myrh6 is ambiguous between multiple pools). </snip> @Eric, Am I missed something? It looks to me it looks up all pools indeed. See storageVolumeLookupByPath and storageVolumeLookupByKey. Patch posted to upstream http://www.redhat.com/archives/libvir-list/2011-September/msg00803.html patch committed to upstream. Verify this bug with libvirt-0.9.9-0rc1.el6.x86_64 # virsh vol-list default Name Path ----------------------------------------- q2.img /var/lib/libvirt/images/q2.img # virsh vol-path q2.img error: failed to get vol 'q2.img', specifying --pool might help error: Storage volume not found: no storage vol with matching path # virsh vol-path q2.img --pool default /var/lib/libvirt/images/q2.img # rpm -q libvirt libvirt-0.9.9-0rc1.el6.x86_64 Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: No documentation needed. 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-2012-0748.html |