IRC chat logs for #ltsp on irc.libera.chat (webchat)


Channel log from 22 March 2018   (all times are UTC)

00:53jgee has left IRC (jgee!~jgee@181.56.72.152, Quit: The Lounge - https://thelounge.github.io)
00:56jgee has joined IRC (jgee!~jgee@181.56.72.152)
02:50lucascastro has joined IRC (lucascastro!~lucas@201.182.221.14)
03:24lucascastro has left IRC (lucascastro!~lucas@201.182.221.14, Read error: Connection reset by peer)
03:24lucascastro has joined IRC (lucascastro!~lucas@201.182.221.14)
03:42hark has joined IRC (hark!~hark@yavin.puscii.nl)
03:45vagrantc has left IRC (vagrantc!~vagrant@unaffiliated/vagrantc, Quit: leaving)
04:14nehemiah has left IRC (nehemiah!~nehemiah@137.26.129.150)
06:18Statler|Home has joined IRC (Statler|Home!~Georg@p5B30E5AB.dip0.t-ipconnect.de)
06:34
<alkisg>
fiesh: the "replace ip and ifconfig" try was unsuccessful, I still got no IP in eth0 after a day
06:38
So it sounds like a binary program is doing that, not a shell script
06:48Statler has joined IRC (Statler!~Georg@p5B30E444.dip0.t-ipconnect.de)
06:49Statler|Home has left IRC (Statler|Home!~Georg@p5B30E5AB.dip0.t-ipconnect.de, Ping timeout: 240 seconds)
06:50
<alkisg>
fiesh: found it, it's in dracut, it sets the ip using the `ip addr valid_lft` parameter
06:50
valid_lft LFT
06:50
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.
06:50
So it's the kernel itself that removes the address when the lease expires
06:51
I'll try to find a way around it, other than using a static IP, that is
06:54
Heh, it even shows up in `ip addr`
07:05
I think `ip addr change` from init-ltsp.d would be a good workaround. I'll implement it upstream in ltsp.
07:26quinox has left IRC (quinox!~quinox@ghost.qtea.nl, *.net *.split)
07:27quinox has joined IRC (quinox!~quinox@ghost.qtea.nl)
07:59alexxtasi[m] has left IRC (alexxtasi[m]!alexxtasim@gateway/shell/matrix.org/x-rjgszxqgqdajddla, Ping timeout: 276 seconds)
08:01
<alkisg>
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
08:02
With that in place, it should work even without a static IP
08:08alexxtasi[m] has joined IRC (alexxtasi[m]!alexxtasim@gateway/shell/matrix.org/x-dnnskzbzbqmlxuvt)
08:20
<fiesh>
alkisg: awesome, will give it a shot!
08:44ricotz has joined IRC (ricotz!~ricotz@ubuntu/member/ricotz)
08:46
<alkisg>
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".
08:49
<fiesh>
alkisg: i.e. this is good news: valid_lft forever preferred_lft forever
08:49
:)
08:49
<alkisg>
fiesh: without a static ip? Yey, good news :)
08:49
I'll leave it on for a day here too, as a test...
08:49
<fiesh>
\o/
08:49
heh I'll do plenty of testing, I have to
08:51
<alkisg>
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:59jgee has left IRC (jgee!~jgee@181.56.72.152, Ping timeout: 256 seconds)
09:29kjackal has left IRC (kjackal!~quassel@2a02:587:3106:a00:20f1:d03:a77a:e1a, Ping timeout: 256 seconds)
09:32Statler has left IRC (Statler!~Georg@p5B30E444.dip0.t-ipconnect.de, Remote host closed the connection)
09:58Statler_Office has joined IRC (Statler_Office!~Georg@gwrz3.lohn24.de)
10:06kjackal has joined IRC (kjackal!~quassel@2a02:587:3106:a00:18ac:d8fd:c6f2:fc00)
10:26
<bcg>
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.
10:26
<LTSP x86_64> [root@pxe ~]# ip -4 -oneline addr show dev eth0
10:26
2: eth0 inet 10.4.3.162/24 brd 10.4.3.255 scope global dynamic eth0\ valid_lft 43146sec preferred_lft 43146sec
10:29
So I'll have to test your "And even if some distro has a proper udhcpc/dhclient setup" part.
10:29
That's easy, I just have to wait 43146sec :-)
11:36
Hmm... $DEVICE is not set.
11:41
For example 50-interfaces checks empty $DEVICE. Where is that set?
11:42
50-machine-id works fine with empty $DEVICE, as I have only one nic
11:46Faith has joined IRC (Faith!~Paty_@unaffiliated/faith)
11:47
<bcg>
client/Debian/share/initramfs-tools/scripts/init-premount/udhcp ?
11:48
alkisg: so... could you wrap your latest commit with: if [ -n "$DEVICE" ]; then ... fi
11:55
<alkisg>
bcg: how do you transfer the lease from the initramfs to nm? Is this done automatically by dracut, or in an ltsp script?
11:56
I've set DEVICE in a recent ltsp commit, let me find the commit number...
11:57
https://git.launchpad.net/ltsp/commit/?id=2a18cc5bdfaadac5b5e0ad5a41eda37e97b0caf3 => init-ltsp.d/02-initramfs-env
11:57
"+# Ensure the $DEVICE variable exists as some scripts rely on it."
11:57
$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
11:59
(so to make the latest commit work properly, you'd need to pull the previous commits as well)
12:06
<bcg>
ok, commit description "Update Gentoo codebase a bit." means non-Gentoo too then.
12:07
lease: I think NM will take new lease, which is equal to lease from dracut. But I'll check logs...
12:08
<alkisg>
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
12:08
So, updating the Gentoo codebase involved fixing a few scripts in init-ltsp.d to work in more cases, yeah
12:09
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...
12:09
I think dracut has support for passing the dhclient lease, to be used by dhclient in the real system
12:10
<bcg>
I save the net.* files from dracut and they are available for NM, but I'll check...
12:11
<alkisg>
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
12:11
They even support falling back to the initramfs on shutdown, so as to be even able to shut down networking before shut down
12:13
<bcg>
02-initramfs-env change emacs'ed in and rebooting...
12:13
2: eth0 inet 10.4.3.162/24 brd 10.4.3.255 scope global eth0\ valid_lft forever preferred_lft forever
12:14
now I can wait that 12h for renew
12:16
boot logs:
12:16
Mar 22 14:12:30 localhost dracut-initqueue[310]: dhcp: PREINIT eth0 up
12:16
Mar 22 14:12:30 localhost dhclient[378]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6 (xid=0x44ab5171)
12:16
...
12:16
Mar 22 14:12:32 localhost dhclient[378]: bound to 10.4.3.162 -- renewal in 19136 seconds.
12:16
that's from dracut. NM does *not* renew that on boot.
12:17
the question is, did it do that before?
12:19
yes it did.
12:24
Now with "forever" I don't have dhclient running, previously I did.
12:36
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.
12:36
DHCP server also gives you same IP again if you renew that lease within timelimit.
12:37
So using that IP lease "forever" is potential (maybe not real) IP conflict.
12:37
<alkisg>
bcg: the DHCP specs say that it's not guaranteed to get the same IP
12:37
And of course if a server gives you a different one, which it's allowed to do, the client will hang
12:38
But if it's breaking the existing dracut / nm infrastructure, of course I'll need to change it
12:38
I'll revisit it tomorrow morning; thanks :)
12:39
<bcg>
No, it's not guaranteed. But again in real life it should be the same for renewing it.
12:39
So for example, if you wait 7 days it will be different, but not if you wait 1h.
12:41
I'm more afraid of IP conflict if I don't renew it. My terminals can be up for weeks without reboot.
12:44
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).
12:53
<alkisg>
bcg: in real life, most dhcp servers ping before re-assigning one IP, that's how ltsp is working so far in most installations...
12:53
IMHO that's actually safer than renewing, but of course both options should be supported
12:55
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)?
12:55
Because in Ubuntu/Debian's implementation, we put the interface in unmanaged state, nm doesn't touch it at all...
12:55
<bcg>
That ping-check has to be enabled on dhcp server, by default it's off (at least on isc dhcpd)
12:57
<alkisg>
I think it's on by default
12:57
(I think it was last time I checked but it was like 10 years ago...)
12:58
And I've never heard any router acting as a dhcp server, having that issue either...
12:59
<bcg>
Well, same for other way: I've never heard of IP change if you renew it within timelimit.
12:59
Yes, I see interface in nm applet.
13:02
Funny thing, there are possible problems if you renew it and problems if you don't.
13:02
That sounds like a config option.
13:13
I'm happy if you add config option for this. I'll change it to "renew", you keep it as "forever".
14:30
<alkisg>
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?
14:32
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
14:32
<bcg>
hmm... "systemctl is-enabled NetworkManager" and ... something.
14:33
<alkisg>
My ltsp fat clients also have network-manager enabled, but it doesn't manage the card
14:33
Because we don't want the users to be able to click "disable networking" and hang their clients
14:33
Maybe you're just missing that bit?
14:33
So nm can manage wifi and other NICs, but not the boot nic
14:34
<bcg>
yes... something it /etc/sysconfig/network-scripts/ifcfg-$DEVICE then?
14:34
<alkisg>
Sounds good; debian/ubuntu/gentoo don't even have that dir
14:35
<bcg>
i'll boot my test-terminal again...
14:35
<alkisg>
I can also move it to debian and gentoo subdirs, so that it's not there in the common init-ltsp.d dir
14:35
<bcg>
common is fine, as long as there is "if something"
14:36
<alkisg>
OK
14:36nehemiah has joined IRC (nehemiah!~nehemiah@137.26.129.150)
14:37
<bcg>
<LTSP x86_64> [root@pxe ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
14:37
# Generated by dracut initrd
14:37
NAME="eth0"
14:37
HWADDR="52:54:00:5e:92:19"
14:37
ONBOOT=yes
14:37
NETBOOT=yes
14:37
UUID="84d4e925-7440-4b5b-9d7d-a167394105fb"
14:37
IPV6INIT=yes
14:37
BOOTPROTO=dhcp
14:37
TYPE=Ethernet
14:40
Check to *not* include NM_CONTROLLED=no there.
14:41
if /etc/sysconfig/network-scripts/ifcfg-$DEVICE does not exists || NM_CONTROLLED=no is there; then set to forever
14:49nehemiah has left IRC (nehemiah!~nehemiah@137.26.129.150, Remote host closed the connection)
14:53
<bcg>
well, for me simple "if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE ]; then forever" will work.
14:56
or:
14:56
if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE ]; then
14:56
FOREVER=1
14:56
elif grep -q NM_CONTROLLED=no /etc/sysconfig/network-scripts/ifcfg-$DEVICE; then
14:56
FOREVER=1
14:56
else
14:56
FOREVER=0
14:56
fi
16:15jgee has joined IRC (jgee!~jgee@181.56.72.152)
17:11lucascastro has left IRC (lucascastro!~lucas@201.182.221.14, Remote host closed the connection)
17:32lucascastro has joined IRC (lucascastro!~lucas@200.141.207.18)
17:38lucascastro has left IRC (lucascastro!~lucas@200.141.207.18, Remote host closed the connection)
17:43vagrantc has joined IRC (vagrantc!~vagrant@unaffiliated/vagrantc)
17:45GodFather has joined IRC (GodFather!~rcc@198.251.97.125)
18:19lucascastro has joined IRC (lucascastro!~lucas@189.90.45.82.jupiter.com.br)
18:27adrianor1 has joined IRC (adrianor1!~adrianorg@177.156.60.165)
18:30adrianorg has left IRC (adrianorg!~adrianorg@187.115.107.229, Ping timeout: 248 seconds)
18:36lucascastro has joined IRC (lucascastro!~lucas@201.182.221.154)
18:41GodFather has left IRC (GodFather!~rcc@198.251.97.125, Ping timeout: 260 seconds)
19:05adrianor1 is now known as adrianorg
19:06lucascastro has left IRC (lucascastro!~lucas@201.182.221.154, Read error: Connection reset by peer)
19:06lucascastro has joined IRC (lucascastro!~lucas@201.182.221.154)
19:31lucas_ has joined IRC (lucas_!~lucas@138.68.106.79)
19:33lucascastro has left IRC (lucascastro!~lucas@201.182.221.154, Ping timeout: 264 seconds)
19:43Statler_Office has left IRC (Statler_Office!~Georg@gwrz3.lohn24.de, Remote host closed the connection)
19:51sutula has left IRC (sutula!~sutula@207-118-154-150.dyn.centurytel.net, Ping timeout: 264 seconds)
20:18vagrantc has left IRC (vagrantc!~vagrant@unaffiliated/vagrantc, Quit: leaving)
20:23lucas_ has left IRC (lucas_!~lucas@138.68.106.79, Remote host closed the connection)
20:42sutula has joined IRC (sutula!~sutula@207-118-154-150.dyn.centurytel.net)
20:43Faith has left IRC (Faith!~Paty_@unaffiliated/faith, Quit: Leaving)
21:21lucascastro has joined IRC (lucascastro!~lucas@201.182.221.14)
22:27ricotz has left IRC (ricotz!~ricotz@ubuntu/member/ricotz, Quit: Leaving)
23:36kjackal has left IRC (kjackal!~quassel@2a02:587:3106:a00:18ac:d8fd:c6f2:fc00, Ping timeout: 246 seconds)
23:36kjackal has joined IRC (kjackal!~quassel@athedsl-237682.home.otenet.gr)