/srv/irclogs.ubuntu.com/2017/02/02/#cloud-init.txt

bob_cheeseymorning all - I've been having some issues setting the hostname on debian jessie using 0.7.6 (and 0.7.7) - is there somewhere I can raise issues like this? I'm not sure whether it's a bug or my implementation11:25
bob_cheeseywell clearly this isn't the place to ask!13:31
rharperbob_cheesey: it's mostly quiet here except during US Central hours;  ask away and we usually get back to you if your still in-channel ;  you can report bugs here: https://bugs.launchpad.net/cloud-init13:41
* rharper has to take kiddos to school, bbiab 13:41
bob_cheeseyrharper: ah thanks, that's useful to know!13:42
bob_cheeseyi'll try again later13:42
smoserrharper, http://paste.ubuntu.com/23911739/16:07
magicalChickenbob_cheesey: are you getting a timeout from hostnamectl in cc_set_hostname?18:43
magicalChickenI've had similar issues on centos but haven't had time to debug18:44
burgerksmoser, sorry I was out of the office yesterday...  to followup on the issue I was having with rebooting without the ConfigDrive attached.   I captured the logs you requested.   I believe this is likely the section of logs of interest.  http://paste.ubuntu.com/23912850/19:27
burgerkI can attach a tar of all the logs, just tell me where19:29
smoserburgerk, yeah... where is this running ?19:30
smoserwhat os are you on ?19:30
smoserand what openstack ?19:30
smoserxen, isnt it.19:30
burgerkUbuntu 16.04.119:32
burgerkor host hardware ?19:32
smoseryour guest is 16.0419:32
burgerkyes19:32
smoserdo you  know what openstack version is under you ?19:32
burgerkNewton ... or do you want a specific driver #19:33
smoserburgerk, is it xen ?19:39
burgerkppc64le19:39
smoserrharper, ^19:39
smoserwow.19:39
rharper\o/19:40
smoserthis very thing rharper and i were wondering about19:40
smoser:)19:40
rharpervirsh dumpxml need19:40
smoserburgerk, can you do that ^ ? can you get at the host at all ?19:40
rharpersmoser: IIRC ppc64le has a uuid out in the device tree sys path19:41
smoserso in your guest, can you do this, burgerk19:42
smoser sudo grep . -r /sys/firmware/devicetree/ | grep -v Binary19:42
smoser sudo grep . -r /sys/firmware/devicetree/ | grep -v Binary | pastebinit19:42
rharper /sys/firmware/devicetree/base/vm,uuid19:43
rharper but yeah, a full collection will be super useful19:44
smoserthat is crazy helpful, burgerk19:44
burgerkhttp://paste.ubuntu.com/23912946/19:45
smoserbooo19:45
burgerknot much there19:45
smosercan just19:46
smoser cat /sys/firmware/devicetree/base/vm,uuid19:46
smosershows no file ?19:46
smoser(ie,m wondered if grep -r didn't follow a symlink maybe)19:46
burgerkyes19:47
burgerkno such file19:47
burgerkcontents of /sys/firmware/devicetree/base  http://paste.ubuntu.com/23912964/19:50
smoser ibm,partition-uuid ?19:51
smoserand artition-name19:51
smoseranything in those ?19:51
smoseris this kvm ?19:51
smoseror is it powervm19:51
smoseroh. wait. i dont knwo if there is ppc64el powervm19:51
smoserand system-id19:51
smosertheres just binary stuff in there ?19:51
burgerkpowervm19:52
burgerkibm,partition-uuid 7ab415a2-30e7-482f-8806-e9ec4197b7ba19:53
smoserthat by chance match the uuid ?19:54
smoserfrom the openstack c onfig drive?19:54
burgerkinstance -> /var/lib/cloud/instances/fab415a2-30e7-482f-8806-e9ec4197b7ba19:55
burgerksame except 1st character19:56
rharpereww19:58
burgerkI don't have config drive anymore, removed to repeat test19:58
rharperthat looks bugy19:58
smoserwow19:58
smoserthat would be a massive coincidence19:59
smoser:)19:59
rharperhttps://review.openstack.org/#/c/200879/20:00
rharperbut doesn't show where it would appear20:00
smoserburgerk, so why didnt our 'grep ." above show us that file ?20:00
burgerkpowervm20:00
burgerksorry bad paste20:00
rharperhttps://github.com/openstack/nova-powervm/blob/master/nova_powervm/virt/powervm/vm.py#L31020:01
burgerkso that covert method is changing the system UUID byte 0, bit 0 to 020:17
rharpereww20:22
rharpercertainly then the OpenStack instance UUID ought to match the UUID inside the vm20:23
rharpereven if they need to drop a bit to avoid collisions (or for whatever reason)20:23
rharpernova list $UUID should match inside the instance ; I would think20:23
burgerkI believe the converted UUID is being sent as system UUID when the VM is created and the config drive contains the original openstack UUID20:26
rharperbut your instance symlink says otherwise20:27
rharpervs. the device-tree value which is created by the hypervisor20:27
burgerkinstance symlink matches config drive value20:27
rharperbut not the vm id20:27
rharperwhich is what the hypervisor got20:27
rharper ibm,partition-uuid ;  maybe that's by design20:28
burgerkyes I believe it is some sort of requirement that the system UUID bit 0 be 020:28
rharperwhat we were hoping for was something that indicated this was an openstack instance;  on KVM and Xen, for example the SystemVendor is set to Openstack20:29
rharperthat's mostly for the network-facing metadata service; config-drives indicate their presence via filesystem attributes;  however; IIRC, your issue was that you removed the configdrive, which also set the UUID, then when cloud-init runs a second time somewhere else, its looking for a datasource, it's going to search the system for a uuid to see if that matches existing instance directories20:31
burgerkyes that appears to be the issue20:31
rharperthat seems to have gone awry in that we're poking for DMI data (which we won't see on power); also, even if we did look at the partition,uuid, we'd need to apply a 1 to bit-0 of byte-0 to match if we're on powervm20:32
* rharper will bbiab, kiddo pick up time20:33
rharperburgerk: in your situation, did you set manual_cache_clean: True ? ISTR something (or someone) not wanting to set that; though for configdrive it's required if you expect it to boot with the same instance data;  if you do have that set, and it's failing (due to the search for dmi data on power) then definitely file a bug, https://bugs.launchpad.net/cloud-init20:58
burgerkThe drawback of that was that I can't just snapshot the VM and deploy that image then, right ?21:00
burgerkthere would be manual steps before snapshoting?21:01
rharperI think smoser pointed out that if you snapshot and boot somewhere else it _is_ a new instance; so you shouldn't deploy the snapshot without re-running cloud init21:04
rharperyou don't want nodes with the same ip, the same sshd host keys, etc21:04
burgerkright, I want cloud-init to run again if it is a new instance, i.e. new config drive and new UUID on it21:06
burgerkwhat I don't want is to have to manually delete something before I snapshot21:07
rharperhow are you deploying your snapshot? with openstack still, so nova boot points to an existing snapshot image?21:08
burgerkyes, snapshot the current VM with openstack, then nova boot pointing to that snapshot21:09
rharperIIUC, when you boot the snapshot again, cloud-init will run again, as it needs to since you're on a new instance;  but I'm guessing there is something that you don't want to run again as you're on this snapshot?21:09
burgerkI will give that a value a try and see what happens21:11
smoserrharper is right, it should all "just work"21:12
burgerksmoser, after snapshot and deploy of the snapshot, it is not writing network info from the config drive on first boot using manual_cache_cleanup: True21:59
smoserburgerk, i'm confused.22:01
smoserwhy are you setting manual_cache_cleanup=True ?22:01
smoser(and its manual_cache_clean (no "up").22:02
smoseri thoguht your problem before was that cloud-init *was* re-writing network configuration22:02
rharpersmoser: my fault22:03
burgerkrharper suggested using that property to fix the situation for removing the config drive22:03
rharpersmoser: when using a config drive, and then removing it, we have to use that , right?22:03
rharperit sounds like in manual_cache_clean mode, we don't re-render network-config?  but generate fall-back config (dhcp on first interface)22:05
rharperburgerk: in general the static network config is going to break if someone else also boots that static network config in the same tenant network22:05
smosermanual cache clean should basically mean that cloud-init always re-uses the stale data in /var/lib/cloud/instance/22:06
smoserand thus, the second time or any time after (even after snapshotting and re-deploying) it boots will think it is not first boot22:07
smoserbasically its *supposed* to just never go looking for a datasource again22:07
smoseras long as there is one in /var/lib/cloud/instance/22:07
rharperright; how does that intersect network config22:08
burgerkok, that was my understanding of the property and why I didn't want to use it ...   I need something like use datasource if it exists, otherwise stale data in /var/lib/cloud/instance/  :)22:08
rharperI've not seen the config-drive, but apparently it's including some static eni configuration which gets written to /etc/network/interfaces.d/50-cloud-init.cfg22:08
burgerkcorrect22:09
smoserburgerk, well, that i think is the behavior you'd get on intel22:09
smoserin a vm on openstack.22:09
rharperif we set manual_cache,  it appears that we're still doing fallback networking (re-writing the 50-cloud-init.cfg file) but not with the network info which should be embedded in the instance.obj right?22:10
smoserbecause on intel, cloud-init comes up and checks the product uuid and says "oh, its the same as the one in /ar/lib/cloud/instance. no need to look again".22:10
smoseri think.22:10
rharperburgerk: is it possible to share your user-data/meta-data files in your config-drive ?? (or a variant of it) ?22:10
smoserit shouldnt do that22:10
rharperbut burgerk is not using the same instance22:10
rharpersnapshot to cinder, nova boot -from-snapshot22:11
smoserfor sure its possible it is,b ut it shoudl only render networkign on first instance boot22:11
rharperit *is* a new instance22:11
rharperbut we're saying, use stale data (on purpose)22:11
burgerkwith the property set to true it is using stale data, not fallback data22:11
burgerkrharper, here is network config drive files https://paste.ubuntu.com/23913828/22:19
rharperburgerk: thanks, I'll recreate; I suspect you're still going to have issues with using the snapshot with stale-data; but if we say to use stale-data, then it shouldn't wipe the network config22:20
burgerkcorrect it appears to be using stale-data on all boots ( including first boot )22:21
burgerkrharper, smoser  I will also see if something can be done on the powervm side to get matching UUIDs for system UUID and ConfigDrive UUID value22:42
rharperok22:42
rharperif you asking, we're very interested in getting the Openstack Nova string into the devicetree output so we can detect that we're Openstack on ppc64le platforms22:43
burgerkok22:44
rharperor, somewhere else if devicetree isn't possible22:50

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