/srv/irclogs.ubuntu.com/2022/06/27/#netplan.txt

mohaWe have Microsoft DHCP server that identifies Ubuntu machines with a long string as unique ID, but these strings change per restart, resulting new IP assigning to the machine. If we change the identifier in netplan settings to mac, it won't change the IP anymore; Is there any solution to use default setting, but not change in the unique ID?07:40
slyonmoha: configuring the "dhcp-identifier" setting in netplan YAML is the recommended way to do this (as you already did)08:31
slyonwhat it does is setting systemd-networkd's "ClientIdentifier=" field (https://systemd.network/systemd.network.html#ClientIdentifier=)08:32
slyonsd-networkd provides one more option (duid-only) if you want to give this a try, e.g. using a sd-networkd override config. But I'd recommend sticking with netplan's "dhcp-identifier: mac"08:32
HumbleDeerFound'em. :)14:25
HumbleDeerI had a feeling people moved to Libera with it becoming a home to a lot of projects.14:26
HumbleDeerDo people still happen to provide guidance on using Netplan over here?14:26
HumbleDeerI'm currently in a bit of a sticky situation after using some of the older tools that were prevalent before Ubuntu started using Netplan and I suspect I may have caused a service that Netplan commands to go rogue and try things by itself.14:27
HumbleDeerAs a consequence, I'm unable to get wifi working, after it having worked for some miraculous reason.14:27
HumbleDeerI initially went into grub's startup linux defaults to add the tag/switch that enabled the "ifnames" thing, because I wanted wlan0 back. But then that didn't work out all too well when it broke Ethernet. miraculously, wireless did work after I had discovered that my installed gdm3 & LXDE actually worked, somewhat, which was for the purpose of14:28
HumbleDeertrying VNC.14:28
HumbleDeerThe wireless worked after configuring through the GUI, though.14:28
slyonsure. we'll try our best to help14:29
HumbleDeerI then instructed the networkd service to restart, and ever since, it has not worked for wireless again. After some mucking, I ended up reverting the GRUB file change I made, where I now have everything back to how it used to be. Ethernet works again, but I can not for the life of me figure out why wlan won't work, despite having literally copied14:29
HumbleDeerone of the example files :(14:29
HumbleDeerThank you! I've described what I've done over the past day and a half, but I may have missed something.14:30
slyonwould you mind sharing your netplan config from /etc/netplan/*.yaml as a first step?14:30
HumbleDeerYes. I'm in the process of posting it to a bin14:30
slyonalso, do you want to use your wifi via GUI (i.e. NetworkManager) or CLI?14:31
HumbleDeerhttps://www.toptal.com/developers/hastebin/ceqezowegu.yaml14:33
HumbleDeerI intend to use this only via CLI.14:33
HumbleDeerThe window manager and desktop being installed was merely for trying VNC, which I hadn't completed, and was not intending to complete.14:33
HumbleDeerWireless says "NetworkManager" as renderer there, but that's only an addition from about fifteen minutes ago. I've tried it extensively on just networked, and that was a last attempt at solving it myself.14:34
HumbleDeerThis is my ifconfig output: https://www.toptal.com/developers/hastebin/raw/kariwuremo14:36
HumbleDeerI would have reinstalled Ubuntu Server if it wasn't for the fact that I know this will happen again in the future, and I would like to know what's up and how to troubleshoot this :)14:37
slyonif you're using it via CLI only, I'd recommend removing the "renderer: NetworkManager" stanza and let it all be managed by systemd-networkd/wpa_supplicant. Furthermore, I'd recommend removing the empty "match: {}" stanza, as this is a special case not needed if you're only applying this config to wlx00e04c818b0114:40
HumbleDeerOkay. Those were both applied at last before I came here. Unfortunately, it didn't work without those either.14:41
HumbleDeerI have removed them from the active config. :)14:42
slyonso if you apply this configuraiton ('netplan try/apply') what's the status of 'networkctl' and 'systemctl status netplan-wpa-*.service'?14:44
HumbleDeernetworkctl: eno1 is working and configured, wlx is stuck on 'configuring'14:45
HumbleDeerthe other command returns this: https://www.toptal.com/developers/hastebin/raw/waworakuke14:46
HumbleDeerWhich seems helpful. This was a command I didn't know about yet.14:46
HumbleDeerRunning `sudo cat /run/wpa_supplicant/wlx00e04c818b01` returns a file not found14:47
slyondo you have the wpasupplicant package installed? – apparently yes. And it seems to be configured somewhere outside of netplan...14:47
HumbleDeerIt is installed, yes. And yes, it seems to be. I suspect that's the issue.14:48
HumbleDeerI do not know where wpa_supplicant stores files beyond just /etc/wpa_supplicant.conf14:48
slyonwhich files do you have in /run/systemd/system/systemd-networkd.service.wants/ ? especially the *wpa* units?14:48
HumbleDeersudo ls /run/systemd/system/systemd-networkd.service.wants/ | grep *wpa*14:49
HumbleDeerreturns nothing14:49
HumbleDeerIn fact, there's nothing there at all14:49
slyoninteresting... there should be at least the netplan-wpa-wlx00e04c818b01.service unit/link that shows up in the logs pasted above... (after running 'netplan apply' or 'netplan generate')14:52
slyondoes running `ps ax | grep wpa` give any clue about an additional wpa_supplicant daemon?14:53
HumbleDeerI see one line saying14:54
HumbleDeer> 868 ?        Ss     0:00 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant14:54
HumbleDeerThe other line is about grep and colour14:54
HumbleDeeris netplan generate or netplan apply supposed to run fine without root?14:55
HumbleDeerI just re-ran netplan generate and the file mentioned *is* there, along with an ovs cleanup service file14:55
slyonno, both need root privileges14:56
slyonokay... I think this 868 wpa_supplicant process shouldn't be there and is in conflict with netplan14:56
HumbleDeerOkay.14:56
HumbleDeerThis service has then clearly persisted across reboots.14:56
slyonyou must have setup some kind of networking service starting this14:56
slyonmaybe you can check your systemd services... Maybe using something like `systemctl | grep -i wpa`14:57
slyonor `systemctl | grep -i network`14:57
HumbleDeerwpa supplicant service is running independently14:57
slyonmaybe you can "systemctl stop" or even "systemctl mask" that wpa_supplicant service?14:59
HumbleDeerI have stopped the independent service, ran netplan apply, and now it runs properly14:59
slyonnice :)14:59
HumbleDeerI assume that means i need to remove wpa_supplicant.service from any auto-start?14:59
slyonjust stopping it, it will probably pop up next reboot. so you either need to install whatever package containing this service or "systemctl mask" it14:59
slyonyes14:59
slyonI need to drop for an appointment now. But I guess you're on a good path!15:00
HumbleDeerThank you! Good luck! Drop me a message when you can. I'd like to see if there's anything I can send you way :)15:01
HumbleDeersystemctl status now returns https://www.toptal.com/developers/hastebin/raw/anahemolod - a good return/result. :)15:01
HumbleDeerI checked the journalctl entry for wpa_supplicant.service and it tells me it's being started by just systemd15:05
HumbleDeerJun 26 20:17:44 botlan-elitedesk systemd[1]: Starting WPA supplicant...15:05
HumbleDeerI ran systemctl disable wpa_supplicant.service, restarted, and checked again what the status was of the services containing wpa in the name. It now shows only wpa_supplicant in relation to the wireless interface configured by netplan.15:10
HumbleDeerhowever, when checking ifconfig I still don't have any sign of configuration having worked, and `systemctl | grep -i network` shows only a few service entries related to eno1 (the onboard ethernet.)15:12
HumbleDeerI now tried to apt purge wpasupplicant to try and get all old configs for itself out of the way, and I got15:16
HumbleDeerPurging configuration files for network-manager (1.22.10-1ubuntu2.3) ...15:16
HumbleDeerdpkg: warning: while removing network-manager, directory '/etc/NetworkManager/system-connections' not empty so not removed15:16
HumbleDeerPurging configuration files for wpasupplicant (2:2.9-1ubuntu4.3) ...15:16
HumbleDeeras a response. Somehow that doesn't sound right to me since I should not be using NetworkManager at all.15:16
HumbleDeer-- scrap that. the contents of the files point towards a much earlier attempt at fixing this, still mentioning wlan015:17
HumbleDeerdhclient does not seem to be receiving any DHCP lease from the DHCP server, but running it with -v (verbosity) does not really point out why, as the broadcast address is fine15:24
HumbleDeerAnd just like before there seems to be an entry in the startup log (when monitoring through the HDMI output) for 'waiting for network to be configured' which tells me that something is not completing successfully. I might try setting "optional: true" on the wxl just to avoid this long boot time issue.15:26
HumbleDeerBack but from HexChat now. :)15:57
HumbleDeerSomething seems to be wrong with the hardware or alike because it's not even working in the ubuntu setup now 18:04

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!