Re: [lxc-users] Trouble with automounting /dev/shm

2017-11-25 Thread Pavol Cupka
Thank you very much.

On Sat, Nov 25, 2017 at 7:07 AM, Stéphane Graber  wrote:
> Yes, that works fine.
>
> You can set it with: printf line1\nline2 | lxc config set CONTAINER raw.lxc -
>
> Or through a multi-line yaml entry and "lxc config edit"
>
> On Fri, Nov 24, 2017 at 11:59:21PM +0100, Pavol Cupka wrote:
>> can you have multiline raw.lxc ?
>>
>> On Fri, Nov 24, 2017 at 11:07 PM, Stéphane Graber  
>> wrote:
>> > On Fri, Nov 24, 2017 at 11:01:33PM +0100, Pavol Cupka wrote:
>> >> Going to answer my own question.
>> >>
>> >> It was due to another profile being applied to the container also with
>> >> raw.lxc option so it hijacked the option and the option with dev/shm
>> >> never got applied.
>> >>
>> >> So works without the second profile.
>> >>
>> >> Subquestion: How to add another raw.lxc line to a second profile
>> >> without canceling the first one?
>> >
>> > You can't. As far as LXD is concerned raw.lxc is a single string
>> > configuration key, whichever profile or container local config contains
>> > it last will win.
>> >
>> >>
>> >> Thanks
>> >>
>> >> On Wed, Nov 22, 2017 at 10:18 AM, Pavol Cupka  
>> >> wrote:
>> >> > Hello list,
>> >> >
>> >> > I am running
>> >> >   LXD 2.18
>> >> >   LXC 2.0.8
>> >> >   LXCFS 2.0.6
>> >> >
>> >> > on a non-systemd host, trying to run a non-systemd container. All
>> >> > works well, except the /dev/shm doesn't get mounted. I copied a line
>> >> > from lxc template and added this line as raw.lxc config value for the
>> >> > container, but I doesn't work.
>> >> >
>> >> > This is the config line being added through profile
>> >> > config:
>> >> >
>> >> > raw.lxc: lxc.mount.entry = none dev/shm tmpfs
>> >> > rw,nosuid,nodev,create=dir
>> >> >
>> >> > The container starts, but the /dev/shm doesn't get mounted.
>> >> >
>> >> > Am I doing something wrong?
>> >> >
>> >> > Thanks for help.
>> >> >
>> >> > Pavol
>> >> ___
>> >> lxc-users mailing list
>> >> lxc-users@lists.linuxcontainers.org
>> >> http://lists.linuxcontainers.org/listinfo/lxc-users
>> >
>> > --
>> > Stéphane Graber
>> > Ubuntu developer
>> > http://www.ubuntu.com
>> >
>> > ___
>> > lxc-users mailing list
>> > lxc-users@lists.linuxcontainers.org
>> > http://lists.linuxcontainers.org/listinfo/lxc-users
>> ___
>> lxc-users mailing list
>> lxc-users@lists.linuxcontainers.org
>> http://lists.linuxcontainers.org/listinfo/lxc-users
>
> --
> Stéphane Graber
> Ubuntu developer
> http://www.ubuntu.com
>
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] Trouble with automounting /dev/shm

2017-11-24 Thread Stéphane Graber
Yes, that works fine.

You can set it with: printf line1\nline2 | lxc config set CONTAINER raw.lxc -

Or through a multi-line yaml entry and "lxc config edit"

On Fri, Nov 24, 2017 at 11:59:21PM +0100, Pavol Cupka wrote:
> can you have multiline raw.lxc ?
> 
> On Fri, Nov 24, 2017 at 11:07 PM, Stéphane Graber  wrote:
> > On Fri, Nov 24, 2017 at 11:01:33PM +0100, Pavol Cupka wrote:
> >> Going to answer my own question.
> >>
> >> It was due to another profile being applied to the container also with
> >> raw.lxc option so it hijacked the option and the option with dev/shm
> >> never got applied.
> >>
> >> So works without the second profile.
> >>
> >> Subquestion: How to add another raw.lxc line to a second profile
> >> without canceling the first one?
> >
> > You can't. As far as LXD is concerned raw.lxc is a single string
> > configuration key, whichever profile or container local config contains
> > it last will win.
> >
> >>
> >> Thanks
> >>
> >> On Wed, Nov 22, 2017 at 10:18 AM, Pavol Cupka  
> >> wrote:
> >> > Hello list,
> >> >
> >> > I am running
> >> >   LXD 2.18
> >> >   LXC 2.0.8
> >> >   LXCFS 2.0.6
> >> >
> >> > on a non-systemd host, trying to run a non-systemd container. All
> >> > works well, except the /dev/shm doesn't get mounted. I copied a line
> >> > from lxc template and added this line as raw.lxc config value for the
> >> > container, but I doesn't work.
> >> >
> >> > This is the config line being added through profile
> >> > config:
> >> >
> >> > raw.lxc: lxc.mount.entry = none dev/shm tmpfs
> >> > rw,nosuid,nodev,create=dir
> >> >
> >> > The container starts, but the /dev/shm doesn't get mounted.
> >> >
> >> > Am I doing something wrong?
> >> >
> >> > Thanks for help.
> >> >
> >> > Pavol
> >> ___
> >> lxc-users mailing list
> >> lxc-users@lists.linuxcontainers.org
> >> http://lists.linuxcontainers.org/listinfo/lxc-users
> >
> > --
> > Stéphane Graber
> > Ubuntu developer
> > http://www.ubuntu.com
> >
> > ___
> > lxc-users mailing list
> > lxc-users@lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-users
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com


