On Thu, Sep 25, 2014 at 09:21:33AM -0400, John Ferlan wrote:
On 09/25/2014 08:20 AM, Jincheng Miao wrote:
> There is an existing NACK patch:
>
https://www.redhat.com/archives/libvir-list/2014-June/msg00809.html
>
Right - so the problem as I see it is:
1. The docs/schemas/storagepool.rng uses 'auto':
<define name='sourcefmtlogical'>
<optional>
<element name='format'>
<attribute name='type'>
<choice>
<value>auto</value>
<value>lvm2</value>
...
2. The libvirt API has "unknown" which yes technically wrong.
3. However, we cannot just change the API to use auto...
So what happens to existing pools on restarts if we change the libvirt
API to use "auto" instead of "unknown"?
# virsh pool-list
Name State Autostart
-------------------------------------------
default active no
images active yes
LVM_Test active yes
test_nfs_pool active no
# virsh pool-dumpxml LVM_Test
<pool type='logical'>
<name>LVM_Test</name>
<uuid>c93d091b-2314-4909-8ab1-4559909adcce</uuid>
<capacity unit='bytes'>9995026432</capacity>
<allocation unit='bytes'>0</allocation>
<available unit='bytes'>9995026432</available>
<source>
<device path='/dev/sda3'/>
<name>LVM_Test</name>
<format type='unknown'/>
...
make the change, install it locally, restart libvirt
...
# service libvirtd restart
Restarting libvirtd (via systemctl): [ OK ]
# virsh pool-list
Name State Autostart
-------------------------------------------
default active no
images active yes
test_nfs_pool active no
# virsh pool-dumpxml LVM_Test
error: failed to get pool 'LVM_Test'
error: Storage pool not found: no storage pool with matching name 'LVM_Test'
...
Remove the change, install it locally, restart libvirt
...
# service libvirtd restart
Restarting libvirtd (via systemctl): [ OK ]
# virsh pool-list
Name State Autostart
-------------------------------------------
default active no
images active yes
LVM_Test active yes
test_nfs_pool active no
So the question becomes can we make 'auto' be a synonym for 'unknown' -
that is accept both in some way.
Indeed, in these cases the answer is always that code trumps docs due to
backcompat requirements, and so we simply have to fix the docs to refer
to 'unknown' instead.
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|