|00:53||jgee has left IRC (firstname.lastname@example.org, Quit: The Lounge - https://thelounge.github.io)|
|00:56||jgee has joined IRC (email@example.com)|
|02:50||lucascastro has joined IRC (firstname.lastname@example.org)|
|03:24||lucascastro has left IRC (email@example.com, Read error: Connection reset by peer)|
|03:24||lucascastro has joined IRC (firstname.lastname@example.org)|
|03:42||hark has joined IRC (email@example.com)|
|03:45||vagrantc has left IRC (vagrantc!~vagrant@unaffiliated/vagrantc, Quit: leaving)|
|04:14||nehemiah has left IRC (firstname.lastname@example.org)|
|06:18||Statler|Home has joined IRC (Statler|Home!~Georg@p5B30E5AB.dip0.t-ipconnect.de)|
fiesh: the "replace ip and ifconfig" try was unsuccessful, I still got no IP in eth0 after a day
So it sounds like a binary program is doing that, not a shell script
|06:48||Statler has joined IRC (Statler!~Georg@p5B30E444.dip0.t-ipconnect.de)|
|06:49||Statler|Home has left IRC (Statler|Home!~Georg@p5B30E5AB.dip0.t-ipconnect.de, Ping timeout: 240 seconds)|
fiesh: found it, it's in dracut, it sets the ip using the `ip addr valid_lft` parameter
the valid lifetime of this address; see section 5.5.4 of RFC 4862. When it expires, the address is removed by the kernel. Defaults to forever.
So it's the kernel itself that removes the address when the lease expires
I'll try to find a way around it, other than using a static IP, that is
Heh, it even shows up in `ip addr`
I think `ip addr change` from init-ltsp.d would be a good workaround. I'll implement it upstream in ltsp.
|07:26||quinox has left IRC (email@example.com, *.net *.split)|
|07:27||quinox has joined IRC (firstname.lastname@example.org)|
|07:59||alexxtasi[m] has left IRC (alexxtasi[m]!alexxtasim@gateway/shell/matrix.org/x-rjgszxqgqdajddla, Ping timeout: 276 seconds)|
fiesh: save this file as /usr/share/ltsp/init-ltsp.d/50-valid-lft, and then run ltsp-update-image: https://git.launchpad.net/ltsp/plain/client/share/ltsp/init-ltsp.d/50-valid-lft
With that in place, it should work even without a static IP
|08:08||alexxtasi[m] has joined IRC (alexxtasi[m]!alexxtasim@gateway/shell/matrix.org/x-dnnskzbzbqmlxuvt)|
alkisg: awesome, will give it a shot!
|08:44||ricotz has joined IRC (ricotz!~ricotz@ubuntu/member/ricotz)|
fiesh: the quick way to verify without waiting a day, is to run `ip a`, and see if "valid_lft" in the output says "forever", or some number of seconds; we want it to say "forever".
alkisg: i.e. this is good news: valid_lft forever preferred_lft forever
fiesh: without a static ip? Yey, good news :)
I'll leave it on for a day here too, as a test...
heh I'll do plenty of testing, I have to
bcg: hi, check my latest ltsp upstream commit, doesn't it affect you? Aren't you using dracut in Fedora? Or do you have it properly doing lease renewal? Can you tell me the output of `ip a` from a client?
|08:59||jgee has left IRC (email@example.com, Ping timeout: 256 seconds)|
|09:29||kjackal has left IRC (kjackal!~quassel@2a02:587:3106:a00:20f1:d03:a77a:e1a, Ping timeout: 256 seconds)|
|09:32||Statler has left IRC (Statler!~Georg@p5B30E444.dip0.t-ipconnect.de, Remote host closed the connection)|
|09:58||Statler_Office has joined IRC (Statler_Office!~Georg@gwrz3.lohn24.de)|
|10:06||kjackal has joined IRC (kjackal!~quassel@2a02:587:3106:a00:18ac:d8fd:c6f2:fc00)|
Dracut, yes. Properly doing lease renewal, yes with NetworkManager. I was also hit by this valid_lft problem when I didn't have NM running.
<LTSP x86_64> [root@pxe ~]# ip -4 -oneline addr show dev eth0
2: eth0 inet 10.4.3.162/24 brd 10.4.3.255 scope global dynamic eth0\ valid_lft 43146sec preferred_lft 43146sec
So I'll have to test your "And even if some distro has a proper udhcpc/dhclient setup" part.
That's easy, I just have to wait 43146sec :-)
Hmm... $DEVICE is not set.
For example 50-interfaces checks empty $DEVICE. Where is that set?
50-machine-id works fine with empty $DEVICE, as I have only one nic
|11:46||Faith has joined IRC (Faith!~Paty_@unaffiliated/faith)|
alkisg: so... could you wrap your latest commit with: if [ -n "$DEVICE" ]; then ... fi
bcg: how do you transfer the lease from the initramfs to nm? Is this done automatically by dracut, or in an ltsp script?
I've set DEVICE in a recent ltsp commit, let me find the commit number...
https://git.launchpad.net/ltsp/commit/?id=2a18cc5bdfaadac5b5e0ad5a41eda37e97b0caf3 => init-ltsp.d/02-initramfs-env
"+# Ensure the $DEVICE variable exists as some scripts rely on it."
$DEVICE was supposed to be Debian-specific, but I saw that other scripts were using it in the common init-ltsp.d dir, so I made it available to all
(so to make the latest commit work properly, you'd need to pull the previous commits as well)
ok, commit description "Update Gentoo codebase a bit." means non-Gentoo too then.
lease: I think NM will take new lease, which is equal to lease from dracut. But I'll check logs...
Some Gentoo scripts didn't actually do anything different than the common ones, and knipwim had them separate instead of just fixing the common ones to work in Gentoo
So, updating the Gentoo codebase involved fixing a few scripts in init-ltsp.d to work in more cases, yeah
Ah, so you're not reusing the lease, you're just requesting a new one, and the server just happens to send the same IP...
I think dracut has support for passing the dhclient lease, to be used by dhclient in the real system
I save the net.* files from dracut and they are available for NM, but I'll check...
At some point, I'd like to do things as dracut and systemd have them defined, and make thin wrappers for the rest initramfs-tools/non-systemd systems... because dracut and systemd do have proper provisioning for a lot of things that others do not, so it's a good interface to follow
They even support falling back to the initramfs on shutdown, so as to be even able to shut down networking before shut down
02-initramfs-env change emacs'ed in and rebooting...
2: eth0 inet 10.4.3.162/24 brd 10.4.3.255 scope global eth0\ valid_lft forever preferred_lft forever
now I can wait that 12h for renew
Mar 22 14:12:30 localhost dracut-initqueue: dhcp: PREINIT eth0 up
Mar 22 14:12:30 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6 (xid=0x44ab5171)
Mar 22 14:12:32 localhost dhclient: bound to 10.4.3.162 -- renewal in 19136 seconds.
that's from dracut. NM does *not* renew that on boot.
the question is, did it do that before?
yes it did.
Now with "forever" I don't have dhclient running, previously I did.
alkisg: I think your fix for this problem is wrong. When you take a lease from DHCP, you are allowed to use that lease only for specified time. After that time DHCP server can give that same IP to some other client.
DHCP server also gives you same IP again if you renew that lease within timelimit.
So using that IP lease "forever" is potential (maybe not real) IP conflict.
bcg: the DHCP specs say that it's not guaranteed to get the same IP
And of course if a server gives you a different one, which it's allowed to do, the client will hang
But if it's breaking the existing dracut / nm infrastructure, of course I'll need to change it
I'll revisit it tomorrow morning; thanks :)
No, it's not guaranteed. But again in real life it should be the same for renewing it.
So for example, if you wait 7 days it will be different, but not if you wait 1h.
I'm more afraid of IP conflict if I don't renew it. My terminals can be up for weeks without reboot.
I would say it's safer to start NM/dhclient to renew (possible IP change) than to keep it forever without renew (possible IP conflict).
bcg: in real life, most dhcp servers ping before re-assigning one IP, that's how ltsp is working so far in most installations...
IMHO that's actually safer than renewing, but of course both options should be supported
bcg: so network manager is actually managing your connection? You can see the network speed etc in the applet, and even disable the connection if you wish (of course hanging the client)?
Because in Ubuntu/Debian's implementation, we put the interface in unmanaged state, nm doesn't touch it at all...
That ping-check has to be enabled on dhcp server, by default it's off (at least on isc dhcpd)
I think it's on by default
(I think it was last time I checked but it was like 10 years ago...)
And I've never heard any router acting as a dhcp server, having that issue either...
Well, same for other way: I've never heard of IP change if you renew it within timelimit.
Yes, I see interface in nm applet.
Funny thing, there are possible problems if you renew it and problems if you don't.
That sounds like a config option.
I'm happy if you add config option for this. I'll change it to "renew", you keep it as "forever".
bcg: any way to do autodetection, so as to avoid introducing yet another configuration option? E.g. anything to grep for in dracut or nm configuration files or in /run or in etc?
I'll have a look tomorrow morning, but I don't have a fedora ltsp installation to check (do you have public ltsp packages?), so I'm not really sure what to look for
hmm... "systemctl is-enabled NetworkManager" and ... something.
My ltsp fat clients also have network-manager enabled, but it doesn't manage the card
Because we don't want the users to be able to click "disable networking" and hang their clients
Maybe you're just missing that bit?
So nm can manage wifi and other NICs, but not the boot nic
yes... something it /etc/sysconfig/network-scripts/ifcfg-$DEVICE then?
Sounds good; debian/ubuntu/gentoo don't even have that dir
i'll boot my test-terminal again...
I can also move it to debian and gentoo subdirs, so that it's not there in the common init-ltsp.d dir
common is fine, as long as there is "if something"
|14:36||nehemiah has joined IRC (firstname.lastname@example.org)|
<LTSP x86_64> [root@pxe ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Generated by dracut initrd
Check to *not* include NM_CONTROLLED=no there.
if /etc/sysconfig/network-scripts/ifcfg-$DEVICE does not exists || NM_CONTROLLED=no is there; then set to forever
|14:49||nehemiah has left IRC (email@example.com, Remote host closed the connection)|
well, for me simple "if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE ]; then forever" will work.
if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE ]; then
elif grep -q NM_CONTROLLED=no /etc/sysconfig/network-scripts/ifcfg-$DEVICE; then
|16:15||jgee has joined IRC (firstname.lastname@example.org)|
|17:11||lucascastro has left IRC (email@example.com, Remote host closed the connection)|
|17:32||lucascastro has joined IRC (firstname.lastname@example.org)|
|17:38||lucascastro has left IRC (email@example.com, Remote host closed the connection)|
|17:43||vagrantc has joined IRC (vagrantc!~vagrant@unaffiliated/vagrantc)|
|17:45||GodFather has joined IRC (GodFatherfirstname.lastname@example.org)|
|18:19||lucascastro has joined IRC (email@example.com)|
|18:27||adrianor1 has joined IRC (firstname.lastname@example.org)|
|18:30||adrianorg has left IRC (email@example.com, Ping timeout: 248 seconds)|
|18:36||lucascastro has joined IRC (firstname.lastname@example.org)|
|18:41||GodFather has left IRC (GodFatheremail@example.com, Ping timeout: 260 seconds)|
|19:05||adrianor1 is now known as adrianorg|
|19:06||lucascastro has left IRC (firstname.lastname@example.org, Read error: Connection reset by peer)|
|19:06||lucascastro has joined IRC (email@example.com)|
|19:31||lucas_ has joined IRC (firstname.lastname@example.org)|
|19:33||lucascastro has left IRC (email@example.com, Ping timeout: 264 seconds)|
|19:43||Statler_Office has left IRC (Statler_Office!~Georg@gwrz3.lohn24.de, Remote host closed the connection)|
|19:51||sutula has left IRC (firstname.lastname@example.org, Ping timeout: 264 seconds)|
|20:18||vagrantc has left IRC (vagrantc!~vagrant@unaffiliated/vagrantc, Quit: leaving)|
|20:23||lucas_ has left IRC (email@example.com, Remote host closed the connection)|
|20:42||sutula has joined IRC (firstname.lastname@example.org)|
|20:43||Faith has left IRC (Faith!~Paty_@unaffiliated/faith, Quit: Leaving)|
|21:21||lucascastro has joined IRC (email@example.com)|
|22:27||ricotz has left IRC (ricotz!~ricotz@ubuntu/member/ricotz, Quit: Leaving)|
|23:36||kjackal has left IRC (kjackal!~quassel@2a02:587:3106:a00:18ac:d8fd:c6f2:fc00, Ping timeout: 246 seconds)|
|23:36||kjackal has joined IRC (firstname.lastname@example.org)|