[systemd-devel] [PATCH] units: disable kmod-static-nodes.service in containers

2013-08-21 Thread Tom Gundersen
Hi Zbyszek,

Regarding 
http://cgit.freedesktop.org/systemd/systemd/commit/?id=219061dc524368179b2e65cfe91d4d6b23396ba8:

Would it make sense to use ConditionCapability=CAP_MKNOD instead? This
would match what is done in systemd-tmpfiles-setup-dev.service. The
effect is currently the same (I think), but might as well be
consistent in case things change in the future.

Cheers,

Tom
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] units: disable kmod-static-nodes.service in containers

2013-08-21 Thread Kay Sievers
On Wed, Aug 21, 2013 at 1:00 PM, Tom Gundersen t...@jklm.no wrote:
 Regarding 
 http://cgit.freedesktop.org/systemd/systemd/commit/?id=219061dc524368179b2e65cfe91d4d6b23396ba8:

 Would it make sense to use ConditionCapability=CAP_MKNOD instead? This
 would match what is done in systemd-tmpfiles-setup-dev.service. The
 effect is currently the same (I think), but might as well be
 consistent in case things change in the future.

Yeah, as the service is actually creating device nodes, it seems to fit here.

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] units: disable kmod-static-nodes.service in containers

2013-08-21 Thread Jóhann B. Guðmundsson

On 08/21/2013 11:00 AM, Tom Gundersen wrote:

Hi Zbyszek,

Regarding 
http://cgit.freedesktop.org/systemd/systemd/commit/?id=219061dc524368179b2e65cfe91d4d6b23396ba8:

Would it make sense to use ConditionCapability=CAP_MKNOD instead? This
would match what is done in systemd-tmpfiles-setup-dev.service. The
effect is currently the same (I think), but might as well be
consistent in case things change in the future.



Adding ConditionCapability=CAP_MKNO to the kmod-static-nodes.service in 
the test container I got here running does not trigger

kmod-static-nodes.service: main process exited, code=exited, status=203/EXEC
[FAILED] Failed to start Create list of required static device nodes for 
the current kernel.

See 'systemctl status kmod-static-nodes.service' for details.
Unit kmod-static-nodes.service entered failed state.

Error at bootup.

So this indeed works to fix that

JBG
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] units: disable kmod-static-nodes.service in containers

2013-08-21 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Aug 21, 2013 at 11:03:31AM +, Jóhann B. Guðmundsson wrote:
 On 08/21/2013 11:00 AM, Tom Gundersen wrote:
 Hi Zbyszek,
 
 Regarding 
 http://cgit.freedesktop.org/systemd/systemd/commit/?id=219061dc524368179b2e65cfe91d4d6b23396ba8:
 
 Would it make sense to use ConditionCapability=CAP_MKNOD instead? This
 would match what is done in systemd-tmpfiles-setup-dev.service. The
 effect is currently the same (I think), but might as well be
 consistent in case things change in the future.
I don't have too strong of an opinion. Whatever works...

 Adding ConditionCapability=CAP_MKNO to the kmod-static-nodes.service
 in the test container I got here running does not trigger
 kmod-static-nodes.service: main process exited, code=exited, status=203/EXEC
 [FAILED] Failed to start Create list of required static device nodes
 for the current kernel.
 See 'systemctl status kmod-static-nodes.service' for details.
 Unit kmod-static-nodes.service entered failed state.
 
 Error at bootup.
 
 So this indeed works to fix that
Hm, Jóhann, are you saying that my ConditionCapability=CAP_MKNOD does
not work, or that ConditionVirtualization=!container that I added does
not work? Or that it works?

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] units: disable kmod-static-nodes.service in containers

2013-08-21 Thread Jóhann B. Guðmundsson

On 08/21/2013 02:02 PM, Zbigniew Jędrzejewski-Szmek wrote:

Hm, Jóhann, are you saying that my ConditionCapability=CAP_MKNOD does
not work, or that ConditionVirtualization=!container that I added does
not work? Or that it works?


I'm was confirming adding ConditionCapability=CAP_MKNOD to the 
kmod-static-nodes.service worked to fix this.


I also agree with Tom that we should use that instead for consistency ;)

JBG
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel