Re: [RFC 6/7] Deprecate missing machine type in virDomainDefineXMLFlags()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2018-10-02 at 16:48 +0200, Peter Krempa wrote:
> On Tue, Oct 02, 2018 at 16:14:45 +0200, Andrea Bolognani wrote:
[...]
> > @@ -19114,9 +19114,14 @@ virDomainDefParseCaps(virDomainDefPtr def,
> >      } else {
> >          if (!def->os.arch)
> >              def->os.arch = capsdata->arch;
> > -        if ((!def->os.machine &&
> > -             VIR_STRDUP(def->os.machine, capsdata->machinetype) < 0))
> > -            goto cleanup;
> > +        if (!def->os.machine) {
> > +            virReportWarning(VIR_ERR_DEPRECATED_FEATURE,
> > +                             "%s",
> > +                             _("Missing machine type"));
> 
> Soo, and if multiple warnings are present? Since we don't support
> multiple error objects this will create one warning and after you fix it
> a second one.

I don't think that's necessarily a blocker: a similar behavior can
be observed by feeding libvirt a guest definition that contains two
or more errors, in which case you're expected to solve them one at
the time; you could very well do the same for warnings.

> Also I doubt that LXC has a machine type.

That could be addressed by reporting the warning from the QEMU
driver instead of the generic code. Doing so would probably require
shuffling the calls around quite a bit, but I don't see why it
wouldn't be possible.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux