[06:02] <blackboxsw> confirmed, Azure: zesty hostname updates on the command line don't get auto-posted to dhcp, as such nslookup of your hostname just after setting it is unresolvable. Artful and bionic it works within < 1/2 second
[06:02] <blackboxsw> ok was just a drive by. I'm off
[17:24] <dojordan> @blackboxsw, did you have waagent running? it also has some functionality to trigger dhcp on hostname change: https://github.com/Azure/WALinuxAgent/blob/master/azurelinuxagent/ga/env.py#L39
[17:25] <blackboxsw> good point dojordan forgot to check settings on the waagent
[17:25] <blackboxsw> will spin up zesty & artful again to check both
[17:56] <blackboxsw> smoser: manual_cache_clean branch: do we really care about logging dicfg == None? or could we just return with "no di_report found in config"
[17:57] <blackboxsw> minor comment left on https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/335956
[17:57] <blackboxsw> question really
[17:58] <blackboxsw> I'll actually test that in a minute here. but I don't think we can get to that "di_report is None" logic
[17:58] <smoser> you are correct
[17:59] <smoser> blackboxsw: no. you can get there.
[17:59] <smoser> oh. wait. no.
[18:00] <smoser> blackboxsw: http://paste.ubuntu.com/26373092/ ?
[18:01] <blackboxsw> dojordan: zesty azure, waagent is running on zesty, but I see systemd-networkd is dead
[18:02] <dojordan> interesting, during cloud init or after boot?
[18:02] <dojordan> is it using networkmanager?
[18:02] <dojordan> do ifdown/ifup exist?
[18:02] <smoser> no.
[18:02] <blackboxsw> smoser: sure. per your pastebin if we want to differentiate from no di_report and empty di_report I'
[18:02] <blackboxsw> am +1
[18:03] <smoser> blackboxsw: http://paste.ubuntu.com/26373186/
[18:03] <smoser> no reason to set a default since we've already checked if it was there.
[18:04] <smoser> dojordan: ubuntu cloud images dont use networkmanager anywhere
[18:04] <smoser> dojordan: you might be right on walinuxagent triggering the hostname update.
[18:04] <smoser> i suspect you are
[18:05] <blackboxsw> smoser: +1 on di_report 2nd paste because we also check for None in your branch and nondict
[18:05] <smoser> i'd forgotten about that.
[18:07] <blackboxsw> dojordan: how do I tell walinuxagent monitor frequency?
[18:07] <dojordan> let me check
[18:08] <dojordan> @blackboxsw, fwiw if you want to disable there is a config flag you can set to disable it
[18:09] <dojordan> in /etc/waagent.conf, set Provisioning.MonitorHostName=y
[18:10]  * blackboxsw didn't see anything in /var/log/waagent messaging 'Detected hostname change' on zesty or artful. but the hostname update on artful did update dns
[18:10] <dojordan> and it is sleeping 5s
[18:10] <blackboxsw> Provisioning.MonitorHostName=n on artful
[18:10] <blackboxsw> so it's gotta be systemd-netweorkd
[18:11] <blackboxsw> Provisioning.MonitorHostName=n on zesty tii
[18:11] <blackboxsw> too
[18:11] <dojordan> can you run sudo tcpdump -i eth0 port 67 or port 68 -e -n?
[18:11] <dojordan> in a different screen
[18:11] <dojordan> while you change hostname
[18:11] <blackboxsw> definitely
[18:13] <blackboxsw> sudo tcpdump -i eth0 port 67 or port 68 -e -n
[18:13] <blackboxsw> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
[18:13] <blackboxsw> listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
[18:13] <blackboxsw> nothing came across the wire across multiple sudo hostname newname calls
[18:14] <blackboxsw> yet nslookup myjunk3
[18:14] <blackboxsw> Server:		127.0.0.53
[18:14] <blackboxsw> Address:	127.0.0.53#53
[18:14] <blackboxsw> Non-authoritative answer:
[18:14] <blackboxsw> Name:	myjunk3
[18:14] <blackboxsw> Address: 10.0.0.5
[18:14] <dojordan> gotcha, so its not actually re dhcp-ing
[18:15] <blackboxsw> doesn't look like it.
[18:16] <blackboxsw> w/out dhcp in azure, how could dns have been updated?
[18:16] <blackboxsw> I thought that's the mechanism by which that happened
[18:16] <blackboxsw> w/out re-dhcp
[18:16] <dojordan> that would be the iDNS
[18:17] <dojordan> so if you have another VM in the same vnet, can it hit the new hostname?
[18:18] <dojordan> (iDNS being the instance dns server). I'm curious about the DNS thing though...
[18:30] <smoser> dojordan: were you looking at using the dhclient and ephemeral ivp4 ?
[18:31] <dojordan> yeah, I wrote up some quick and dirty code and am testing it now
[18:36] <smoser> powersj: https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/335956
[18:36] <smoser> you knwo what that failed ?
[18:36] <smoser> it doesnt seem like my change
[18:36] <smoser>  https://git.launchpad.net/~smoser/cloud-init/commit/?id=6f59e49b4ece8eceb43b01a3d7c063ee7899a051
[18:36] <smoser> could have gone from green to red
[18:37] <smoser> and i just ran c-i here with it.
[18:39] <powersj> smoser: you may need to rebase to pick up the pylxd change
[18:40] <powersj> yeah I don't see integration-requirements.txt, which will be required to grab the pylxd of the necessary version to support lxd as snap
[18:44] <smoser> k
[18:44] <smoser> hm.
[18:44] <smoser> it worked here though
[18:44] <smoser> odd
[19:29] <smoser> blackboxsw: if you want to OK https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/335956
[19:29] <smoser> officially, that'd be good
[19:29] <smoser> then we can pull
[20:48] <dojordan> stupid question, but I am having problems mocking cloudinit.util.is_freeBSD()...https://pastebin.com/qSpEtASK
[20:48] <dojordan> for some reason when i log the return value in the code to be tested, it is coming back as a magicmock object and not False
[21:02] <rharper> dojordan: I think the patch decorator order is backwards, the first line above the fuction is the first parameter
[21:26] <blackboxsw> merged https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/335956
[21:28] <blackboxsw> +1 on mocking param order suggestion
[21:30] <dojordan> awesome, that worked. thanks!