/srv/irclogs.ubuntu.com/2023/05/30/#cloud-init.txt

Number8Hi everyone, I'm investigating a problem with cloud-init version 22.1. When I use it to configure almalinux 9.1, cloud-init configure the network with the files /etc/sysconfig/network-script/ifcfg-*07:59
Number8I think cloud-init 22.1 is too old but I'm not sure08:00
meenaNumber8: yeah, Alma is pretty new, maybe upgrade to the latest cloud-init and see how that does for you08:11
caribouHello, I've been using a custom built cloud-init from source to implement our DataSourceScaleway : cloud-init-23.1+70.g34637a49-1.el9.noarch11:46
caribouwhich works fine on rockylinux-9.11:46
caribouSince 23.2 came out, I rebuilt a new cloud-init-23.2-1.el9.noarch but now after installation I have no network.11:46
caribouThe command `nmcli connection up filename /etc/NetworkManager/system-connections/cloud-init-eth0.nmconnection` fails with 11:46
caribouConnection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged).11:46
caribouWhile I investigate what is added b/w commit 34637a49 and the 23.2 tag I thought I'd ask here11:47
caribouI also noticed the following message at the console during reboot :11:56
cariboumodules.py[WARNING]: Could not find module named cc_refresh_rmc_and_interface (searched ['cc_refresh_rmc_and_interface', 'cloudinit.config.cc_refresh_rm11:56
caribouc_and_interface'])11:56
caribouok, I identified the change : 009dbf85a72a9077b2267d377b2ff46639fb3def - net/sysconfig: enable sysconfig renderer if network manager has ifcfg-rh plugin*13:33
caribouFor some reason it triggers the creation of a bad /etc/sysconfig/network-scripts/ifcfg-eth0 on RockyLinux 9 only. For the others the file is not touched by cloud-init13:35
minimalcaribou: 23.2 removed the refresh_rmc_and_interface module but you must be using an old /etc/cloud/cloud.cfg (or file in /etc/cloud/cloud.d/*) that still references this module13:43
caribouyeah, I noticed that while investigating. I'll clean up the conf file13:44
minimalcaribou: I'm not familiar with networkmanager so can't help there but if you have cloud-init debugging enabled then cloud-init.log should show how it handled network config and rendered it to the appropriate format14:05
caribouthanks for the tip. I'll try to dig in further tomorrow14:05
falcojrcaribou: that PR added better sysconfig detection. My guess is that Rocky has support for sysconfig but cloud-init wasn't detecting it and using the NetworkManager renderer instead. Now it is detecting sysconfig instead and doing something weird. If you have pre and post logs I could confirm. 15:03
falcojrthe renders to use and their order is configurable in cloud.cfg.tmpl. If what I said is true, then we probably want to order NetworkManager detection before sysconfig on Rocky. 15:05
cariboufalcojr: I'll try to provide the logs sometimes tomorrow15:07
cariboufalcojr: here they are :15:24
caribouGood (i.e. before 23.2) :https://pastebin.mozilla.org/Ke8tyOAR15:24
caribouBad : https://pastebin.mozilla.org/KAOuRoXo 15:24
falcojryeah, so `2023-05-30 11:05:41,953 - __init__.py[DEBUG]: Selected renderer 'network-manager' from priority list: None` vs `2023-05-30 15:17:44,557 - __init__.py[DEBUG]: Selected renderer 'sysconfig' from priority list: None`15:25
falcojrchanging the priority on Rocky would be a quick fix, but we should probably figure out why the sysconfig renderer isn't working correctly too15:26
falcojrhuh... https://github.com/canonical/cloud-init/blob/main/config/cloud.cfg.tmpl/#L38415:38
falcojrif this file is used/rendered when building for Rocky, the ordering should automatically be correct. If a different cloud.cfg used or generated in the downstream build process, then it would need to be updated accordingly.15:42
caribouRight now, I'm generating packages directly from the GH source tools (i.e. make srpm)15:47
minimalcaribou: perhaps you have a file in place to override the default renderers list (which is what I assume also happened regarding the refresh_rmc_and_interface module)15:50
caribouI'm on my way out but I'll check that tomorrow when I'm back. Thanks for helping out15:50
=== djhankb4 is now known as djhankb
=== m_ueberall is now known as ueberall
meena@fal21:52
meena@falcojr added your patch to my pull request21:52
falcojrThanks! 22:28
meena@blackboxsw: remember how i said I plan to do some Kernel work? well, this thing here: https://github.com/lxc/lxd/pull/11761 triggers some unplanned kernel work.23:14

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