[lxc-users] Container cannot write to /var/run

Michael H. Warfield mhw at WittsEnd.com
Mon Apr 6 17:09:46 UTC 2015


On Sun, 2015-04-05 at 01:29 +0200, Bostjan Skufca wrote:
> Is systemd now supported as LXC guest's init system?

Short answer is yes.  Proviso is that unpriv containers may not work.
Priv containers running systemd in the guest certainly do work.  The OP
didn't specify priv or unpriv containers.
> 
> Anyhow, I would guess systemd creates ramdisk for /run (and /var/run)
> which, by some funky interaction ends up non-writeable.

In Fedora, the convention is that /var/run must be a symlink to /run
(../run) and /var/lock must be a symlink to /run/lock (../run/lock).

> I had (somewhat) similar systemd issue on another project recently,
> where systemd created /dev/log socket preemptively, and if syslog was
> not running, socket started blocking syslog() syscalls.

...

> I might be wrong, but it might be systemd doing something in an
> unconventional way which is causing trouble (unconventional != bad).

That's almost the definition of systemd.  Beside the point.  I have
dozens of Fedora 19, Fedora 20, and Fedora 21 containers running right
now in production.  There's no problem with systemd running in a priv
container and I haven't seen this write problem at all.  There may be
problems in unpriv containers but the OP didn't specify.
> 
> b.

Regards,
Mike
> 
> 
> On 4 April 2015 at 23:31, CDR <venefax at gmail.com> wrote:
>         My Fedora 20 container, on a Ubuntu 14.04 server, cannot write
>         to /var/run. Is there a secret reason that I use to fix it?
>         
>         Other containers with non-systemd OSs can write just fine
>         to /var/run.
>         
>         
>         Philip
>         
>         
>         _______________________________________________
>         lxc-users mailing list
>         lxc-users at lists.linuxcontainers.org
>         http://lists.linuxcontainers.org/listinfo/lxc-users
> 
> 
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
   /\/\|=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!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 465 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150406/f3701603/attachment.sig>


More information about the lxc-users mailing list