/srv/irclogs.ubuntu.com/2019/08/07/#cloud-init.txt

kbZpowersj you around?00:12
rharperkbZ: he's out already, but should be back tomorrow morning Pacific times,00:15
blackboxswrharper: for tomorrow https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/370970/comments/970219 my azure validation on v2 metrics branch for secondary nic. Why isn't route-metric 200  showing?03:52
* blackboxsw skips out03:52
otuboHi guys, I still can't seem to find out the reason why this thing happens, does anyone have a little bit of time to help me debug this issue? https://bugzilla.redhat.com/show_bug.cgi?id=159301011:43
ubot5bugzilla.redhat.com bug 1593010 in cloud-init "cloud-init network configuration does not persist reboot [RHEL 7.8]" [High,Assigned]11:43
otubo(oh, cool bot!)11:43
otuboRight now I'm using 18.5 to work on, but it's no big deal to have anything newer to have backported11:48
otuboThe only environment I have right now is ESXi, and I can reproduce it.11:49
rharperblackboxsw: that sure looks like a bug to me w.r.t the metric on eth114:25
rharperI suspect that the ESXi bug is related to the OVF datasource resetting instance-id =(14:27
Odd_Blokerharper: blackboxsw: We discussed yesterday having the new Oracle network code off-by-default for now; I'm thinking I'll name the config option "apply_network_config", following the naming in the Azure DS.  Does that sound reasonable?14:35
rharperOdd_Bloke: that sounds reasonable, yes14:57
kbZᕕ( ⁰ ▽ ⁰ )ᕗ15:43
blackboxsw+1 Odd_Bloke.16:28
blackboxswrharper: ok Azure 2 nics Eoan plus route-metric.... again I am not getting any route represented with a route-metric cost of 200. Will probably need to screen share and discuss with your sometime today17:15
blackboxswand maybe it's just that nic 2 is also on the same subnet, so the route is omitted as it's a dup17:15
* blackboxsw tries switching the vnet to 10.1.0.0/16 instead of 10.0.0.0/16 (which eth0 is also on)17:16
blackboxswhrm, looks like I am just not certain how to setup multiple nics with different routes in azure vms. two nics on separate subnets result in only one interface with routes defined from the dhcp server.17:26
rharperblackboxsw: hrm17:37
rharperlemme verify on my openstack instances17:37
rharperblackboxsw: is that with or without the systemd with classless static route fix ?17:40
blackboxswrharper: right, eoan is without the classless route fix. lemme bump it to -proposed17:41
blackboxswand grab the queued fix for that too17:41
rharperno I was hoping without17:41
blackboxswok17:41
rharperI've a bionic instance that's doing it right17:41
rharperso I need to see what's different17:41
rharpercan you import my ssh keys? lp:raharper  ?17:41
rharperand let me know where the instance is at ?17:41
rharperhttp://paste.ubuntu.com/p/gkhGkYqQfG/17:43
Odd_Blokerharper: blackboxsw: On reflection, I don't think apply_network_config is the right name; in other places that disables DS-provided network config entirely which wouldn't be the meaning here.  I'm leaning towards apply_imds_network_config.  What do you think?18:16
rharperwould you update the Azure one as well ? I agree we had some confusion over what it meant18:17
rharperAzure would accept both18:18
rharperor check both ?18:18
blackboxswrharper: Odd_Bloke +1 on Azure ds_cfg needed to accept both, as apply_network_config on Azure currently means read IMDS and use it.18:19
blackboxswhrm Odd_Bloke which datasource has apply_network_config disabling network config completely? OpenStack? I'd suggest that it is the same meaning in OpenStack as Azure. OpenStack's network_data.json is complex network config for the instance from OpenStack's IMDS. If we ignore it, w/ apply_network_config false, we aren't disabling network completely, just relying on fallback dhcp on primary nic (like azure does)18:21
Odd_BlokeI didn't say we disabled network completely, I said we disable _DS-provided_ network.  But, yeah, I see that that's not quite what it's doing on Azure.18:23
blackboxsw... I'm probably misreading sorry.18:23
Odd_Bloke(On OpenStack it does just return None from .network_config, which is a full disable.)18:23
Odd_Bloke(On Azure it generates its own fallback config with slight modifications to the call.)18:23
blackboxswahh right, shoot. I thought cloudinit/stages.py did a fallback config if ds.network_config == None. I see now the LOG.info("network config is disabled by %s", src)18:24
Odd_BlokeI'm pretty sure stages _does_ do a fallback config.18:25
Odd_BlokeYeah, a DS has to return {'config': False} to disable _all_ networking.18:26
blackboxswlooks like true: Init._find_networking_config walks through each potential network source, if ds.network_config == None, it still walks to self.distro.generate_fallback_config()18:27
Odd_BlokeReturning None from ds.network_config is just indicating that the DS doesn't have any network configuration to apply.18:27
blackboxswright +118:27
blackboxswcloudinit/stages.py:line 644 is the catchall if no applicable network config from ds initramfs kernel_cmdline etc18:28
blackboxswok18:28
Odd_BlokeSo I think the Azure behaviour and the OpenStack behaviour are quite similar, in that they both result in fallback configuration being emitted.18:28
blackboxswin either case, I'm not opposed to a more specific config option name apply_imds_network_config18:28
blackboxswbetter to avoid vague interpretations as to the config option meaning18:29
Odd_BlokeThe Oracle behaviour of this flag is different; we will always generate the initramfs configuration (i.e. _not_ fallback), the flag only affects whether you get configuration for your _secondary_ NICs.18:29
Odd_BlokeI think this being interaction with an IMDS is a red herring naming-wise, actually.18:30
Odd_BlokePerhaps `configure_secondary_nics`?18:30
blackboxswAHH18:30
blackboxswsure, though in Azure's case apply_network_config == True has the side-effect of being the only option that'll get you secondary_nic config too, because otherwise it's just fallback :)18:31
blackboxswsame with OpenStack as it were18:31
Odd_BlokeSure, apply_network_config is a stronger statement than configure_secondary_nics.18:32
blackboxswbut it is the most appropriate config option for Oracle... and I suppose we could add that alias in Azure && OpenStack to mean apply_network_config= True  if we wanted to grow similary config options for each DS18:32
Odd_BlokeI'm not sure that disabling secondary NICs is something we want to enable generically.18:32
Odd_BlokeAt least, not without some intentional discussion about it.18:32
blackboxswahh, flipping that on it's head right, the converse would not be true in Azure/OpenStack. configure_secondary_nics == False. I get you. agreed18:33
blackboxswrharper: ssh ubuntu@20.186.46.12718:35
blackboxswid imported18:35
rharpery18:35
blackboxswI'd like to have you walk me through triage if you would18:36
blackboxswhangout?18:36
rharperyes18:36
Odd_Blokerharper: blackboxsw: https://code.launchpad.net/~daniel-thewatkins/cloud-init/+git/cloud-init/+merge/371053 <-- Oracle secondary VNICs (WIP because I need to document the new behaviour, but otherwise ready for review)19:19
chillysurferunfortunately i can't seem to get the emailing to the mailing list working. i've pinged the launchpad channel to see if they have any ideas. but in the meantime, the message i've been trying to send is a question about vendordata getting overwritten by userdata: https://gist.github.com/trstringer/be871f87efca0cd41e7017db0fd3179821:08
chillysurferi dumped a gist there which was the content of the email21:08
chillysurferlet me know if you have any thoughts!21:08
rharperchillysurfer: sorry about the email trouble21:12
chillysurferrharper: not a problem at all :)21:15
rharperhttps://git.launchpad.net/cloud-init/tree/tests/unittests/test_data.py21:18
rharperchillysurfer: I think looking there, that might help get the formatting right21:18
rharperI think it covers several of the jsonp merging between user/vendor data21:19
chillysurferrharper: so my jsonp formatting is off?21:19
rharperit _looks_ like (and I need to read closer) that user-data might need to include vendor_data: {enabled: True}21:19
rharperto merge with vendor data21:19
chillysurferoh wow21:19
rharperbut I need to look at those examples too21:19
rharperbecause user_data can also disable vendor_data completely21:20
chillysurferyep i see that with the /vendor_data path21:20
chillysurferrharper: and merge_how doesn't apply to vendor data, is that correct? so even if user data and/or vendor data specify merge_how then it still won't be "included"21:21
chillysurferis that a fair statement?21:21
rharperit can21:21
rharperbut the user-data needs to include it as well21:22
rharperthis is awkward21:22
chillysurfer"this is awkward" -> you mean that user-data includes merge_how to take vendor data into account?21:22
rharperrequiring user-data to specify merge-how in each section21:22
rharperthat is if you pass in 3 user-data mime parts21:22
rharpereach one has to say the merge-how21:22
chillysurferah i see21:22
rharperyou cant, set a _default_ merge-how21:23
rharpervia cloud-config21:23
chillysurferso for instance if user data specifies runcmd then that section needs to specify a merge_how?21:23
rharperI'd like to say, list: append : dict: recusrive: append et c21:23
rharperyes, in vendor-data and in each user-data21:23
rharperwhich is a real PITA21:23
chillysurferyeah that sounds pretty rough21:23
rharperthe lxd folks had a more common append and recursive update for dicts; and users could *clear* previously merged data by inserting empty list or things like that21:24
chillysurferbut how else could a vendor communicate to a user "hey we want to do this thing, but you need to specify a merge_how in runcmd, bootcmd, etc"21:24
rharperI need to read up on their implementation but was thinking that might be nicer for cloud-init21:24
rharperdocumentation21:24
rharperwhich is why it's not great21:24
chillysurferrharper: right i see what you mean. so for lxd the user would have to deliberately clear sections, but for cloud-init it's the opposite... no action is clearing vendor data, and requires action to retain vendor data21:25
rharperwell, at least I;d like some cloud-config to set the default merge mode21:26
metsukeI'm attempting to use cloud images on ESXi.  Am I able to provide a "Url to seed instance data from" on ESXi and then it will use the host's network to grab the config, or do I need to configure the VM's network first?21:54
Odd_Blokemetsuke: o/ I believe cloud-init will attempt to DHCP on the first interface in order to fetch that data, but let me double check.22:14
Odd_Blokemetsuke: OK, no, it doesn't do an ephemeral DHCP (which is what I was thinking of), but I _believe_ that it will only attempt to fetch metadata after networking is up in the host.22:17
Odd_Blokemetsuke: I'm not very familiar with ESXi or the OVF data source though, so your best bet is probably to try it and see what happens. :)22:18
metsukeThat makes sense, thank you. I'm trying to make these images as barebones as possible without having to set up things like network configs manually22:20
Odd_Blokecloud-init will configure the first interface to DHCP by default.22:24
Odd_BlokeSo if you have DHCP set up, then you shouldn't need to touch network config to get the instances up, at least.22:24
metsukeOdd_Bloke: indeed, though in my particular case, a specific static IP is required for connectivity22:25

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