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

Re: [Xen-devel] [PATCH V5 29/32] xl: use "libxl-json" format



On Tue, 2014-05-20 at 16:11 +0100, Ian Jackson wrote:
> Wei Liu writes ("[PATCH V5 29/32] xl: use "libxl-json" format"):
> > Before this change, xl stores domain configuration in "xl" format, which
> > is in fact a verbatim copy of user supplied domain config.
> ...
> > +    /* If we're doing migration, the domain name was appended with
> > +     * "--incoming" a few lines above. So we need to remove that
> > +     * suffix in the stored configuration.
> > +     */
> > +    if (migrate_fd >= 0) {
> > +        libxl_domain_config d;
> > +        int xlen = strlen("--incoming");
> > +        int orig_len;
> > +
> > +        ret = libxl_load_domain_configuration(ctx, domid, &d);
> 
> Firstly, I think this editing of libxl's copy of domain config way is
> a layering violation.
> 
> But it ought to be unnecessary, because either libxl_domain_rename

That would lend credence to the idea that these functions ought to be
internal to the library, or at least the store one should (get is still
useful to applications I suppose, e.g. xl list).

> or "libxl_load_domain_configuration" should deal with it.  I would
> much prefer the latter, as that results in the domain name being
> stored only in one place.

You mean libxl_load_dmoain_config should have special handling for
domains names ending --incoming (or --.* perhaps)? That doesn't seem
right, I suspect you meant something else.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.