Bug 1075239 - procps sysctl doesn't work
procps sysctl doesn't work
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem
Current
armv7 Other
: P2 - High : Critical (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-09 19:10 UTC by Thomas Schäfer
Modified: 2018-03-02 18:09 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schäfer 2018-01-09 19:10:07 UTC
On my Raspberry PI 
Linux raspberrypi 4.1.19-1-rpi2 #1 SMP Sat Mar 12 14:22:44 UTC 2016 (03dcfb1) armv7l armv7l armv7l GNU/Linux

Name        : procps
Version     : 3.3.12
Release     : 9.1
Architecture: armv7hl

sysctl doesn't work.

e.g 
sysctl -w net.ipv4.conf.eth0.proxy_arp=1

echos 
net.ipv4.conf.eth0.proxy_arp = 1

but the setting is still the old one

using 
echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp

works, 

cat /proc/sys/net/ipv4/conf/eth0/proxy_arp
1
Comment 1 Patrick Schaaf 2018-01-20 18:11:47 UTC
Just noticed the same thing, fresh tumbleweed install on x86_64, /sbin/sysctl from package procps-3.3.12-9.2.x86_64

For the older, working versions, stracing a "sysctl -w net.ipv6.conf.all.disable_ipv6=1" shows:

open("/proc/sys/net/ipv6/conf/all/disable_ipv6", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
write(3, "1\n", 2)                      = 2

For the broken, tumbleweed-current /sbin/sysctl I instead see:

openat(AT_FDCWD, "/proc/sys/net/ipv6/conf/all/disable_ipv6", O_WRONLY|O_TRUNC) = 3
lseek(3, 1, SEEK_CUR)                   = 1
write(3, "0\0", 2)                      = 2

Observation: the broken one does not write a newline, but instead a nul byte.

Meanwhile, /usr/lib/systemd/systemd-sysctl as used during boot, keeps working fine (i.e. changes to /etc/sysctl.conf become active on next boot)
Comment 2 Thomas Schäfer 2018-01-20 21:55:59 UTC
you are right, it is not only the arm-platform involved.

But your hint that systemd works, is not useful for me. 

I need to change the setting also after the boot - with the "right" tool.

Of course I know the echo X > /proc/sys/... method as a workaround at the moment.

systemd-sysctl 

is no real replacement for sysctl.
Comment 3 Patrick Schaaf 2018-01-21 07:55:18 UTC
(In reply to Thomas Schäfer from comment #2)
> But your hint that systemd works, is not useful for me. 
> I need to change the setting also after the boot - with the "right" tool.

Sure! I did not want to imply systemd-sysctl would be a suitable replacement. Just meant that as an observation about what still works.

I also use "sysctl -p" in various places, e.g. rpm package POST scripts, to get freshly installed /etc/sysctl.d snippets activated. And all that fails now. I notice that even the openSUSE base system does that, e.g. the firewalld package contains a /etc/modprobe.d/firewalld-sysctls.conf calling out to /sbin/sysctl, which will be broken now, too.
Comment 4 Patrick Schaaf 2018-03-02 17:58:48 UTC
Testing with current Tumbleweed (x86_64), I find this bug is fixed.
Comment 5 Thomas Schäfer 2018-03-02 18:09:22 UTC
I can confirm that it works again.

tested on 

NAME="openSUSE Tumbleweed"
# VERSION="20180227
x86_64

and 

# VERSION="20180301"
ID=opensuse
armv7l