Re: [systemd-devel] [PATCH 01/11] Ensure that systemd-sysctl.service is applied after modules are loaded

2014-06-13 Thread Tom Gundersen
On Fri, Jun 13, 2014 at 4:41 PM, Werner Fink  wrote:
> From: Frederic Crozat 

Hm, this would not help at all for modules loaded on-demand (which are
most of them). What is the problem being solved here?

> ---
>  units/systemd-sysctl.service.in |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git units/systemd-sysctl.service.in units/systemd-sysctl.service.in
> index 5baf22c..c4bc0da 100644
> --- units/systemd-sysctl.service.in
> +++ units/systemd-sysctl.service.in
> @@ -10,7 +10,7 @@ Description=Apply Kernel Variables
>  Documentation=man:systemd-sysctl.service(8) man:sysctl.d(5)
>  DefaultDependencies=no
>  Conflicts=shutdown.target
> -After=systemd-readahead-collect.service systemd-readahead-replay.service
> +After=systemd-readahead-collect.service systemd-readahead-replay.service 
> systemd-modules-load.service
>  Before=sysinit.target shutdown.target
>  ConditionPathIsReadWrite=/proc/sys/
>  ConditionDirectoryNotEmpty=|/lib/sysctl.d
> --
> 1.7.9.2
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 01/11] Ensure that systemd-sysctl.service is applied after modules are loaded

2014-06-16 Thread Dr. Werner Fink
On Fri, Jun 13, 2014 at 05:51:34PM +0200, Tom Gundersen wrote:
> On Fri, Jun 13, 2014 at 4:41 PM, Werner Fink  wrote:
> > From: Frederic Crozat 
> 
> Hm, this would not help at all for modules loaded on-demand (which are
> most of them). What is the problem being solved here?

Indeed this does not help for the loaded on-demand modules as this requires
an other approach.  Nevertheless for the modules loaded by the service
systemd-modules-load.service it helps to load the the kernel parameters
afterwards as with many modules there will be *new* entiers below /proc/sys/

> > ---
> >  units/systemd-sysctl.service.in |2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git units/systemd-sysctl.service.in units/systemd-sysctl.service.in
> > index 5baf22c..c4bc0da 100644
> > --- units/systemd-sysctl.service.in
> > +++ units/systemd-sysctl.service.in
> > @@ -10,7 +10,7 @@ Description=Apply Kernel Variables
> >  Documentation=man:systemd-sysctl.service(8) man:sysctl.d(5)
> >  DefaultDependencies=no
> >  Conflicts=shutdown.target
> > -After=systemd-readahead-collect.service systemd-readahead-replay.service
> > +After=systemd-readahead-collect.service systemd-readahead-replay.service 
> > systemd-modules-load.service
> >  Before=sysinit.target shutdown.target
> >  ConditionPathIsReadWrite=/proc/sys/
> >  ConditionDirectoryNotEmpty=|/lib/sysctl.d
> > --
> > 1.7.9.2

Werner

-- 
  "Having a smoking section in a restaurant is like having
  a peeing section in a swimming pool." -- Edward Burr


pgpd5qI1icqi_.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 01/11] Ensure that systemd-sysctl.service is applied after modules are loaded

2014-06-16 Thread Cristian Rodríguez
El 16/06/14 08:52, Dr. Werner Fink escribió:
> On Fri, Jun 13, 2014 at 05:51:34PM +0200, Tom Gundersen wrote:
>> On Fri, Jun 13, 2014 at 4:41 PM, Werner Fink  wrote:
>>> From: Frederic Crozat 
>>
>> Hm, this would not help at all for modules loaded on-demand (which are
>> most of them). What is the problem being solved here?
> 
> Indeed this does not help for the loaded on-demand modules as this requires
> an other approach.  Nevertheless for the modules loaded by the service
> systemd-modules-load.service it helps to load the the kernel parameters
> afterwards as with many modules there will be *new* entiers below /proc/sys/

What exactly is the problem you are trying to solve with this ? It still
looks wrong .. The only way that could work is using an udev rule  or an
/etc/modprobe.d/ snippet. AFAIK any other approach is doomed in one way
or another.



-- 
Cristian
"I don't know the key to success, but the key to failure is trying to
please everybody."
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 01/11] Ensure that systemd-sysctl.service is applied after modules are loaded

2014-06-16 Thread Frederic Crozat
Le lundi 16 juin 2014 à 10:49 -0400, Cristian Rodríguez a écrit :
> El 16/06/14 08:52, Dr. Werner Fink escribió:
> > On Fri, Jun 13, 2014 at 05:51:34PM +0200, Tom Gundersen wrote:
> >> On Fri, Jun 13, 2014 at 4:41 PM, Werner Fink  wrote:
> >>> From: Frederic Crozat 
> >>
> >> Hm, this would not help at all for modules loaded on-demand (which are
> >> most of them). What is the problem being solved here?
> > 
> > Indeed this does not help for the loaded on-demand modules as this requires
> > an other approach.  Nevertheless for the modules loaded by the service
> > systemd-modules-load.service it helps to load the the kernel parameters
> > afterwards as with many modules there will be *new* entiers below /proc/sys/
> 
> What exactly is the problem you are trying to solve with this ? It still
> looks wrong .. The only way that could work is using an udev rule  or an
> /etc/modprobe.d/ snippet. AFAIK any other approach is doomed in one way
> or another.

See https://bugzilla.novell.com/show_bug.cgi?id=725412 

-- 
Frederic Crozat
Project Manager Enterprise Desktop
SUSE

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


Re: [systemd-devel] [PATCH 01/11] Ensure that systemd-sysctl.service is applied after modules are loaded

