Bug 851078 - the <format> element of a disk pool can not edit by pool-edit command in active status
the <format> element of a disk pool can not edit by pool-edit command in acti...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
x86_64 Linux
low Severity medium
: rc
: ---
Assigned To: Gunannan Ren
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-23 04:21 EDT by EricLee
Modified: 2014-06-18 03:19 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-07 09:58:13 EDT
Type: Bug
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 EricLee 2012-08-23 04:21:07 EDT
Description of problem:
the <format> element of a disk pool can not edit by pool-edit command in active status : just means that pool-edit do not take effect even getting "Pool dsk_pool XML configuration edited." message.

Version-Release number of selected component (if applicable):
Both in RHEL6.3.z and RHEL5.9 packages:
# rpm -qa libvirt qemu-kvm-rhev kernel
kernel-2.6.32-279.5.1.el6.x86_64
libvirt-0.9.10-21.el6_3.4.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6.x86_64
and
# rpm -qa libvirt kvm kernel
kernel-2.6.18-333.el5
libvirt-0.8.2-29.el5
kvm-83-258.el5

How reproducible:
100%

Steps to Reproduce:
 
1. Prepare a USB storage.

2. create a disk pool with xml similar with following:

      <pool type="disk">
        <name>dsk_pool</name>
        <source>
          <device path='/dev/sdb'/>
        </source>
        <target>
          <path>/dev</path>
        </target>
      </pool>

  # virsh pool-define dsk_pool.xml
  # virsh pool-start dsk_pool

3. # virsh pool-dumpxml dsk_pool
<pool type='disk'>
  <name>dsk_pool</name>
  <uuid>faeced35-e569-cf95-4000-1aba5ebdda17</uuid>
  <capacity>16022241280</capacity>
  <allocation>0</allocation>
  <available>16022240768</available>
  <source>
    <device path='/dev/sdb'>
    <freeExtent start='512' end='16022241280'/>
    </device>
    <format type='unknown'/>
  </source>
  <target>
    <path>/dev</path>
    <permissions>
      <mode>0700</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>
 
4. Edit the dsk_pool from "<format type='unknown'/>" to "<format type='dos'/>"
# virsh pool-edit dsk_pool
Pool dsk_pool XML configuration edited.

5. # virsh pool-dumpxml dsk_pool
....
<format type='unknown'/>
....

6. It(format type) is still 'unknown' even after you do pool-destroy and pool-start again.

7. destroy the pool and edit the format type to a correct value:
# virsh pool-destroy dsk_pool
Pool dsk_pool destroyed

Edit the dsk_pool from "<format type='unknown'/>" to "<format type='dos'/>"
# virsh pool-edit dsk_pool
Pool dsk_pool XML configuration edited.

8. # virsh pool-dumpxml dsk_pool
....
<format type='dos'/>
....

Edit works.

9. # virsh pool-start dsk_pool
Pool dsk_pool started

then edit again from 'dos' to 'bsd'.
# virsh pool-edit dsk_pool
Pool dsk_pool XML configuration edited.

10. Destroy and dumpxml check again:
# virsh pool-destroy dsk_pool
Pool dsk_pool destroyed

# virsh pool-dumpxml dsk_pool
....
<format type='dos'/>
....

Edit does not work.

Actual results:
As steps.

Expected results:
Take effect after pool restart.

Additional info:
This can be reproduced in RHEL5.9 packages too. However, it can not be reproduced by RHEL6.4 libvirt package(libvirt-0.10.0-0rc0.el6.x86_64).
Comment 2 Gunannan Ren 2012-08-28 03:26:02 EDT
This problem indeed couldn't be reproduced using git head upstream.

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