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

=== juergh_ is now known as juergh
chillysurferi'm probably reading this wrong, but if we have an exit hook for dhclient (https://git.launchpad.net/cloud-init/tree/tools/hook-dhclient) unless `cloud-init dhclient-hook` returns a non-zero return code then dhclient will never fail, right?14:59
Odd_Blokechillysurfer: That feels like a precursor to a real question. ;)  What's prompting you to ask?15:03
chillysurferOdd_Bloke: haha the reason i'm asking is that we're seeing empty dhcp lease files and i'm following the trail back to this. i see in cloudinit.net.dhcp.dhcp_discovery that we would fail for a non-zero return code, and we are passing in the -1 opt to dhclient which would indicate it _would_ be a non-zero return code if dhclient fails, which had me scratching my head15:04
chillysurferand then i saw that we have this dhclient exit hook15:04
chillysurferand visually consuming it, it seems like this would hide a non-zero return code from dhclient main lease mechanism15:05
chillysurferunless ::is azure and cloud-init dhclient-hook fails:: in which case i think we would get nonzero rc15:06
chillysurferwell... add the condition there that $reason is one of [BOUND, DOWN, RELEASE, REBOOT, STOP, EXPIRE]15:06
Odd_BlokeOK, I don't really know enough about dhclient to answer this off-hand, and I'm about to head into a meeting.15:09
Odd_Blokechillysurfer: A bug report capturing the information you have might be the best next step, so that we aren't having to refer people to IRC backlog.15:11
Odd_BlokeBut I agree with your assessment, it looks like we would mask a failure.15:13
Odd_BlokeWell, I'm not sure it's "masking", per se.15:13
Odd_BlokeBecause it daemonises, it's not clear that we have easy access to an indication that there was an error.15:14
chillysurferOdd_Bloke: totally agreed, and good point. i'll create a bug report!15:16
Odd_BlokeThanks!15:18
Odd_Blokerharper: Is there some specific reason we need a cloud-init FFe?  Or is it just because we know we're going to want to continue snapshotting?15:30
rharperOdd_Bloke: my understanding was that while we have an SRU exception for bringing things back, we're still supposed to land features by freeze date and if aren't going to make freeze to do FFe15:32
rharperhistorically we've not been great on doing that; so attempting to rectify that;  (assuming my understand is correct w.r.t the need for FFe)15:33
blackboxswoops15:39
Odd_Blokeblackboxsw: I just commented on some weird indentation in https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/371546 and it looks like the autolander failed, so maybe we could fix that before it lands?15:46
blackboxswOdd_Bloke: will do15:48
Odd_BlokeThanks!15:51
blackboxswOdd_Bloke: rharper looks like auto-lander is failing due to slow git.launchpad response time16:11
blackboxsw"ERROR: Timeout after 10 minutes" on git fetc16:11
blackboxsw"ERROR: Timeout after 10 minutes" on git fetch16:11
chillysurferis there any official guide/doc on creating a custom cloud-init module?16:17
chillysurferi see cc_foo.py https://git.launchpad.net/cloud-init/tree/cloudinit/config/cc_foo.py but was wondering if there was anything beyond this sample module16:18
Odd_BlokeI'm not aware of any.16:19
chillysurferseems straightforward to construct a module, but i'm more curious to the "install" process. i guess it's just cp'ing a module file into the python cloudinit dist in the cloudinit/config/ dir16:20
Odd_Blokechillysurfer: You'd also need to modify the /etc/cloud/... configuration to actually get the module to run.16:21
Odd_Bloke(I think.)16:21
chillysurferOdd_Bloke: yeah that makes sense. need to add the module name to the respective config section16:22
Odd_Blokechillysurfer: You can also pass config modules in as user-data.16:24
Odd_BlokeBut that's about as much as I know about that. :p16:24
chillysurferOdd_Bloke: sounds like a good start to me :)16:24
blackboxswok internal fixes on git.launchpad in progress. CI builds should come back out16:24
blackboxswOdd_Bloke: chillysurfer correct. drop-in custom config modules can just be added to the installed cloudinit/config directory and an addition in one of the modules sections in /etc/cloud/cloud.cfg16:26
chillysurferblackboxsw: awesome thanks!16:26
blackboxswcloudinit/stages does a find_modules lookup for any module that contains a 'handle' function16:26
blackboxswchillysurfer: if your config module solves a public early-config need, we'd also be interested helping you  push that confent upstream16:33
blackboxsw*public* or *more general*16:33
chillysurferblackboxsw: i don't think it'll be so helpful. i'm tossing around ideas to prevent userdata from overwriting vendordata. if the same config sections are present in both, vendordata is overwritten (never merged). i was thinking a possible solution to that is to create an "internal" module and use that to specify vendordata actions16:40
Odd_Blokeblackboxsw: rharper: https://code.launchpad.net/~daniel-thewatkins/cloud-init/+git/cloud-init/+merge/371673 <-- this is the refactoring in preparation for the dracut stuff that I mentioned at stand-up16:48
Odd_BlokeWe don't necessarily need to land it as-is (though that will make the review of the dracut-specific stuff easier), but I would appreciate some review so that I can course-correct sooner rather than later.16:49
Odd_Bloke(Ideally, I'd have this all done and landed by EOW, because I'm on vacation for the next 6 working days, hence pushing the review sooner than I might otherwise.)16:49
Odd_BlokeBut, to be clear, I think this is appropriate for inclusion in master, it shouldn't change any behaviour.16:49
rharperOdd_Bloke: cool16:51
blackboxswok https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/371546 merged. I'm kicking off an eoan upload and then SRU17:11
blackboxswOdd_Bloke: will review that branch after eoan-proposal is syncd17:12
blackboxsweoan-upload rather. can always do another upload today if needed17:12
Odd_Blokerharper: Responded to your comments there, BTW.17:25
rharperthx17:32
blackboxswrharper: I sent triage question in email regarding whether there is something to do with IPv6MTUBytes now that Eoan has support17:40
rharperlooking at it now17:40
blackboxswmaybe it's a curtin action item, dunno17:40
rharpercurtin handles this for xenial, it;s always been broken on networkd;  we can re-run with those tests enabled to see what's been fixed.17:40
blackboxswbtw: [ubuntu/eoan-proposed] cloud-init 19.2-21-ge6383719-0ubuntu1 (Accepted)17:42
blackboxswI'm queuing an SRU now17:42
rharperblackboxsw: yes, we'll need to update our renderer; the key name is now 'ipv6-mtu'17:52
rharperwe're due for an update I think;  in e, I think netplan there now will dump it's features and keys;  so we'll want to start using that to control how we render things.17:52
Odd_Blokerharper: Responded again and pushed that doc change I mentioned.18:03
rharpergreat18:03
* rharper waits for git to update18:04
blackboxswhttps://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1841099 filed for cloud-init SRU18:09
Odd_Blokeblackboxsw: Ryan is +1 on my dracut branch; are you happy for me to mark Approved, or do you want to review too?18:15
Nick_AWhat is the correct way to do dhcp4 and dhcp6 on a single interface in network config format 1? Do I need two subnet sections or do I list dhcp,dhcp6 on the same type line?18:45
Nick_AOr perhaps two type lines, one with dhcp and one with dhcp6?18:46
rharperNick_A: you need to subnets,  subnets: [{type: dhcp}, {type: dhcp6}]18:57
Nick_Athanks18:58
metsukeWhat is the best way to insert a multi-line (3) cron file using cloud-init?  I can use 3 runcmd lines but I'm guessing there is a better way?18:58
rharperwrite_files18:58
metsukethank you18:59
rharperyou can use the | marker to emit multi-line content18:59
metsukeif only one line is needed, is it better to use write_files or one runcmd echo?18:59
rharperwrite_files runs sooner ; but neither is better than the other19:00
metsukeoh interesting.  Is there a way to make write_files run later than run_cmd?19:01
rharperI guess it depends on what you need;  write_files you can also set the mode/permissions/owners on the file19:01
rharpernot easily, you have to specify all of the modules for a stage and update the order;19:01
rharperin /etc/cloud/cloud.cfg, the init_modules: list and config_modules: list19:01
metsukegot it, thank you!19:02
rharperyw19:04
blackboxswSRU is queued for xenial. bionic disco https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/371685 https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/371686 https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/371687 Odd_Bloke rharper  if you get a chance to review, we can push it up for SRU19:05
blackboxswwanted to ask if there was anything to disable in this SRU19:05
rharperblackboxsw: thanks19:05
rharperI'll check the changelog19:05
rharperblackboxsw: Odd_Bloke: is there a way to "shell" into one of our tox environments?  I'm trying to debug a unittest failure under py3  only19:46
Odd_Blokerharper: Yep, you can just use it as a virtualenv; . .tox/py3/bin/activate19:48
rharperOdd_Bloke: excellent thanks19:48
blackboxswOdd_Bloke: rharper looks like we still need to enable exoscale in cloud-init.templates in each series19:50
blackboxswshall I add that to the SRU proposal now?19:50
rharperalso, I'm on xenial, and my nosetest3 on the outside passes fine, but inside tox -e py3 it fails ... I dont think there are any package differences in that ;19:50
blackboxswI was expecting to see something like abe6bcdfacdf2f6745e3acf5c76b332380b9c49319:50
blackboxswrharper: Odd_Bloke I think I'll add that to my current SRU proposal MPs now19:51
blackboxswjust need to enable Exoscale19:51
rharperyes, I think that's right19:52
blackboxswrharper: did we intentionally not add Oracle to Xenial/bionic as a datasource option (in favor of retaining Openstack detection behavior?)19:54
blackboxswbecause I don't see it in debian/cloud-init.templates19:54
rharperblackboxsw: yes; we've work yet to do19:54
rharperOdd_Bloke: has to finish up the dracut parsing so the cmdline parameter to disable netconfig can be removed19:55
blackboxswok, good that it wasn't omission19:55
blackboxswok rharper xenial, bionic disco I just added Exoscale datasource and repushed my MP20:12
blackboxswletting CI get through it20:12
blackboxswOdd_Bloke: sorry, reviewing your branch nowhttps://code.launchpad.net/~daniel-thewatkins/cloud-init/+git/cloud-init/+merge/37167320:17
Odd_Blokerharper: As I'm starting to write this config generation code, I'm wondering if we should actually move to v2 config for initramfs stuff first.20:29
Odd_BlokeOtherwise I'm just writing techdebt. :p20:29
rharperhehe20:29
rharperwell20:29
rharpercontrol-manual20:29
Odd_BlokeAh, yeah.20:29
Odd_BlokeConscience salved, I will continue on. :p20:29
rharperoh, I think we can use critical: true on the iscsi connection20:30
rharperso while we don;t have a contro-manaual for leaving stuff _down_20:30
rharperwe do have a way to say, don't bring the dhcp lease on this connection down20:30
Odd_BlokeAh, right, yeah.20:31
rharperso restarts of networking won't break root20:31
Odd_BlokeBut changing the initramfs stuff means also changing the Oracle stuff, for which we _do_ want control-manual.20:31
Odd_BlokeSo I think I'm better off writing (not very much) code to produce v1, and then we can move everything up to v2 together once we're sure we're ready to do that.20:32
Odd_Blokerharper: Does that sound reasonable?20:33
blackboxswthanks Odd_Bloke approved https://code.launchpad.net/~daniel-thewatkins/cloud-init/+git/cloud-init/+merge/37167320:34
blackboxswwe can land that right ^?20:34
Odd_BlokeYep, just marked as Approved.20:35
rharperwell, I don't think we did want control manual, but I think we agreed to start with that?  ISTR that we could bring everything up given the "proper" parsing of the metadata and sorting out the first nic to provide a subnet would get a gateway20:35
rharperso I'm not sure if we're staging things;  if we did all v2, and sorted the gateway logic on the secondary nics in one go, then we'd not need to emit v1 as there's no control manaul requirement if we know we're not breaking primary interface routing20:36
Odd_Blokerharper: Yeah, we did agree to start with that, but the criteria for _stopping_ doing that are not necessarily clear.20:36
blackboxswok xenial, bionic and disco SRU MPs all passed CI20:39
blackboxswand have Exoscale enabled in debian/cloud-init.templates20:39

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