Bug 598365 - vol-* commands help description is inaccurate
vol-* commands help description is inaccurate
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.0
x86_64 Linux
low Severity medium
: rc
: 6.0
Assigned To: Eric Blake
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-01 04:13 EDT by wangyimiao
Modified: 2010-11-11 09:49 EST (History)
8 users (show)

See Also:
Fixed In Version: libvirt-0_8_1-11_el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 09:49:55 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)
Patch to improve virsh help info, plus add --pool support to vol-key (2.65 KB, patch)
2010-06-06 06:16 EDT, Justin Clift
no flags Details | Diff
Fixes the descriptions for the volume commands mentioned, plus adds pool support to vol-key (2.59 KB, patch)
2010-06-08 11:26 EDT, Justin Clift
no flags Details | Diff

  None (edit)
Description wangyimiao 2010-06-01 04:13:00 EDT
Description of problem:
The vol-* help seems incorrect

Version-Release number of selected component (if applicable):

RHEL6.0
qemu-img-0.12.1.2-2.68.el6.x86_64
qemu-kvm-0.12.1.2-2.68.el6.x86_64
libvirt-0.8.1-7.el6.x86_64



How reproducible:
1.
[root@dhcp-65-144 ~]# cat pool-mig.xml 
<pool type='netfs'>
  <name>pool-mig</name>
  <uuid>3e33ce45-4f53-4fa7-bb32-11f34168b82b</uuid>
  <capacity>161061273600</capacity>
  <allocation>61805625344</allocation>
  <available>99255648256</available>
  <source>
    <host name='10.66.90.115'/>
    <dir path='/vol/kvm1/auto/images_good'/>
    <format type='auto'/>
  </source>
  <target>
    <path>/var/lib/libvirt/images</path>
    <permissions>
      <mode>0700</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</pool>

2.
[root@dhcp-65-144 ~]# virsh pool-define pool-mig.xml 
Pool pool-mig defined from pool-mig.xml

3.
[root@dhcp-65-144 ~]# virsh pool-start pool-mig
Pool pool-mig started

4. 
[root@dhcp-65-144 images]# virsh vol-list pool-mig
Name                 Path                                    
-----------------------------------------
win2003r2-64-el6.qcow2 /var/lib/libvirt/images/win2003r2-64-el6.qcow2
 
5.
[root@dhcp-65-144 images]# virsh vol-dumpxml /var/lib/libvirt/images/win2003r2-64-el6.qcow2
<volume>
  <name>win2003r2-64-el6.qcow2</name>
  <key>/var/lib/libvirt/images/win2003r2-64-el6.qcow2</key>
  <source>
  </source>
  <capacity>20971520000</capacity>
  <allocation>5330206720</allocation>
  <target>
    <path>/var/lib/libvirt/images/win2003r2-64-el6.qcow2</path>
    <format type='qcow2'/>
    <permissions>
      <mode>0644</mode>
      <owner>36</owner>
      <group>36</group>
      <label>system_u:object_r:nfs_t:s0</label>
    </permissions>
  </target>
</volume>

6.
[root@dhcp-66-70-18 ~]# virsh -h|grep vol
    .....
    vol-path        convert a vol UUID to vol path
    vol-name        convert a vol UUID to vol name
    vol-key         convert a vol UUID to vol key

  
Actual results:
UUID have undefined in the vol XML. 

Expected results:

1.Change the UUID in the help doc to 'name' or 'path'.

Additional info:

1.In the above,"convert a vol UUID to vol .." notes seems incorrect,because I can not find UUID mark in the XML of steps 5.
Comment 2 Justin Clift 2010-06-06 06:16:30 EDT
Created attachment 421569 [details]
Patch to improve virsh help info, plus add --pool support to vol-key

This patch improves the help descriptions for vol-key, vol-name, and vol-path.

From:

  vol-path        convert a vol UUID to vol path
  vol-name        convert a vol UUID to vol name
  vol-key         convert a vol UUID to vol key

To:

  vol-path        returns the volume path for a given volume name or key
  vol-name        returns the volume name for a given volume key or path
  vol-key         returns the volume key for a given volume name or path


Additionally, because the vol-key command didn't previously support being given a --pool <string> vol_name argument, this patch adds that too.

This patch has also been submitted upstream:

  http://www.redhat.com/archives/libvir-list/2010-June/msg00136.html
Comment 3 RHEL Product and Program Management 2010-06-07 11:58:55 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 4 Justin Clift 2010-06-08 11:24:33 EDT
Resubmitted upstream:

  https://www.redhat.com/archives/libvir-list/2010-June/msg00174.html
Comment 5 Justin Clift 2010-06-08 11:26:23 EDT
Created attachment 422253 [details]
Fixes the descriptions for the volume commands mentioned, plus adds pool support to vol-key
Comment 7 Dave Allan 2010-06-28 23:01:25 EDT
libvirt-0_8_1-11_el6 has been built in RHEL-6-candidate with the fix.

Dave
Comment 8 dyuan 2010-06-29 06:20:55 EDT
Verified PASSED with libvirt-0.8.1-11.el6.
Comment 9 releng-rhel@redhat.com 2010-11-11 09:49:55 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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