On Thu, Apr 16, 2009 at 11:23:51PM +0900, Ryota Ozaki wrote:
Hi,
This patch set allows alphabetical names in owner/group of permissions
in storage XMLs.
Change from the initial patch:
- store owner/group as strings
- As a result, dumpxml of StoragePool could return XML as it is
specified
Note that in the case of StorageVolume, dumpxml always returns
numeric owner/group, i.e., uid and gid, because current libvirt
does not store parameters of a volume into an external file but
collect info of the volume from the present filesystem using
fstat().
This behavior may lose original parameters even in the case of
uid/gid specified. I'm not sure why only StorageVolume does not
create a XML file. Anyone knows?
libvirt only stores XML files for top level objects that it manages
directly and needs associated state for. In other cases it delegates
storaage to the underlying technology. In Xen driver for example,
it is delegated to XenD to storage guest configs.
In the storage driver we only store the pool configuration and when
the pool is active all information about volumes is obtained from
the underlying filesystem / storage technology.
I should say here I don't intend to replace using numeric
uid/gid
with using alphabetical names. This patch intends just to bring
ease of use and identifying what is specified for users (may not
for end-users though). And I don't still have the answer for
the question 'numbers vs. names, which is better?'.
IMHO numbers are better because they are the canonical stored value
on the filesystems. No matter which host you access a filesystem from,
it will see the same numeric ID. The id <-> name mapping is a per-host
property, although a directory / naming service will help make a
consistent mapping, this is not guarenteed. As such the numeric ID
should be treated as the master value, with name being a derived
value.
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|