/srv/irclogs.ubuntu.com/2020/05/12/#cloud-init.txt

=== tds9 is now known as tds
lucasmourablackboxsw, thanks for the review on the apt_configure schema :) I have addressed the issues you raised13:17
lucasmouraAlso, I think I can address the description problem, that it is not allowing more advanced formatting like lists or notes. But should we do that on the same PR ?13:18
rick_hlucasmoura:  always feel free to call out follow ups as long as what's there isn't broken.13:39
rick_hlucasmoura:  more smallers prs > bigger giant ones generally13:39
lucasmourarick_h, yes, that's true13:40
lucasmouraThanks rick_h :)13:40
=== hjensas is now known as hjensas|afk
dingus9anyone know of tooling to generate cloud-init yml configs on the hypervisor side? maybe that also pack it into an iso? thanks15:33
Odd_Blokeblackboxsw: Lucas has reviewed https://github.com/canonical/cloud-init/pull/347 so it's ready for your core review BTW.16:05
blackboxswlucasmoura: rick_h as mentioned in standup, unfortunately our docs on readthedocs are auto-generated from tip of cloud-init, so if we introduce a breaking doc change it'll render to the docs shortly thereafter. So, we probably should be cognizant of this fix PR in this case. lucasmoura and I can meet today to sort it.16:27
=== tds5 is now known as tds
blackboxswOdd_Bloke: +1 will check that PR out today for the dot printing. I think https://github.com/canonical/cloud-init/pull/339 is ready for review per our discussion yesterday. I used https://github.com/canonical/uss-tableflip/pull/48 to generate it. I see you have doc comments on #48. were you awaiting doc closure there before we land groovy new-upstream-snapshot?18:57
lucasmourablackboxsw, I think I have arrived in a solution for description formatting issue. I can show you the meeting or commit it to the PR so you can review19:35
lucasmouraI am fine with whatever suits you best :)19:35
robjorharper: still around?22:10
rharperrobjo: not supposed to be, but here I am =)22:11
robjoyay me22:11
robjoanother networking problem :( of course22:11
robjowhen there are multiple interfaces is there a way in the config to make sure we get the "right" assignment?22:12
robjoi.e. can cloud-init rename interfaces?22:12
rharperyes, it does22:12
robjothe kernel discovers the interfaces in "random" order, how does cloud-init decide which interface gets associated with the config passed in by the user?22:13
robjoI have a case where a 10.x.x.x network sometimes shows up on eth0 and sometimes on ethX22:13
rharperright, so, if the network config includes mac addresses (and there isn't a set-name, or name specified) we look up the name of the interface by the mac22:13
robjothat look up then means we get the random kernel discovered names, right?22:14
rharperonly the first time, afterwards we emit udev rules to bind the name to the mac22:14
robjothe answer then is the user needs to specify "name" and then the mac is force to be associated with that name?22:15
rharperhowever, if you retain eth* namespaces, you sometimes lose because of hotplug racing with cloud-init (or udev) renaming22:15
rharperfor manual configs, yes, for automated (platform) configs, we usually have what we need via metadata service info22:15
robjoright, there is always the race condition22:15
rharpercorrect, however, cloud-init will use the written config and manuall rename interfaces on each boot22:15
rharperideally it's already fixed byt cloud-init local time due to udev being complete22:16
robjowell the metadata doesn't contain the interface names22:16
rharperno22:16
rharperbut it has macs22:16
robjoit contains "id"22:16
rharperand we look it up on first boot, and then it's "fixed" in udev rules and rendered network config files22:16
robjoright but somehow this still has to be stiched together22:17
robjoit's the first boot that's the problem22:17
rharperfirst boot isn't a problem22:17
robjoaccording to the customer it is22:18
rharperfor each interface in openstack, we extract the mac address, and before we write udev rules or network-config to disk, we "ask" the kernel, what name do you have for this macaddress22:18
rharperit says eth0; so we emit udev rule that binds MAC1 with the name 'eth0';22:18
rharperwe write config to disk, that includes the ip/netmask/dhcp for "eth0";22:18
rharperrepeat for each additional interface22:18
rharperthen, on next boot, udev runs and *should* already enforce the correct names;  in addition to that, cloud-init reads the config on disk (which includes the original mac to name mapping) and will use ip rename to enforce MAC1 has the name eth022:19
robjobut that is the point, we ask the kernel the name for the interface, so we depend on the discovery order of the interfaces22:19
rharpersure, but only once, on the first boot22:19
rharperso every boot after that can randomly change, and we will *rename* eth1 back to eth0 if eth1 has MAC1 which should be on eth022:19
rharperthat happens either via udev or cloud-init22:20
robjoYes, but they want the same order every time, i.e. the 10.x.x.x network always needs to be associated with eth022:20
rharperyes, and we do that22:20
rharperso if you've got the log, and udev rules and system journal, we can see if there's a bug in there; but we've had this behavior for years now;22:20
robjobut there is no guarantee that the mach they give us is at the time we ask associated with eth0, it could be associated with eth222:20
rharperI see;22:21
rharperthere's nothing we can do about that;22:21
rharperthe openstack metadata would need to include a specific name22:21
robjoThanks, that's what I thought22:21
rharperwe originally did want to use the 'id' field to set the interface name22:21
rharperbut that's not part of the network_json specification;22:22
rharperso we had to use the lookup22:22
robjoglad I have not fallen off the rocker22:22
rharperhehe, it just wasn't clear to me that the first boot pairing (which we persist) wasn't the mapping they desired22:22
robjothanks for the help22:23
rharpersure22:23

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