=== jroll is now known as Guest54515 === rangerpb is now known as rangerpbzzzz [01:53] can someone help me with a problem === Guest54515 is now known as jroll [14:52] rharper, https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1645644 [15:14] jgrimm: hrm, so pre-existing ntp.conf .. when dpkg installs, it will divert the package conf to a new file (where as cloud-init moves the original out of the way and replaces). Do you suppose we should do the same here? [15:15] not sure, i just wasn't sure if you'd noticed that bug yet [15:15] I had not [15:15] so, they're clearly adding 'ntp' key to trigger the install [15:15] but not using the existing pool or server list [15:16] so, not quite sure why; though possible that they want to tweak things... [15:16] indeed === rangerpbzzzz is now known as rangerpb [18:11] magicalChicken: what was the decision re: to many files open? [18:21] powersj: It was caused by polling for the system to be up using lots of calls to execute() [18:21] it went away once i switched back to polling in the instance [18:22] ah ok so you are going to go the route of updating your code [18:22] there's a new bug in centos with setting hostname, but it looks like its a cloud-inti issue [18:22] powersj: yeah, it is a bug in pylxd most likely, but the fix in the test suite is simple, so no sense in waiting until it can be fixed in pylxd [18:22] ok! [18:23] I've pushed the fix [18:23] is the fix committed such that I can keep testing? [18:23] ah :) [18:23] thank you! [18:23] The centos tests will still fail due to hostnamectl timing out when cloud-init tries to run cc_set_hostname thought [19:08] hello. Is there a general way to disable cloud-init after first init? [19:08] Im having a problem where if I take a snapshot of a cloud disk, boot up another Vm with it, it freezes upon boot because cloud init is looking for things again === X-Istence is now known as x58 [19:36] if you're booting a snapshot with the same UUID/instance-id, then it won't attempt to re-init; but if you change the instance-id then it will try to run again. That's by design as you don't want the same ssh keys and other generated data to be the same between different instances. [19:38] if you want, you can append cloud-init=disabled to the kernel command line, or if you modify your image, you can touch /etc/cloud/cloud-init.disabled which will prevent cloud-init from running [20:06] rharper: is there something without touchng the system much. If i understood correct I can add touch /etc/cloud/cloud-init.disabled to the end of my cloud-init script? [20:06] i saw tutorials that say to uninstall cloud-init, but for different distros the command will be different so this is not as portable [20:07] rharper: im booting the snapshot WITHOUT attaching the ISO again [20:07] im using the ISO method to use cloud init [20:08] so I launch the fedora_24_cloud.raw disk image with a cloud-init.iso attached. Everythings fine. now I snapshot the .raw disk, and spin up a new VM with it. WITHOUT the cloud-init.iso [20:08] and now it hangs indefinetaly [20:33] and if you boot your image without a cdrom in the first place, it will likely do the same (it's looking for a datasource) and takes quite a while to timeout; I suspect, somehow the instance_id in your second boot is different than the first; the cloud-init.log in the second boot will confirm; you should be able to just wait it out (like 10 or so minutes) or even just boot the snapshot image with the cdrom [20:33] bbiab [20:51] rharper: no cdrom attached yea. Hum.. okay i need to try touching the cloud-init.disabled [21:19] yea no go [21:20] touching that does nothing [21:20] its hanging at boot [21:20] this is fedora24 cloud image [21:32] do you see any boot messages to serial console ? [21:33] I usually do a "-serial telnet:localhost:2446:,nowait,server" to my qemu command, then when you launch it, you can telnet localhost 2446 and see boot messages and interact with serial console of the guest [21:37] rharper: humm i had VNC opened and I see nothing except the first line of the boot [21:38] if the image isn't booting properly, maybe its not cloud-init related [21:44] image boots fine if I attach the cloud-init.iso to it [21:45] i think its just looking for the iso/trying to connect to EC2 ip [21:45] i need to find how to tell it to not do that [21:45] (once its booted the first time in its life) [21:45] yum erase cloud-init at the end of the config script seems to be the solution but this is not portable [21:46] (havent tried it, just read blog about it) [21:46] well, it will eventually timeout trying to reach EC2; having the cloud-init.log of the second boot can help understand what's going on; [21:47] hum let me get that then sec [21:47] well not sec.. 10 min :po [21:48] hehe [21:48] yeah, it's a long timeout [21:48] brb going to store [21:54] not so slow actually [21:54] got dressed and its done [21:54] it spent 2 minutes trying to reach /latest/meta-data/instance-id on the gateway IP DHCP gave it [21:55] maybe more [21:55] DataSourceEc2.py[CRITICAL]: Giving up on md from ['http://169.254.169.254/2009-04-04/meta-data/instance-id'] after 21630 seconds [21:55] first that, then trying to reach the gateway ip 2 minutes, then it booted [21:55] yeah, I was interested in /var/log/cloud-init.log and /var/lib/cloud/instances/ [21:56] trying to recreate here [21:56] cloud-init.log is empty [21:56] that seems very wrong [21:56] (i added the touch .../.disabled [21:56] oh [21:56] though the first boot one should have run though [21:57] and it wouldn;'t have tried ec2 if it was disabled [21:57] instances has 1 UUID folder, and iid-datasource-none [21:57] it's like it never ran at all [21:57] your cdrom image would have included a meta-data file with an instance-id in it [21:57] that should be in /var/lib/cloud/instances/ [21:57] from the first boot [21:57] df -h shows me /dev/vda1 50G 446M 47G so the drive was expanded [21:57] if that's not there, then your snapshot isn't getting captured [21:58] or.. [21:58] yeah, cloud-init does that [21:58] yea it ran right the first time, because the SSHkeys i set are there [21:58] then i powerdown the instance + snapshot the disk [21:58] maybe I don't know what the fedora cloud-init is doing but the instance dir should be persistent [21:58] so basically the same thing as booting the instance again without the cloud-init.iso cdrom attached [21:59] right but it's not recording the instance data where cloud-init looks (at least on ubuntu) [21:59] inside the instance dir, includes a pickled datasource object that it re-uses on subsequent boots [21:59] obj.pkl is there i see it [22:00] then you have to have a /var/lib/cloud/instances/ ... [22:00] yes isntances folder has 2 folders in it [22:00] 1 is a UUID folder, the other is iid-datasource-none [22:00] ok, that makes sense [22:01] what I suspect is that without a way to specify the instance-id to cloud-init, it won;t know to use the previous uuid as a datasource [22:01] I'll confirm locally [22:01] somethign strange I see my cloud-config is truncated [22:01] cloud-config.txt in that uuid folder is missing a few things [22:01] ... it shows at the end [22:02] let me show you sec in gist [22:03] so unless we have a way to persist the instance-id (via a permanent datasource) I don't think cloud-init can know that it should use it; [22:03] you may want to look at using the nocloud seed (write out your user-data/metadata to /var/lib/cloud/seed/nocloud-net dir in the image itself [22:04] well upon the snapshot boot, it should ignore cloud init [22:04] as the instance is already configured [22:04] that;s not how cloud-init works [22:04] ah [22:04] it only knows it's configured if it finds that it's the same instance [22:04] in real clouds, the meta-data provides the instance-id; that's ephemeral , each time you launch a new vm, it's a new instance [22:04] and the ISO or webserver it tries to query tells it the id [22:04] it had a meta-data file [22:05] you can embed the same config from the iso in a dir inside the image [22:05] that will achieve what you want [22:05] i think that is exactly what I need [22:05] thanks for explaining [22:05] http://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html [22:05] sure [22:05] but I have this 1 wierd thing [22:06] that link shows it via iso, but if you just put the contents of the iso at /var/lib/cloud/seed/nocloud-net/{user-data,meta-data} [22:07] that solves alot of problems yea [22:08] https://gist.github.com/anonymous/5e47847afa56cdd01f88ef0d27aa62a4 this gist, the top is the cloud-config i passed the ISO, the bottom is what was in the instances /var/lib/cloud/instances/d2ffab6d-7ac9-423a-bc8a-023402a2d7a0/cloud-config.txt [22:08] why is there so many spaces in the root password, guessing its fine tho? [22:09] brb [22:17] not sure; possible your original cloud-config has trailing white space ? === rangerpb is now known as rangerpbzzzz