[01:13] <smoser> harlowja, around ?
[01:14] <harlowja> yo
[01:14] <smoser> i've something like this
[01:14] <smoser> http://paste.ubuntu.com/23896896/
[01:14] <smoser> which is clearly lame compared to what harlowja would come up with
[01:14] <smoser> but i want to be able to get the values() of this "enum" like thing
[01:14] <harlowja> just use the enum module?
[01:15] <smoser> that would be the easiest thing.. but if i can avoid the depends... and still work python2.6 i'd like to
[01:15] <harlowja> hmmm
[01:17] <harlowja> then i guess yours is sorta sneaky for that
[01:19] <harlowja> seems ok, due to 2.6 and desires to minimize depends
[01:19] <smoser> well, the pain was that i wanted to then check if a user provided string was a valed entry
[01:20] <smoser> basicaly, if it were a dict, i wanted to:
[01:20] <smoser>  if foo in thatthing.keys()
[01:22] <harlowja> not work?
[01:27] <smoser> well, no. because keys() isn't hooked up to anyting
[01:27] <harlowja> ah, right
[01:33] <harlowja> one sec
[01:55] <smoser> harlowja, just when you thought i could not get any more ghetto
[01:55] <smoser> http://paste.ubuntu.com/23897038/
[01:56] <harlowja> ya, closer to where i was going to go, ha
[02:10] <harlowja> http://paste.openstack.org/show/596960/ smoser
[02:10] <harlowja> is what i got
[02:10] <harlowja> may be good enough for u, may not be, ha
[02:13] <harlowja> not sure why __contains__ wouldn't work (but it didn't, ha)
[02:13] <smoser> yeah, thanks.
[02:14]  * smoser turns to pumpkin
[02:14] <smoser> later
[02:14] <smoser> thank you!
[02:15] <harlowja> peace
[15:29] <burgerk> Hi, question ...  using cloud-init in Ubuntu 16.10, is it a requirement now that the datasource with network be available at all times and not just at first boot for network setup ?   It appears that if I remove the datasource and reboot the VM, I lose static network settings
[15:45] <rharper> burgerk: I think you may need to use the manual_cache_clean: True setting to indicate that you want to re-use the existing instance data;  can you clarify what you mean by losing static network settings?  was that part of your user-data?
[15:45] <rharper> https://bugs.launchpad.net/cloud-init/+bug/1596013  has more details
[15:46] <burgerk> if I remove the datasource and then reboot the VM, the static IP of the VM is no longer set
[15:48] <burgerk> information that would typically go in the interfaces file that now goes in /etc/network/interfaces.d/50-cloud-init.cfg
[15:53] <burgerk> rharper: being able to snapshot the instance is important, so I don't want to have to manually clean the cache
[16:06] <rharper> burgerk: does the bug above capture your issue (other than not wanting to use manual-cache-clean)?  50-cloud-init.cfg is auto-generated, so I'm unsure of how you're getting static network configuration into it without using cloud-init network: config  ?
[16:07] <rharper> smoser: which reminds me, I think we need to import some network config documentation from curtin; I'm not seeing it in the cloud-init RTD
[16:10] <burgerk> rharper: yes that does appear to be the same issue.  Here is my scenario, on initial boot, datasource exists ( ConfigDrive ) and set the static network information as expected for first boot.   At some later point, the config drive is removed and the VM is rebooted.  When the VM reboots that network information from the first boot is now gone and it attempts to connect as DHCP
[16:12] <burgerk> cloud-init-0.7.8-1-g3705bb5
[16:17] <smoser> rharper, yes, we probably should pull it over.
[16:18] <smoser> burgerk, what is the datasource you're using ?
[16:18] <burgerk> ConfigDrive
[16:18] <smoser> on openstack ?
[16:18] <burgerk> yes
[16:18] <smoser> you should not depend on the metadata service on subsequent boots there.
[16:19] <smoser> wait... maybe...
[16:19] <smoser> let me see.
[16:20] <smoser> you should be ok... if your system's uuid (in dmi data) matches your instance id
[16:20] <smoser> as it does on openstack provided vms
[16:20] <rharper> smoser: IIUC, the use-case is to snapshot that and move to new instance
[16:21] <smoser> https://git.launchpad.net/cloud-init/tree/cloudinit/sources/DataSourceConfigDrive.py#n137
[16:21] <smoser> well, then its a new instance!
[16:21] <smoser> and it should go get new network data
[16:21] <smoser> other wise you'd alway have the same static ip address everywhere.
[16:22] <burgerk> things work fine on first boot, network info is rewritten.
[16:24] <burgerk> the problem is if config drive is removed and there is no datasource.  The network config file is cleared and the information to repopulate is gone
[16:25] <burgerk> I did not expect interfaces.d/50-cloud-init.cfg to be cleared on every reboot
[16:26] <burgerk> smoser, is that the expected behavior?  to rewrite networking on every boot, not just first boot now? ( previously using cloud-init 0.7.7 )
[16:30] <smoser> it should rename devices, but should not re-render that file
[16:31] <smoser> https://git.launchpad.net/cloud-init/tree/cloudinit/stages.py#n621
[16:31] <smoser> you should take that "not a new instance. network config is not applied"
[16:32] <smoser> burgerk, can you do me a favor
[16:32] <smoser> a.) boot an instance with disk attached
[16:33] <smoser>   mkdir orig-boot; mv /var/log/cloud-init* orig-boot/ ; cp /run/cloud-init -a orig-boot/
[16:33] <smoser> b.) detach disk, reboot
[16:33] <smoser> c.) re-do copy logs like in 'a' but to second-boot
[16:34] <burgerk> ok
[16:44] <smoser> burgerk, this is actually  openstack ?
[16:44] <smoser> or your local usage of config drive
[16:44] <burgerk> straight openstack
[16:51] <smoser> rharper, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/316033
[16:54] <rharper> smoser: lol @ Genuine
[17:01] <smoser> and https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/315832
[22:44] <burgerk> smoser, I collected the logs you requested, but in the process, I think I may have found what is causing this issue.
[22:44] <burgerk> https://git.launchpad.net/cloud-init/tree/cloudinit/stages.py#n243
[22:45] <burgerk> wouldn't deleting that file make it appear to be first boot again after the reboot?