signature.asc
Description: PGP signature
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] Trouble with automounting /dev/shm

2017-11-24 Thread Fajar A. Nugraha
On Sat, Nov 25, 2017 at 5:59 AM, Pavol Cupka  wrote:

> can you have multiline raw.lxc ?
>
>
Yes. See https://github.com/lxc/lxd/issues/2343#issuecomment-245102205 for
example

-- 
Fajar
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] Trouble with automounting /dev/shm

2017-11-24 Thread Pavol Cupka
can you have multiline raw.lxc ?

On Fri, Nov 24, 2017 at 11:07 PM, Stéphane Graber  wrote:
> On Fri, Nov 24, 2017 at 11:01:33PM +0100, Pavol Cupka wrote:
>> Going to answer my own question.
>>
>> It was due to another profile being applied to the container also with
>> raw.lxc option so it hijacked the option and the option with dev/shm
>> never got applied.
>>
>> So works without the second profile.
>>
>> Subquestion: How to add another raw.lxc line to a second profile
>> without canceling the first one?
>
> You can't. As far as LXD is concerned raw.lxc is a single string
> configuration key, whichever profile or container local config contains
> it last will win.
>
>>
>> Thanks
>>
>> On Wed, Nov 22, 2017 at 10:18 AM, Pavol Cupka  wrote:
>> > Hello list,
>> >
>> > I am running
>> >   LXD 2.18
>> >   LXC 2.0.8
>> >   LXCFS 2.0.6
>> >
>> > on a non-systemd host, trying to run a non-systemd container. All
>> > works well, except the /dev/shm doesn't get mounted. I copied a line
>> > from lxc template and added this line as raw.lxc config value for the
>> > container, but I doesn't work.
>> >
>> > This is the config line being added through profile
>> > config:
>> >
>> > raw.lxc: lxc.mount.entry = none dev/shm tmpfs
>> > rw,nosuid,nodev,create=dir
>> >
>> > The container starts, but the /dev/shm doesn't get mounted.
>> >
>> > Am I doing something wrong?
>> >
>> > Thanks for help.
>> >
>> > Pavol
>> ___
>> lxc-users mailing list
>> lxc-users@lists.linuxcontainers.org
>> http://lists.linuxcontainers.org/listinfo/lxc-users
>
> --
> Stéphane Graber
> Ubuntu developer
> http://www.ubuntu.com
>
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] Trouble with automounting /dev/shm

2017-11-24 Thread Stéphane Graber
On Fri, Nov 24, 2017 at 11:01:33PM +0100, Pavol Cupka wrote:
> Going to answer my own question.
> 
> It was due to another profile being applied to the container also with
> raw.lxc option so it hijacked the option and the option with dev/shm
> never got applied.
> 
> So works without the second profile.
> 
> Subquestion: How to add another raw.lxc line to a second profile
> without canceling the first one?

You can't. As far as LXD is concerned raw.lxc is a single string
configuration key, whichever profile or container local config contains
it last will win.

> 
> Thanks
> 
> On Wed, Nov 22, 2017 at 10:18 AM, Pavol Cupka  wrote:
> > Hello list,
> >
> > I am running
> >   LXD 2.18
> >   LXC 2.0.8
> >   LXCFS 2.0.6
> >
> > on a non-systemd host, trying to run a non-systemd container. All
> > works well, except the /dev/shm doesn't get mounted. I copied a line
> > from lxc template and added this line as raw.lxc config value for the
> > container, but I doesn't work.
> >
> > This is the config line being added through profile
> > config:
> >
> > raw.lxc: lxc.mount.entry = none dev/shm tmpfs
> > rw,nosuid,nodev,create=dir
> >
> > The container starts, but the /dev/shm doesn't get mounted.
> >
> > Am I doing something wrong?
> >
> > Thanks for help.
> >
> > Pavol
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com


signature.asc
Description: PGP signature
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] Trouble with automounting /dev/shm

2017-11-24 Thread Pavol Cupka
Going to answer my own question.

It was due to another profile being applied to the container also with
raw.lxc option so it hijacked the option and the option with dev/shm
never got applied.

So works without the second profile.

Subquestion: How to add another raw.lxc line to a second profile
without canceling the first one?

Thanks

On Wed, Nov 22, 2017 at 10:18 AM, Pavol Cupka  wrote:
> Hello list,
>
> I am running
>   LXD 2.18
>   LXC 2.0.8
>   LXCFS 2.0.6
>
> on a non-systemd host, trying to run a non-systemd container. All
> works well, except the /dev/shm doesn't get mounted. I copied a line
> from lxc template and added this line as raw.lxc config value for the
> container, but I doesn't work.
>
> This is the config line being added through profile
> config:
>
> raw.lxc: lxc.mount.entry = none dev/shm tmpfs
> rw,nosuid,nodev,create=dir
>
> The container starts, but the /dev/shm doesn't get mounted.
>
> Am I doing something wrong?
>
> Thanks for help.
>
> Pavol
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users