<div dir="ltr">Thanks for the reply Peter, Christian<br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 2, 2018 at 3:21 PM, Peter Krempa <span dir="ltr"><<a href="mailto:pkrempa@redhat.com" target="_blank">pkrempa@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, Feb 02, 2018 at 08:14:29 +0100, Christian Ehrhardt wrote:<br>
> On Fri, Jan 19, 2018 at 3:55 PM, Shivaprasad G Bhat<br>
> <<a href="mailto:sbhat@linux.vnet.ibm.com">sbhat@linux.vnet.ibm.com</a>> wrote:<br>
> > The virt-aa-helper fails to parse the xmls with the memory/cpu<br>
> > hotplug features or user assigned aliases. Set the features in<br>
> > xmlopt->config for the parsing to succeed.<br>
> ><br>
> > Signed-off-by: Shivaprasad G Bhat <<a href="mailto:sbhat@linux.vnet.ibm.com">sbhat@linux.vnet.ibm.com</a>><br>
> > ---<br>
> >  src/security/virt-aa-helper.c |    8 +++++++-<br>
> >  1 file changed, 7 insertions(+), 1 deletion(-)<br>
> ><br>
> > diff --git a/src/security/virt-aa-helper.<wbr>c b/src/security/virt-aa-helper.<wbr>c<br>
> > index f7ccae0..29a459d 100644<br>
> > --- a/src/security/virt-aa-helper.<wbr>c<br>
> > +++ b/src/security/virt-aa-helper.<wbr>c<br>
> > @@ -654,6 +654,11 @@ caps_mockup(vahControl * ctl, const char *xmlStr)<br>
> >      return rc;<br>
> >  }<br>
> ><br>
> > +virDomainDefParserConfig virAAHelperDomainDefParserConf<wbr>ig = {<br>
> > +    .features = VIR_DOMAIN_DEF_FEATURE_MEMORY_<wbr>HOTPLUG |<br>
> > +                VIR_DOMAIN_DEF_FEATURE_<wbr>OFFLINE_VCPUPIN |<br>
> > +                VIR_DOMAIN_DEF_FEATURE_<wbr>INDIVIDUAL_VCPUS,<br>
> > +};<br>
><br>
> Sure we can't link against qemu_domain.c to get "the original"<br>
> virQEMUDriverDomainDefParserCo<wbr>nfig.<br>
> But a comment here that the define is essentially taken there might<br>
> helpful to later on follow any updates there.<br>
><br>
> Also mentioning why exactly you dropped<br>
> VIR_DOMAIN_DEF_FEATURE_USER_<wbr>ALIAS for the same reason.<br></div></div></blockquote><div><br></div><div>The reason being the parsing code just ignores the user specified aliases</div><div>and doesn't fail the parsing if the <span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">VIR_DOMAIN_DEF_FEATURE_</span>USER_ALIAS </div><div>feature flag is not set. </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
<br>
</div></div>Actually, we might want to add a parser flag (or feature bit) to ignore<br>
all other features when parsing. The aa-helper binary does not really<br>
want or need to validate all the stuff necessary here and it might also<br>
create problems since the feature bits are specifically designed to<br>
reject XMLs which have certain elements (if the bit is not enabled).<br></blockquote><div><br></div><div>I agree. Having a new "skip" flag is better than this as that is future proof</div><div>for more flags that might come.</div><div><br></div><div>Sending the next version in a while.</div><div><br></div><div>Thanks,</div><div>Shivaprasad</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
This means that not-defining VIR_DOMAIN_DEF_FEATURE_USER_<wbr>ALIAS would<br>
actually make the parser fail on any XML which has user aliases despite<br>
the fact that the aa-helper does not actually care about them at all.<br>
<br>
Having a way to disable that is preferred, since having two definitions<br>
of this would actualy result into one of them being out of sync all the<br>
time.<br>
<br>--<br>
libvir-list mailing list<br>
<a href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/libvir-list" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/libvir-list</a><br></blockquote></div><br></div></div>