2014-06-16 Thread Tom Gundersen
On Mon, Jun 16, 2014 at 5:19 PM, Frederic Crozat  wrote:
> Le lundi 16 juin 2014 à 10:49 -0400, Cristian Rodríguez a écrit :
>> El 16/06/14 08:52, Dr. Werner Fink escribió:
>> > On Fri, Jun 13, 2014 at 05:51:34PM +0200, Tom Gundersen wrote:
>> >> On Fri, Jun 13, 2014 at 4:41 PM, Werner Fink  wrote:
>> >>> From: Frederic Crozat 
>> >>
>> >> Hm, this would not help at all for modules loaded on-demand (which are
>> >> most of them). What is the problem being solved here?
>> >
>> > Indeed this does not help for the loaded on-demand modules as this requires
>> > an other approach.  Nevertheless for the modules loaded by the service
>> > systemd-modules-load.service it helps to load the the kernel parameters
>> > afterwards as with many modules there will be *new* entiers below 
>> > /proc/sys/
>>
>> What exactly is the problem you are trying to solve with this ? It still
>> looks wrong .. The only way that could work is using an udev rule  or an
>> /etc/modprobe.d/ snippet. AFAIK any other approach is doomed in one way
>> or another.
>
> See https://bugzilla.novell.com/show_bug.cgi?id=725412

Hm, that really does not look convincing. There is a fundamental
problem here (as Ludwig Nessel points out in the linked discussion:
"sysctl is broken by design unfortunately."), and the discussion nor
the patch do not get to the bottom of that.

Moreover, (essentially) this patch was already posted and rejected
last year. Lennart then wrote:

"Well, most modules are loaded asynchronously from udev, so I fear this
won't do much...

/etc/sysctl.d/ is really only for sysctl settings that exist all the
time, and -- as a special exception -- for network-device related
settings, which we set via a udev rule.

If people want to apply sysctls based on specific modules that are
loaded, or based on specific hw that shows up (i.e. hw that isn't a
network device) the only sane way is probably via a udev rule..."

Cheers,

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


Re: [systemd-devel] [PATCH 01/11] Ensure that systemd-sysctl.service is applied after modules are loaded

2014-06-18 Thread Dr. Werner Fink
On Mon, Jun 16, 2014 at 06:02:37PM +0200, Tom Gundersen wrote:
> On Mon, Jun 16, 2014 at 5:19 PM, Frederic Crozat  wrote:
> >
> > See https://bugzilla.novell.com/show_bug.cgi?id=725412
> 
> Hm, that really does not look convincing. There is a fundamental
> problem here (as Ludwig Nessel points out in the linked discussion:
> "sysctl is broken by design unfortunately."), and the discussion nor
> the patch do not get to the bottom of that.
> 
> Moreover, (essentially) this patch was already posted and rejected
> last year. Lennart then wrote:
> 
> "Well, most modules are loaded asynchronously from udev, so I fear this
> won't do much...
> 
> /etc/sysctl.d/ is really only for sysctl settings that exist all the
> time, and -- as a special exception -- for network-device related
> settings, which we set via a udev rule.
> 
> If people want to apply sysctls based on specific modules that are
> loaded, or based on specific hw that shows up (i.e. hw that isn't a
> network device) the only sane way is probably via a udev rule..."

The only problem with udev rules is that many system administrators
do not know enough how to write and how to place such rules.  What
about simple dependencies for such sysctl settings for specific modules.
Maybe by using a special name spavce below sysctl.d directories or a
special comment within the configure files below modules-load.d
directories.  Or similar like the unit configuration of services.

Werner

-- 
  "Having a smoking section in a restaurant is like having
  a peeing section in a swimming pool." -- Edward Burr


pgpzDOAVFMXRz.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 01/11] Ensure that systemd-sysctl.service is applied after modules are loaded

2014-06-19 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Jun 18, 2014 at 11:54:49AM +0200, Dr. Werner Fink wrote:
> On Mon, Jun 16, 2014 at 06:02:37PM +0200, Tom Gundersen wrote:
> > On Mon, Jun 16, 2014 at 5:19 PM, Frederic Crozat  wrote:
> > >
> > > See https://bugzilla.novell.com/show_bug.cgi?id=725412
> > 
> > Hm, that really does not look convincing. There is a fundamental
> > problem here (as Ludwig Nessel points out in the linked discussion:
> > "sysctl is broken by design unfortunately."), and the discussion nor
> > the patch do not get to the bottom of that.
> > 
> > Moreover, (essentially) this patch was already posted and rejected
> > last year. Lennart then wrote:
> > 
> > "Well, most modules are loaded asynchronously from udev, so I fear this
> > won't do much...
> > 
> > /etc/sysctl.d/ is really only for sysctl settings that exist all the
> > time, and -- as a special exception -- for network-device related
> > settings, which we set via a udev rule.
> > 
> > If people want to apply sysctls based on specific modules that are
> > loaded, or based on specific hw that shows up (i.e. hw that isn't a
> > network device) the only sane way is probably via a udev rule..."
> 
> The only problem with udev rules is that many system administrators
> do not know enough how to write and how to place such rules.  What
> about simple dependencies for such sysctl settings for specific modules.
> Maybe by using a special name spavce below sysctl.d directories or a
> special comment within the configure files below modules-load.d
> directories.  Or similar like the unit configuration of services.
I pushed the patch from Cristian Rodríguez, esentially identical to
this. I also added a small example to sysctl.d(5), loading bridge
module statically and setting some settings... and another one using
udev rules. At least the situation is documented now.

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