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