On Thu, 2014-02-13 at 14:44 -0500, Dwight Engen wrote: > On Thu, 13 Feb 2014 13:32:44 -0500 > "Michael H. Warfield" <[email protected]> wrote: > > > On Thu, 2014-02-13 at 12:18 -0500, Michael H. Warfield wrote: > > > On Thu, 2014-02-13 at 14:02 +0100, Harald Dunkel wrote: > > > > Hi folks, > > > > > > > Problem in LXC (beta4) running a Centos 6.5 client: > > > > > > > # cat <(echo hello) > > > > cat: /dev/fd/63: No such file or directory > > > > > > > On a "real" host /dev/fd is a symlink pointing to /proc/self/fd. > > > > AFAICS only the altlinux template creates this symlink. Debian > > > > seems to provide the link on its own. > > > > > > lxc.autodev = 1 does not help. I tried, of course. > > > > > > > Question: Should this symlink be added to the lxc-centos template, > > > > as it was done for altlinux? > > > > > Probably. I'll have to look at it. If the CentOS template needs > > > it, then the Fedora template would also probably need it as well, > > > especially in the autodev case. The Oracle template also doesn't > > > do anything with /dev/fd and it should be very similar to the > > > CentOS layout. I'm not sure what the deal is. Maybe they're > > > providing it in their startup. > > > > Oh crud. Isn't this a fine kettle of fish. > > > > I've confirmed that /dev/fd is missing from CentOS and Oracle > > containers but not from Fedora (systemd w/ autodev) containers. Not > > exactly what I was expecting. I haven't tested it with earlier > > deprecated upstart or sysvinit versions of Fedora. I don't see where > > it's being created by any of the init scripts.
> Okay, the symlink is being created in the init script in the initramfs > image. We're obviously not going to be running that in the container > case, so we'll have to do something in lxc. I'd vote for your > suggestion of just having lxc do it where its creating the ptys unless > someone has a case where it shouldn't exist (which I doubt since its > documented in the kernel's Documentation/devices.txt under "Compulsory > links"). Lovely. That explains why I couldn't find it then. Good catch finding that documented. If it's mandatory, that's gets my vote too. > > I can add creating that symlink into the CentOS template, there's just > > one problem. > > > > As you noticed, it also doesn't work if you set autodev = 1. Adding > > the symlink into the CentOS and Oracle templates would fix the static > > fs case but the autodev case (which should work with both, even with > > sysvinit or upstart) will still be broken. Maybe when CentOS 7, RHEL > > 7, Oracle 7 comes out with systemd (which will require autodev), that > > will fix itself. With devtmpfs, that /dev/fd symlink has to be > > created dynamically when the system inits and mounts devtmpfs on /dev. > > > > In my mind, that symlink needs to be created at run-time if it doesn't > > exist. A workaround, right now, would be to add that to a hook (post > > mount hook maybe?). Longer term, I think that may need to be in the > > lxc-start code itself, right where we're populating the /dev directory > > with things like the pty's (is there any case where we would NOT want > > to do this?). We could also add a start-up script into the container > > itself to do this as it inits but I would prefer keeping those kinds > > of interventions to a minimum. > > > > I'd like to hear Dwight's thoughts on this wrt the Oracle template > > before we go down either road or another. > > > > > > Every helpful comment would be highly appreciated > > > > Harri > > > > > > Regards, > > > Mike Regards, Mike -- Michael H. Warfield (AI4NB) | (770) 978-7061 | [email protected] /\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/ NIC whois: MHW9 | An optimist believes we live in the best of all PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it!
signature.asc
Description: This is a digitally signed message part
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
