[lxc-devel] call to setup_dev_symlinks with lxc.autodev

Dwight Engen dwight.engen at oracle.com
Tue Apr 22 17:12:01 UTC 2014


On Tue, 22 Apr 2014 12:41:19 -0400
"Michael H. Warfield" <mhw at WittsEnd.com> wrote:

> On Mon, 2014-04-21 at 10:57 -0400, Dwight Engen wrote:
> > On Thu, 17 Apr 2014 10:23:00 -0500
> > Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> > 
> > > Quoting William Dauchy (wdauchy at gmail.com):
> > > > On Thu, Apr 17, 2014 at 5:07 PM, Michael H. Warfield
> > > > <mhw at wittsend.com> wrote:
> > > > > Ok...  Now I see what you're doing.  Thank you.
> > > > >
> > > > > When your initial scripts create the system disk image and
> > > > > populate the /dev directory, why are they not creating those
> > > > > symlinks.  They are required per the kernel's
> > > > > Documentation/devices.txt doc.  They're listed in the
> > > > > "Compulsory" section meaning your custom image is not in
> > > > > compliance with the Linux kernel documentation (i.e. broken).
> > > > 
> > > > hm. I said in a previous post they are already created.
> > > > the symlink function is just not returning EEXIST unless I'm
> > > > listing the directory.
> > > 
> > > That's the intriguing part :)
> 
> > Sorry I'm late to the party, was out last week. FWIW I agree with
> > Mike that its not really related to autodev, so using that option
> > doesn't make sense.
> 
> I think it's Serge's turn to be out of pocket for the next few days.
> 
> > We could allow the container to start if the symlinks can't be
> > created (just return 0 instead of -1), or check for both EROFS and
> > EEXIST (if indeed EROFS is what is being returned in this case).
> > This would revert us to our old behavior since we didn't used to
> > insist the symlinks were there. It seems a little dangerous
> > however, since as Mike pointed out Harald's case was a pretty
> > simple shell redirection. I'm not sure what else might rely on them.
> 
> > Better would be figuring out why we don't see EEXIST until an ls is
> > done, which seems quite strange.
> 
> Ok...  So, late last week, I posted back and experimental patch that
> initially does a stat to check if the link exists and, if it doesn't,
> then tries to create it and ignores EEXIST and EROFS.  It's also
> overloaded with printouts to tell us more about what's going on.  I'm
> waiting on the OP to get back with those results.

Yeah, I was curious to hear from OP what the actual error was when run
with your patch.
 
> The patch doesn't do any harm and implements the symlink process a
> little more formally.  But it is instrumented a bit more than I would
> stick into production.  If I don't hear anything back by the time
> Serge gets back, I'll probably propose a version of that as a formal
> patch.

Sounds good to me, thanks.

> > > So what does /dev look like on the physical media?
> 
> Regards,
> Mike



More information about the lxc-devel mailing list