On Thu, Apr 23, 2015 at 14:41:21 +0200, Matthias Gatto wrote: > Add nodename inside virstoragefile > During xml backingStore parsing, look for a nodename attribute in the disk > declaration if this one is a quorum, if a nodename is found, add it to > the virStorageSource otherwise create a new one with a random name. > Take inspiration from this patch to create the nodename: > http://lists.gnu.org/archive/html/qemu-devel/2014-05/msg03209.html > > Durring xml backingStore formating, look for a nodename attribute inside the > virStorageSource struct, and add it to the disk element. > > Use the nodename to create the quorum in qemuBuildQuorumStr. > > Signed-off-by: Matthias Gatto <matthias.gatto@xxxxxxxxxxxx> > --- Once we decide that we want to deal with node names (which we definitely should do soon we will need to take a different approach compared to this patch: > docs/formatdomain.html.in | 7 +++++++ > docs/schemas/domaincommon.rng | 5 +++++ > src/conf/domain_conf.c | 27 +++++++++++++++++++++++++++ > src/qemu/qemu_command.c | 3 +++ > src/util/virstoragefile.c | 4 ++++ > src/util/virstoragefile.h | 1 + > 6 files changed, 47 insertions(+) > > diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in > index 7d058ec..d9afe36 100644 > --- a/docs/formatdomain.html.in > +++ b/docs/formatdomain.html.in > @@ -2183,6 +2183,13 @@ > <code>vda[2]</code> refers to the backing store with > <code>index='2'</code> of the disk with <code>vda</code> target. > </dd> > + <dt><code>nodename</code> attribute > + <span class="since">since 1.2.13</span></dt> > + <dd> > + When the backing store is a quorum child, we can use this attribute > + to define the node-name of a child. If this atribute is undefine, > + a random nodename is generate. We certainly don't want to give the user the need to specify node names. In fact I think libvirt shouldn't expose node names in any way. The implementation should remain internal and users will interact via the backing chain 'index' element: 'This attribute is only valid in output (and ignored on input) and it can be used to refer to a specific part of the disk chain when doing block operations (such as via the virDomainBlockRebase API). For example, vda[2] refers to the backing store with index='2' of the disk with vda target.' Once we do this we should specify a node name for every backing chain element or possibly re-detect it after qemu starts and store the backing chain info internally. This will be necessary as libvirt has to model the operations with the backing chain the same way as qemu is doing it so that libvirt can ensure that qemu is not accessing files that it should not access. At any rate, node names are a very useful concept, but this patch would be a step in the wrong direction. Peter
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list