/srv/irclogs.ubuntu.com/2022/02/25/#cloud-init.txt

Eighth_Doctorhey falcojr have you had a chance to look at https://github.com/canonical/cloud-init/pull/1224 again?14:17
ubottuPull 1224 in canonical/cloud-init "Add native NetworkManager support" [Open]14:17
falcojrEighth_Doctor: yep, started taking a look again yesterday. I should get the review in today14:18
Eighth_Doctorawesome14:18
Eighth_DoctorI'm currently shipping it in Fedora's cloud-init package, but I'd like to see this land in cloud-init upstream so I can get the Red Hat folks to ship it in RHEL 9 too14:18
Eighth_DoctorI only have one minor patch myself on top of that patch set, which sets NetworkManager as the renderer preferred above all others: https://src.fedoraproject.org/rpms/cloud-init/blob/rawhide/f/cloud-init-22.1-nm-default.patch14:19
Eighth_Doctorwhich, seemingly from the conversation in the PR already, will not likely be accepted right now, so I'm carrying it downstream only14:20
falcojrEighth_Doctor: right, I think we're going to keep it lower upstream to reduce the possibility of regression. "The sysconfig machinery is currently being used with NetworkManager's compat module, When it's present it works, and once it goes away there's no chance of using it accidentally."14:21
Eighth_Doctorwell it's not in upstream cloud-init14:22
Eighth_Doctorthat's the problem14:22
Eighth_Doctorupstream cloud-init sets NM_CONTROLLED=no14:22
Eighth_Doctorso writing ifcfg-rh files today with upstream cloud-init leads to a broken setup14:22
Eighth_Doctorand starting with F36 and EL9, it'll not work at all, since the ifcfg-rh plugin won't even be shipped on the default install even if you change that behavior14:23
Eighth_Doctorfalcojr: https://src.fedoraproject.org/rpms/cloud-init/blob/056ace892593cd9a3b341b9e7ed7ceedb918b15f/f/cloud-init-21.3-nm-controlled.patch14:25
falcojrEighth_Doctor: I see, so do you think it makes the most sense to set NM_CONTROLLED to True upstream, and older downstream distros can set it to False if they need to?14:25
Eighth_Doctormy understanding is that this was previously discussed upstream and rejected14:25
Eighth_Doctorso I don't know what we should do now14:25
Eighth_Doctorthe Red Hat folks have been carrying a downstream patch for the sysconfig module for a long time for it14:26
falcojrEighth_Doctor: I'm not aware of those discussions (or don't remember them :P ). Do you have any links that could provide more context?14:28
Eighth_DoctorI don't have those either, sorry14:28
Eighth_DoctorI only know them second/third hand14:28
Eighth_DoctorI've only recently started delving into this mess over the last couple of years :)14:29
falcojrno problem, just asking because it seems like a reasonable change right now, but I'm probably missing some additional context14:29
Eighth_Doctorfalcojr: my suggestion is to set upstream cloud-init to have the renderer preference of networkmanager -> netplan -> sysconfig -> eni14:29
Eighth_Doctorfor the ubuntu renderer of cloud.cfg, I think it sets netplan -> eni14:30
Eighth_Doctorso that should be fine from an upstream and downstream perspective14:30
Eighth_Doctoroutside of RHEL and Fedora, nobody tried to use NM with sysconfig in the RH ecosystem14:31
Eighth_Doctorso the potential for breakage is minimal to basically zero14:31
Eighth_DoctorMageia uses sysconfig with legacy network-scripts, but would switch to networkmanager once the module is in anyway14:32
Eighth_Doctorsame for OpenMandriva, ROSA, and others14:32
Eighth_DoctorSUSE uses sysconfig with netconfig or wicked, both of which work with the sysconfig module pretty much as-is14:32
Eighth_Doctorthough they've been considering moving to NetworkManager, but NM doesn't support ifcfg-suse, and the blocker for such a consideration is cloud-init supporting NM properly14:33
Eighth_Doctorand networkmanager exists in virtually all Linux distributions, so that will make cloud-init easier to work with for them14:36
falcojrEighth_Doctor: thanks, that's helpful. I think for this PR we'll keep it as-is, but we can probably submit a follow-on PR and double check with a few other maintainers. Realistically, I think it'd involve moving sysconfig to the bottom of the list rather than network-manager to the top14:41
Eighth_Doctoryeah14:42
Eighth_DoctorI'm happy with a follow-on PR14:42
Eighth_Doctorat the moment, I think we should just get the NM stuff merged14:42
Eighth_Doctorand I can carry the re-order patch downstream for a bit and then maybe propose a better version upstream once I have a better handle on things :)14:42
Eighth_Doctorfalcojr: does that sound reasonable to you?14:43
falcojrEighth_Doctor: yes it does. Thanks for walking me through that14:44
Eighth_Doctoras for why I want to wait on the follow-on PR, I'd like to get a better handle on the cloud-init test suite14:44
Eighth_DoctorI don't fully understand how the tests for renderer backend ordering works, so I want to understand it better before proposing a patch for changing the order upstream14:45
Eighth_DoctorI should probably send a PR indicating that I've signed the Canonical CLA though14:45
Eighth_DoctorI did that years ago for snapd and mir14:45
falcojrEighth_Doctor: good idea. You can also just include it as part of a normal PR too. It doesn't have to be separate14:47
Eighth_Doctoroh, you don't necessarily do squash merges14:48
Eighth_Doctorthe main reason I was thinking of separating them is that it looked like you do squash merges (which I'm not a huge fan of...)14:48
Eighth_Doctorfalcojr: I would also appreciate it if you didn't squash merge the NM PR, since lubko went through the trouble of making discrete changesets14:50
falcojrEighth_Doctor: we do. None of us love it, but the main reason is changelog generation and we need to update our tooling first14:51
Eighth_Doctorah14:51
Eighth_Doctoryeah, then I probably should send separate PRs14:51
falcojrblackboxsw: do you know where the lxd templates come from? Are they built into the image?19:47
falcojrlike if I do `lxc config template list` for one instance, I see a different network config tpl than for another instance19:48
blackboxswfalcojr: yes different instance types come with different metadata tgz to as part of cloud image build process. https://blackboxsw.github.io/2021-11-08-customize-lxd-metadata-templates/#lxd-image-metadata19:52
blackboxswshameless sharing of sparse blog :/19:52
blackboxswgenerally there is an image build process in canonical-land that generates those network config templates for the  jammy-server-cloudimg-amd64-lxd.tar.xz    which has templates and metadata components19:53
falcojrthanks19:54
blackboxswholmanb: thanks again for the PRs for ubuntu uploads https://github.com/canonical/cloud-init/pull/1303 pushed22:27
ubottuPull 1303 in canonical/cloud-init "New upstream snapshot: Jammy" [Merged]22:27

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