[libvirt] [PATCH 22/34] conf: disallow empty cpusets for vcpu pinning when parsing XML

Peter Krempa pkrempa at redhat.com
Mon Jan 25 15:08:51 UTC 2016


On Mon, Jan 18, 2016 at 12:06:15 -0500, John Ferlan wrote:
> 
> 
> On 01/14/2016 11:27 AM, Peter Krempa wrote:
> > They are disallowed in the pinning API and as default cpuset.
> > 
> > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1293241
> > ---
> >  src/conf/domain_conf.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> 
> Is this going to be problematic for a running domain? e.g., would it
> disappear now? I agree with the failure, just worried about the

If you use a bitmap string that ends up empty here, it will be parsed
correctly at first and the internal data would be valid. The saved xml
would not use the "0,^0" string when written to disk, but the bitmap
would format as "". When you attempt to parse such string, the parser
code errors out.

If you open the bugzilla, the situation is described pretty well in
there and the API, as said, does already the check.

So in a way a previously accepted config would be rejected in this case
but nobody used that since it would vanish.

> consequences.  Not that anyone should have done this, but seems to be
> one of those post parse, pre-run type checks since it's been allowed in
> the past.

Peter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160125/ffd816c1/attachment-0001.sig>


More information about the libvir-list mailing list