[lxc-devel] [PATCH] allow all iX86 strings for lxc.arch

Stéphane Graber stgraber at ubuntu.com
Mon Apr 28 20:05:24 UTC 2014


On Mon, Apr 28, 2014 at 08:00:53PM +0000, Serge Hallyn wrote:
> Quoting Dwight Engen (dwight.engen at oracle.com):
> > On Mon, 28 Apr 2014 17:54:46 +0000
> > Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> > 
> > > Quoting Dwight Engen (dwight.engen at oracle.com):
> > > > This change accepts the same strings for lxc.arch that setarch(8)
> > > > does.
> > > > 
> > > > When outputting the setting, use i386 instead of x86 since the
> > > > later is not a valid input to setarch, nor will the kernel output
> > > > UTS_MACHINE as x86. The kernel sets utsname.machine to i[3456]86,
> > > > which are all map to PER_LINUX32.
> > > > 
> > > > Note that we continue to parse plain x86 as PER_LINUX32 so as not
> > > > to break existing lxc configuration files.
> > > > 
> > > > Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
> > > 
> > > Hi,
> > > 
> > > the first part (expanding the list of allowed inputs) seems fine, but
> > > the second part seems like it could break existing callers.
> > 
> > That's a good point. Using an older lxc version with a config that's
> > been cloned with a newer one won't work because the older one won't
> > parse i386. Maybe we should output i686 instead since older lxc's will
> > parse that.
> > 
> > Or are you thinking it is too dangerous that there are callers outside
> > of lxc that would be confused by seeing i686 instead of x86? I can drop
> 
> Right, whiel it's highly unlikely, I could see some script parsing that
> output and being confused by new values.
> 
> > the output part, it just seemed a bit wrong that we're using a value
> > that isn't valid from the kernel nor for setarch.
> 
> Admittedly even templates seem to use i686 rather than x86.  So perhaps
> outputting i686 is the best thing to do.
> 
> -serge

I think it's reasonable to switch to i686 by default, I won't
cherry-pick this change into stable so even if something does use this,
it won't suddenly break for our stable 1.0.x users.

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140428/f51b3b5a/attachment.sig>


More information about the lxc-devel mailing list