Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #84348
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Newsgroups | linux.debian.bugs.dist, linux.debian.kernel |
| Subject | Bug#1085160: linux-sysctl-defaults: apply setting after installation |
| Date | 2024-10-24 02:10 +0200 |
| Message-ID | <JATAl-3MZc-1@gated-at.bofh.it> (permalink) |
| References | <JxSAN-1Pjy-3@gated-at.bofh.it> <JxSAN-1Pjy-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Cross-posted to 2 groups.
[Multipart message — attachments visible in raw view] - view raw
Control: tag -1 moreinfo
On Tue, 2024-10-15 at 19:04 +0300, sergio wrote:
> Package: linux-sysctl-defaults
> Version: 4.10.1
> Severity: normal
>
> Dear Maintainer,
>
> please call `sysctl -p /usr/lib/sysctl.d/50-default.conf` after installation
Running that command is definitely not a good idea, as it will ignore
any other configuration files which should override the default
settings.
This was discussed at
<https://salsa.debian.org/kernel-team/linux-base/-/merge_requests/12#note_500942>
and there was a deliberate decision then not to do this.
Noah Meyerhans wrote:
> +1 Not doing so is leading to confusing/broken behavior during
> upgrades. By deferring the application of the sysctl settings until
> reboot, we're effectively leaving the system in a half-upgraded state
> where applications that depend on sysctls set here will misbehave for
> confusing reasons until a reboot happens.
>
> See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085289 and
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1084135 for instances
> of issues caused during upgrades.
So it sounds like we do actually need to apply configuration on
installation, just not precisely as requested.
Looking at the postinst scripts of some other packages that install
sysctl configuration, I can see a diversity of approaches to this:
- bubblewrap runs "sysctl --pattern <sysctl-name>" which seems
reasonable for a single sysctl but would be a pain to keep in sync
with the configuration file.
- tracker-miner-fs runs "systemd-sysctl <filename>" which does not
work without systemd and seems to have the same problem I mentioned
above.
Whatever is decided for linux-sysctl-defaults should ideally be
implemented consistently across the other packages.
Would this work:
1. As discussed in the GitLab MR, systemd implements a file trigger on
sysctl configuration files.
2. Either:
(a) procps implements a similar trigger, but makes it a no-op when
systemd is pid 1.
(b) linux-sysctl-defaults postinst does:
- if systemd is pid 1, nothing;
- otherwise, if sysctl is installed, "sysctl --system";
- otherwise, nothing.
?
I don't know how well those file triggers would interact with existing
postinst scripts for the other packages.
Ben.
--
Ben Hutchings
Klipstein's 4th Law of Prototyping and Production:
A fail-safe circuit will destroy others.
Back to linux.debian.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug#1085160: linux-sysctl-defaults: apply setting after installation sergio <sergio+it@outerface.net> - 2024-10-15 18:30 +0200
Processed: Re: Bug#1085160: linux-sysctl-defaults: apply setting after installation "Debian Bug Tracking System" <owner@bugs.debian.org> - 2024-10-18 23:10 +0200
Bug#1085160: linux-sysctl-defaults: apply setting after installation Noah Meyerhans <noahm@debian.org> - 2024-10-18 23:10 +0200
Bug#1085160: linux-sysctl-defaults: apply setting after installation Ben Hutchings <ben@decadent.org.uk> - 2024-10-24 02:10 +0200
Bug#1085160: linux-sysctl-defaults: apply setting after installation Craig Small <csmall@debian.org> - 2024-10-24 12:30 +0200
Bug#1085160: linux-sysctl-defaults: apply setting after installation Ben Hutchings <ben@decadent.org.uk> - 2024-10-30 20:10 +0100
Bug#1085160: linux-sysctl-defaults: apply setting after installation Craig Small <csmall@debian.org> - 2024-11-04 11:50 +0100
Processed: Re: Bug#1085160: linux-sysctl-defaults: apply setting after installation "Debian Bug Tracking System" <owner@bugs.debian.org> - 2024-10-24 02:10 +0200
Processed: Re: linux-sysctl-defaults: apply setting after installation "Debian Bug Tracking System" <owner@bugs.debian.org> - 2024-11-25 00:30 +0100
Bug#1085160: linux-sysctl-defaults: apply setting after installation Ben Hutchings <ben@decadent.org.uk> - 2024-11-25 00:30 +0100
csiph-web