/srv/irclogs.ubuntu.com/2018/01/09/#cloud-init.txt

dojordan@smoser, gentle bump on my PR. I believe I've addressed all of your comments01:29
smoserdojordan: ok.13:51
smoserpowersj: t2.micro cost 0.0116/60-minutes16:05
smoseri suspect that our average api-start -> terminate is probably < 10 minutes .16:05
powersjagreed16:06
smoserso each test would end up costing us in *instance-time* ~ 0.00116:07
smoserstill have other charges (possibly network and ebs volume time, but ... cheap)16:08
smoserblackboxsw: i left a question for you at https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/33510817:55
blackboxswsmoser: checking now17:59
blackboxswsmoser: so by dropping silentish downgrading from oauth to non-oauth.... you mean just fail and fail loudly?18:01
blackboxswthat's a fair and explicit behavior18:01
sushanthi guys, i work for Microsoft azure-networking and wanted to discuss the possibility of adding a networking module specific to azure.19:01
sushantThis is to support networking scenarios for VMs in Azure. To begin with, it will listen for media disconnect/connect and issue re-DHCP.19:02
sushantThis will help us in moving virtual machines from one azure virtual network to another.19:03
sushantOver time, we plan to add support for more advance networking scenarios in azure.19:03
sushantPlease let me know if this channel is the best place to discuss, or I can also start an email thread (let me know who should I include in the email).19:04
blackboxswsushant: saw your comments on dojordan's branch and figured we would probably start a discussion at some point. While the initial discussion can start here. I think it best to email to cloud-init@lists.launchpad.net   so that other viewers can participate if needed.19:11
blackboxswI think initially something to be aware of is the systemd changes for ubuntu releases > Xenial which might make driving dhcp rediscovery a bit tougher19:12
blackboxsws/tougher/different19:12
blackboxswsushant: also there is a mechanism in  cloudinit now to quickly (and temporarily) interact with dhcp if needed without writing any system lease files or producing artifacts via /sbin/dhcp-script. So you might be able to interact with dhcp if you need to discover new service endpoints etc.19:18
blackboxswcloudinit/net/dhcp.py:maybe_perform_dhcp_discovery() is something we added to assist in dhcp interactions19:19
blackboxswbut even that helper will have to be adapted in a systemd-only work which doesn't contain a packaged 'dhclient' utility19:20
dojordan@blackboxsw, I looked at that yesterday, but I wanted to confirm on xenial the current solution using bounce will work19:20
blackboxsws/systemd-only work/systemd-only world/19:20
dojordanwith systemd-networkd we may have another solution using link state disconnect and connect (think unplugging and re plugging the ethernet cable)19:21
dojordanthat solution doesn't work on xenial as the networking stack doesn't retrigger DHCP for some reason. we are currently testing on 17.10 but wanted to check in the PR for xenial in the mean time19:21
blackboxswdojordan: yes I believe for Xenial-only the bounce will continue to work. it's just newer series where this bounce will fallover.19:22
blackboxswon xenial I believe your are correct that the bounce is required as systemd isn't driving re-dhcp on hostname changes... I *think*19:22
dojordanthat is the behavior we saw19:23
* blackboxsw has to relook at the changes I just landed related to bounce ifup/down being absent . to re-remember what's going on there19:23
blackboxsw    In artful and bionic ifupdown package is no longer installed in default19:23
blackboxsw    cloud images. As such, Azure can't use those tools to bounce the network19:23
blackboxsw    informing DDNS about hostname changes. This doesn't affect DDNS updates19:23
blackboxsw    though because systemd-networkd is now watching hostname deltas and with19:23
blackboxsw    default behavior to SendHostname=True over dhcp for all hostname updates19:23
blackboxsw    which publishes DDNS for us.19:23
blackboxswsorry commit related to this was b05b9972d20ec3ea699d1691b67314d04e852d2f19:24
blackboxswso, yeah calls to perform_hostname_bounce on xenial will continue to use the ifdown ifup logic to talk to dhcp again19:25
blackboxswas ifupdown deb package will continue to be delivered in xenial images19:26
dojordanyup, that's the plan19:26
dojordanthanks for confirming19:26
blackboxswok; I feel okay about that as we won't break backward compat in xenial and remove ifupdown pkg19:26
blackboxswand even if you continued to call perform_hostname_bounce on artful, bionic, C-series etc. it'll just no-op and log a warning message19:27
blackboxswnot even warning... a debug message: Skipping network bounce: ifupdown utils aren't present19:27
blackboxswso if systemd-networkd doesn't do what you want sushant or dojordan's network module will have to do the lifting you mention to make that happen19:28
dojordanexactly. but for xenail we are safe19:28
blackboxswI believe that is true. /me re-reads any of smoser's concerns there to see if I missed something19:28
smoserdojordan: i was just reading19:29
smoserblackboxsw: but will bounce do *anything* on bionic ?19:29
blackboxswsmoser, not it no-ops and  adds a debug message "Skipping network bounce: ifupdown utils aren't present."19:30
blackboxsws/not/nope/19:30
blackboxswcloudinit/sources/DataSourceAzure.py:616-ish19:31
blackboxswin that case, we blindly rely on systemd-networkd to do it's job and automatically updated dhcp every hostname change19:32
blackboxswwhich admitedly is a configurable default behavior which *could* be turned off on custom images19:32
dojordanfrom what I read the only way to retrigger dhcp if the hostname flag isn't set is to restart systemd-networkd, which is less than idea19:34
dojordanideal*19:34
blackboxswunrelated minor comment  on https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/335108 for you Scott. I'll give this a test on our MAAS to watch it save time :)19:36
blackboxsw+1 dojordan yeah, not sure about the other fallouts of restarting systemd-networkd..... it feels like it begs an api/interface/knob from systemd to make that possible/simple if needed, but I don't have a lot of faith in that feature showing up.19:37
smoserhmm19:39
smoserblackboxsw: http://paste.ubuntu.com/26354996/ ?19:41
blackboxsw+1 smoser19:41
sushant@blackboxsw Thanks a lot, I will start an email thread with cloud-init@lists.launchpad.net19:47
blackboxswcan't remember smoser do we know yet whether bionic cloud-images might drop 'dhclient'?19:51
blackboxswit's currently still in bionic daily images per my lxc spin ups19:51
smoserthey cant easily at themoment19:53
smoserthe thing protecting them is initramfs-tools and ubuntu-minimal19:54
smoserhttp://paste.ubuntu.com/26355073/19:55
dojordandoesn't systemd-networkd have it's own dhcp client?20:04
smoserdojordan: yes it does.20:05
dojordanso is dhclient sticking around as a no-op?20:05
smoserwell, at the moment yes.20:11
smoserits possible that foundations team would change initramfs-tools dependency on it.20:11
smoserand i suspect tha'd allow them to drop it from 'minimal'20:12
smosercloud-init does use it at the moment on ec2.20:12
smoseri kind of suspect that it willlive in bionic unless someone goes pushing on it.20:13
smoserblackboxsw: somwhat related to above20:19
smoserbug 173951620:19
ubot5bug 1739516 in cloud-init "networking comes up before hostname is set" [Medium,Confirmed] https://launchpad.net/bugs/173951620:19
smosermwhudson says that nothign he found re-dhcp's on hostname change.20:20
blackboxswhrm..... though it's documented here. https://www.freedesktop.org/software/systemd/man/systemd.network.html#SendHostname=20:26
blackboxswand I see logic in systemd-229:src/network/networkd-dhcp4.c which calls sd_dhcp_client_set_hostname if link->network->dhcp_send_hostname20:30
blackboxswahh but that looks to be just  on dhcp4_configure20:31
blackboxswhmm wonder where/when that's triggered20:31
blackboxswas you mentioned earlier, might have just been lease expiration etc.20:31
smoserdojordan: i just hit 'submit' on a review.20:47
smoserdojordan: do you know the lease time that azure responds with ?20:47
smoserblackboxsw: did you verify that my maas thing works in a real maas ?21:02
smoserdeploy, upgrade, reboot ?21:02
smoserand if so, can you let me into one ?21:03
* smoser looks for creds he knows he has21:03
blackboxswsmoser: I still see tracebacks on artful. but, unrelated to your maas branch. looking deeper21:20
blackboxswfound a bug in cloud-init status just now too.21:20
dojordan@smoser, our leases are 2^32 - 1 seconds...21:21
smoserdojordan: wow!21:22
blackboxsw    "('apt-configure', ValueError('Old and New apt format defined with unequal values True vs False @ apt_preserve_sources_list',))"21:25
blackboxswthe full traceback21:25
blackboxswhttps://pastebin.ubuntu.com/26355603/21:25
blackboxswthis was maas 2.3 with master + your change . I think master is doing the same thing.21:26
blackboxswour maas provides an empty ntp: cloud-config21:29
blackboxswn/n empty pools: [] and servers: [<maas-ip>]21:29
blackboxswin vendor-data21:29
blackboxswand I don't see much else as far as apt config21:30
dojordan@smoser, We are exploring an alternate solution to bounce the nic from hyper-v, but in the mean time we would like to get this checked in. So an alternate solution for bionic would be to simply change the hostname. This way, systemd-networkd will keep re triggering DHCP. Once we get the final ovf_env.xml from IMDS, we will actually apply the real, customer provided hostname. If you guys are okay with this approach I will code 21:32
blackboxswsmoser: oops missed you creds request21:48
blackboxswadding21:48
blackboxswssh ubuntu@10.5.1.1821:49
blackboxswseeing the restored from cache messages as expected due to  check_instance_id() returning True22:00
blackboxswok that apt error I got was a duplicate of https://bugs.launchpad.net/maas/+bug/173595022:34
ubot5Launchpad bug 1735950 in MAAS 2.3 "ValueError: Old and New apt format defined with unequal values True vs False @ apt_preserve_sources_list" [Critical,Triaged]22:34
blackboxswok added comments/pastes to that bug, it's targetted to 2.3 and 2.4, so we'll see22:46

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