[SOLVED] net.ipv6.conf.*.use_tempaddr : not loaded at boot

Ask questions about Arch Linux ARM. Please search before making a new topic.

[SOLVED] net.ipv6.conf.*.use_tempaddr : not loaded at boot

Postby u12188 » Fri Feb 08, 2013 5:03 pm

Hi,

I've a RaspberryPi running on Arch, I'm tring to enable ipv6 tempaddr at boot time, but it seems there's something not working :

$this->bbcode_second_pass_code('', '[root@Carina ~]# sysctl -a | grep ipv6 | grep use_tempaddr
net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0
net.ipv6.conf.eth0.use_tempaddr = 0
net.ipv6.conf.ifb0.use_tempaddr = 0
net.ipv6.conf.ifb1.use_tempaddr = 0
net.ipv6.conf.lo.use_tempaddr = -1
[root@Carina ~]# systemctl reload systemd-sysctl
Failed to issue method call: Job type reload is not applicable for unit systemd-sysctl.service.
[root@Carina ~]# systemctl restart systemd-sysctl
[root@Carina ~]# sysctl -a | grep ipv6 | grep use_tempaddr
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
net.ipv6.conf.eth0.use_tempaddr = 2
net.ipv6.conf.ifb0.use_tempaddr = 0
net.ipv6.conf.ifb1.use_tempaddr = 0
net.ipv6.conf.lo.use_tempaddr = -1')
And after a reboot :
$this->bbcode_second_pass_code('', '[root@Carina ~]# sysctl -a | grep ipv6 | grep use_tempaddr
net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0
net.ipv6.conf.eth0.use_tempaddr = 0
net.ipv6.conf.ifb0.use_tempaddr = 0
net.ipv6.conf.ifb1.use_tempaddr = 0
net.ipv6.conf.lo.use_tempaddr = -1
[root@Carina ~]# less /lib/udev/rules.d/99-systemd.rules
[root@Carina ~]# /usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/eth0 --prefix=/proc/sys/net/ipv4/neigh/eth0 --prefix=/proc/sys/net/ipv6/conf/eth0 --prefix=/proc/sys/net/ipv6/neigh/eth0
[root@Carina ~]# sysctl -a | grep ipv6 | grep use_tempaddr net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0
net.ipv6.conf.eth0.use_tempaddr = 2
net.ipv6.conf.ifb0.use_tempaddr = 0
net.ipv6.conf.ifb1.use_tempaddr = 0
net.ipv6.conf.lo.use_tempaddr = -1')

I tried both using /etc/sysctl.conf and /etc/sysctl.d/myfile.

Today :
$this->bbcode_second_pass_code('', '
[root@Carina ~]# uname -a
Linux Carina.lxdr.net 3.6.11-5-ARCH+ #1 PREEMPT Tue Feb 5 05:34:07 UTC 2013 armv6l GNU/Linux
[root@Carina ~]# systemctl status systemd-sysctl
systemd-sysctl.service - Apply Kernel Variables
Loaded: loaded (/usr/lib/systemd/system/systemd-sysctl.service; static)
Active: active (exited) since Thu 1970-01-01 01:00:03 CET; 43 years 1 months ago
Docs: man:systemd-sysctl.service(8)
man:sysctl.d(5)
Process: 57 ExecStart=/usr/lib/systemd/systemd-sysctl (code=exited, status=0/SUCCESS)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
[root@Carina ~]# ls -la /etc/sysctl.d/ipv6-tempaddr.conf
-rwxr-xr-x 1 root root 104 Feb 2 13:41 /etc/sysctl.d/ipv6-tempaddr.conf
[root@Carina ~]# cat /etc/sysctl.d/ipv6-tempaddr.conf
net.ipv6.conf.default.use_tempaddr=2
net.ipv6.conf.all.use_tempaddr=2
net.ipv6.conf.eth0.use_tempaddr=2
[root@Carina ~]# sysctl -a | grep ipv6 | grep use_tempaddr
net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0
net.ipv6.conf.eth0.use_tempaddr = 0
[..]
')

Any idea ?
Probably something not loaded quick enough ?

Thanks in advance !
Last edited by u12188 on Sat Feb 09, 2013 10:59 pm, edited 1 time in total.
u12188
 
Posts: 5
Joined: Fri Feb 08, 2013 4:46 pm

Re: systemd / net.ipv6.conf.*.use_tempaddr : not loaded at b

Postby u12188 » Fri Feb 08, 2013 5:33 pm

Also if you have some idea to get some "debug"/error information about this at boot time, I take, as I don't know how to do this properly :?
For eg, content of /proc/sys/net/ipv6/conf/eth0 when booting.
u12188
 
Posts: 5
Joined: Fri Feb 08, 2013 4:46 pm

Re: systemd / net.ipv6.conf.*.use_tempaddr : not loaded at b

Postby pepedog » Fri Feb 08, 2013 8:21 pm

I tried the tmpfiles.d method, it doesn't work
https://wiki.archlinux.org/index.php/Systemd#Temporary_files
Echo "2" > proc location does
Maybe have a POST_UP in the netcfg interface file?
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: systemd / net.ipv6.conf.*.use_tempaddr : not loaded at b

Postby u12188 » Fri Feb 08, 2013 10:29 pm

$this->bbcode_second_pass_code('', '
[root@Carina ~]# cat /root/test.sh
#!/bin/sh

/bin/ls -laR /proc/sys/net/ipv6/conf/ > /root/$1.ls
/usr/bin/cat /proc/sys/net/ipv6/conf/eth0/use_tempaddr > /root/$1_1.eth0
/usr/bin/echo 2 > /proc/sys/net/ipv6/conf/eth0/use_tempaddr
/usr/bin/cat /proc/sys/net/ipv6/conf/eth0/use_tempaddr > /root/$1_2.eth0

[root@Carina ~]# systemctl status systemd-sysctl
systemd-sysctl.service - Apply Kernel Variables
Loaded: loaded (/usr/lib/systemd/system/systemd-sysctl.service; static)
Active: failed (Result: exit-code) since Thu 1970-01-01 01:00:03 CET; 43 years 1 months ago
Docs: man:systemd-sysctl.service(8)
man:sysctl.d(5)
Process: 57 ExecStartPre=/bin/sh /root/test.sh pre (code=exited, status=1/FAILURE)

Jan 01 01:00:03 Carina.lxdr.net systemd[1]: systemd-sysctl.service: control process exited, code=exited status=1
Jan 01 01:00:04 Carina.lxdr.net sh[57]: /bin/ls: cannot access /proc/sys/net/ipv6/conf/: No such file or directory
Jan 01 01:00:04 Carina.lxdr.net sh[57]: /usr/bin/cat: /proc/sys/net/ipv6/conf/eth0/use_tempaddr: No such file or directory
Jan 01 01:00:04 Carina.lxdr.net sh[57]: /root/test.sh: line 5: /proc/sys/net/ipv6/conf/eth0/use_tempaddr: No such file or directory
Jan 01 01:00:04 Carina.lxdr.net sh[57]: /usr/bin/cat: /proc/sys/net/ipv6/conf/eth0/use_tempaddr: No such file or directory
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
')

ls -laR /proc/sys/net/ as ExecStartPre
$this->bbcode_second_pass_code('', '
/proc/sys/net/:
total 0
dr-xr-xr-x 1 root root 0 Jan 1 01:00 .
dr-xr-xr-x 1 root root 0 Jan 1 01:00 ..
dr-xr-xr-x 1 root root 0 Jan 1 01:00 core
dr-xr-xr-x 1 root root 0 Jan 1 01:00 ipv4
dr-xr-xr-x 1 root root 0 Jan 1 01:00 netfilter
dr-xr-xr-x 1 root root 0 Jan 1 01:00 unix
')
and after :
$this->bbcode_second_pass_code('', '[root@Carina ~]# ls -la /proc/sys/net/
total 0
dr-xr-xr-x 1 root root 0 Jan 1 1970 .
dr-xr-xr-x 1 root root 0 Jan 1 1970 ..
dr-xr-xr-x 1 root root 0 Jan 1 1970 core
dr-xr-xr-x 1 root root 0 Jan 1 1970 ipv4
dr-xr-xr-x 1 root root 0 Feb 8 22:59 ipv6
dr-xr-xr-x 1 root root 0 Jan 1 1970 netfilter
dr-xr-xr-x 1 root root 0 Jan 1 1970 unix
')

IPv6 seems to be included in the kernel, why is systemd trying to apply sysctl rules while modules are not loaded ? :/
Is it a normal behaviour ?

2012 topic about the same subject .. viewtopic.php?f=9&t=2527 .. :(
Doesn't make me confident about a proper solution for this problem :|

Also I tried to apply a Pre sleep command :
$this->bbcode_second_pass_code('', '[root@Carina ~]# systemctl status systemd-sysctl
systemd-sysctl.service - Apply Kernel Variables
Loaded: loaded (/usr/lib/systemd/system/systemd-sysctl.service; static)
Active: active (exited) since Thu 1970-01-01 01:00:18 CET; 43 years 1 months ago
Docs: man:systemd-sysctl.service(8)
man:sysctl.d(5)
Process: 108 ExecStart=/usr/lib/systemd/systemd-sysctl (code=exited, status=0/SUCCESS)
Process: 57 ExecStartPre=/usr/bin/sleep 15 (code=exited, status=0/SUCCESS)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
')
But even waiting 15secs, IPv6 seems to be loaded after .. (or both StartPre and Start are started at the same time ?)

Netcfg seems to be another package, that I shouldn't need, but thanks for the idea anyway.
u12188
 
Posts: 5
Joined: Fri Feb 08, 2013 4:46 pm

Re: systemd / net.ipv6.conf.*.use_tempaddr : not loaded at b

Postby pepedog » Sat Feb 09, 2013 12:10 am

I just tried this and setting takes effect
$this->bbcode_second_pass_code('', 'echo "ipv6" > /etc/modules-load.d/ipv6.conf
echo "w /proc/sys/net/ipv6/conf/eth0/use_tempaddr - - - - 2" > /etc/tmpfiles.d/tempaddr.conf
sync
reboot
cat /proc/sys/net/ipv6/conf/eth0/use_tempaddr
2')
Or have I got the wrong end of the stick?
It's bogus you have to rely on loading module, but have seen that some hardware has to have this too (esp wireless)
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: systemd / net.ipv6.conf.*.use_tempaddr : not loaded at b

Postby u12188 » Sat Feb 09, 2013 9:55 pm

As ipv6 is automatically loaded, I didn't thought to indicate that I want ipv6 module, but thanks, actually it works only doing
$this->bbcode_second_pass_code('', 'echo "ipv6" > /etc/modules-load.d/ipv6.conf
sync && reboot')

$this->bbcode_second_pass_code('', '[root@Carina ~]# sysctl -a | grep ipv6 | grep tempaddr
net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0
net.ipv6.conf.eth0.use_tempaddr = 2
')

Between 2 reboots I got all 3 set at 2, but I couln't reproduce it and I'm not sure it was not a command I passed that set them.

..

A few test later, I'm finally completing the module load with your tmpfiles.d method to have all wanted values set :
$this->bbcode_second_pass_code('', '[root@Carina ~]# cat /etc/modules-load.d/ipv6.conf
ipv6

[root@Carina ~]# cat /etc/sysctl.d/ipv6-tempaddr.conf
; See /etc/tmpfiles.d/ipv6-tempaddr.conf
; and /etc/modules-load.d/ipv6.conf
; because sysctl load is "buggy"
net.ipv6.conf.default.use_tempaddr=2
net.ipv6.conf.all.use_tempaddr=2
net.ipv6.conf.eth0.use_tempaddr=2

[root@Carina ~]# cat /etc/tmpfiles.d/ipv6-tempaddr.conf
w /proc/sys/net/ipv6/conf/default/use_tempaddr - - - - 2
w /proc/sys/net/ipv6/conf/all/use_tempaddr - - - - 2
w /proc/sys/net/ipv6/conf/eth0/use_tempaddr - - - - 2

[root@Carina ~]# sysctl -a | grep ipv6 | grep tempaddr
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
net.ipv6.conf.eth0.use_tempaddr = 2
')

So, thank you pepedog, one more step to configure my Pi, and this kind of problem is not encouraging.

Also, shouldn't this king of problem be reported somewhere ? Should I ? Where ?
u12188
 
Posts: 5
Joined: Fri Feb 08, 2013 4:46 pm

Re: systemd / net.ipv6.conf.*.use_tempaddr : not loaded at b

Postby pepedog » Sat Feb 09, 2013 10:46 pm

I have no idea, problem seems to have been around a while
This is interesting, without conclusion
https://bugzilla.redhat.com/show_bug.cgi?id=250919
Google throws a lot with tempaddr load module ipv6
Change original post as solved?
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: [SOLVED] net.ipv6.conf.*.use_tempaddr : not loaded at bo

Postby u12188 » Sat Feb 09, 2013 11:05 pm

Editing subject ? Done ;)

Thank you again helping me with this issue, I'll now play with systemd services files, as I want to have multiple vsftpd instances and default arch systemd units can't handle that :roll:
For anyone interested : http://superuser.com/questions/393423/t ... and-vsftpd
u12188
 
Posts: 5
Joined: Fri Feb 08, 2013 4:46 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 10 guests