Re: ANN: NetworkManager 0.9.9.95 (0.9.10-beta1) released




On Tue, 2014-06-17 at 20:51 +0200, Thomas Haller wrote:
On Tue, 2014-06-17 at 20:31 +0200, Michael Biebl wrote:
Am 17.06.2014 18:31, schrieb Dan Williams:
Separate directories were used for pre-up/pre-down because these events
block state changes internally.  NM will not advance a device from
ACTIVATED -> DISCONNECTED (pre-down) or IP_CHECK -> SECONDARIES (pre-up)
until all the scripts execute.

Unfortunately, many scripts don't bother checking the action and just
run stuff, and the goal was to ensure that couldn't adversely impact the
user experience on upgrade.

I checked the complete Debian archive and there is only one package
installing a dispatcher script which doesn't check for the $action
parameter, so is potentially affected. Easy to fix.

You were talking about many scripts doing it wrong? Do you have a list
of such packages/scripts?

(without having any numbers at hand) I would suspect that many scripts
are just cooked-up by users and not part of other packages. Further I
would guess that these scripts are often of lower quality.


I get where you're coming from, but there will always be ways for people
to shoot themselves in the foot and I'd rather prefer consistency here
then convenience for lazy script writers.


I still think, that these separate directories are a good idea.

Also note that all the scripts that exists to date don't expect these
events. They existed without them for years. So probably most script
will continue not to do anything useful with then (if not harmful).

By having separate directories we actually save such invocations
(because NM will not even make the call if the directory contains no
scripts). I am trying to make a performance argument here, although
arguably it might not matter to call a few scripts needlessly.

Yeah, the performance argument was the second part...  Since calling the
dispatcher takes time in-and-of-itself, and NM is waiting for that to
complete with these new events, not having to call the dispatcher saves
some time and speeds up your network connection.  It's a lot easier to
detect that scripts do/do not need to be called with separate
directories.

But possibly more, since a lot of scripts are shell, even if there were one
or two scripts that ignored the action, you're still taking some time to
fork & exec each script and that's also non-trivial time, especially if
you have spinning media.  On my SSD-based system, even the "dhcp4-change"
event which nothing handles takes between 75 and 100ms to just do nothing.

Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]