[libvirt] [PATCH] send 'container=libvirt' in env to container init
Serge Hallyn
serge.hallyn at canonical.com
Tue May 17 15:41:35 UTC 2011
Quoting Eric Blake (eblake at redhat.com):
> On 05/17/2011 08:40 AM, Serge Hallyn wrote:
> >>> +++ b/src/lxc/lxc_container.c
> >>> @@ -112,6 +112,7 @@ static virCommandPtr lxcContainerBuildInitCmd(virDomainDefPtr vmDef)
> >>>
> >>> virCommandAddEnvString(cmd, "PATH=/bin:/sbin");
> >>> virCommandAddEnvString(cmd, "TERM=linux");
> >>> + virCommandAddEnvString(cmd, "container=libvirt");
> >>> virCommandAddEnvPair(cmd, "LIBVIRT_LXC_UUID", uuidstr);
> >>> virCommandAddEnvPair(cmd, "LIBVIRT_LXC_NAME", vmDef->name);
> >>
> >> I've no objection to this, but IMHO the value should be
> >>
> >> container=libvirt-lxc
> >
> > So long as it is guaranteed that henceforth LIBVIRT_LXC_UUID=x will always
> > be passed to init, that suffices. But I worry about it changing in 6 or
> > 12 months to a slightly different name, or not always being passed. Do
> > you think there is any chance of that happening?
>
> No risk of change. Libvirt is documented as providing a stable library,
> and LIBVIRT_LXC_UUID is externally visible, therefore it is now part of
> our documented interface and we cannot change it without breaking
> backwards compatibility. You can safely use $LIBVIRT_LXC_UUID.
>
> Since Daniel was okay with also adding $container, do you want to keep
> this patch under consideration, or are you okay dropping it in favor of
> $LIBVIRT_LXC_UUID?
I'm ok dropping it - thanks!
-serge
More information about the libvir-list
mailing list