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?
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org