[00:28] hi all - relatively new to cloud-init, but I haven't been able to find an answer to this yet ... does cloud-init support setting variables which can be used subsequently in templates - example FOO=bar, then within a template {{FOO}} for expansion ? I'd want to apply this in cloud.cfg, allowing me to set more generic/templatized templates, that can be tweaked based on the base cloud.cfg information [00:52] harlowja_, coul dyou merge with trunk? [00:53] there is one conflict in debian.py [01:09] harlowja_, and if you are around... [04:22] harlowja_, i merged for yhou. [04:23] all-in [04:23] and uploaded to yakkety [04:23] so you better not have messed it up! === rharper` is now known as rharper [10:54] hi team [10:54] need a help with cloud-init on centos [11:00] anyone there? [11:05] coolshiva123: Ask your question, and if anyone knows the answer then they might respond. :) [11:28] I have a centos7 template and i have some scripts in per-boot [11:28] the cloud-init fails to execute them [11:28] i have a clean cloud-init.log [11:28] and cloud-init-output.log [11:28] anyway to troubleshoot why cloudinit ignores script in per boot? [11:58] coolshiva123, are they executable ? [11:59] you should be able to run [11:59] sudo cloud-init single --name=scripts-per-boot --frequency=always [11:59] and with '--debug' you'll get mroe output to screen. [12:17] hi [12:18] these scripts are definitley executable [13:06] [root@bceglc298 per-boot]# cloud-init single --name scripts-per-boot --frequency always --debug usage: cloud-init [-h] [--version] [--file FILES] [--debug] [--force] {init,modules,query,single} ... cloud-init: error: unrecognized arguments: --debug [15:43] coolshiva123, --debug has to go to cloud-init not to 'single' === Toger_ is now known as Toger [16:49] smoser thx boss [16:49] i was gonna merge today, but i guess u did [16:49] yeah, i fixed that. [16:49] pylint and six is obnoxious [16:49] lol [16:49] pylint --errors-only is really helpful [16:49] but six really tricks it out [16:49] on curtin we run --errors-only and it catches so many things [16:49] cool [16:50] but here it has a bunch of false positives [16:50] maybe 12 [16:50] smoser i was thinking, do u still want daemon support in cloud-init ? something that uses pyudev for example to get notified of hardware changes and activates modules? [16:50] that was a cloud-init 2.0 thing, but doesn't seem so hard to do it ... [16:51] so.. [16:51] plans for cloud-init in near term. [16:51] a.) get 0.7.8 release that works for network configuration on centos on NoCloud and ConfigDrive [16:51] b.) get to git [16:52] c.) support getting network configuration from network'd datasources [16:52] k [16:52] ie, in he OpenstackMetadata [16:52] so tha'td mean in the local stage, we'd bring up networking for the localnet and check 169.254.169.254 [16:53] and then say "oh look, my networking!" [16:53] smoser u might also want to comment on https://review.openstack.org/#/c/324054/ [16:53] i'll eventually start a openstack-dev ML about that if it doesn't move [16:53] its sorta whacky to say 'the bug is there, and we aren't gonna change it, to bad...' [17:00] its not really a bug [17:00] just stupid [17:00] :-p [17:00] chaing the format of an opaque string is not breaking abi [17:00] agreed [17:01] it would seem like a change in EC2 from : [17:01] i-abcdefg [17:01] to [17:01] i-abcdefgh [17:01] omg [17:01] how dare u [17:01] lol [17:01] (ie, they realized at some point that 6 chars was not enough) [17:01] this is actually true [17:01] nice [17:01] lol [17:01] and it actually *did* break things (stupid things) [17:01] stupid things be stupid [17:01] that assumed 8 chars (or whatever it was) was how long that thing should be [17:02] all that MP is doing is replacing the internal (host) interface name [17:02] with another interface name, right? [17:02] as long as it keeps the value as consistent as the previous value (not changing on reboot, or stop/start) then it would surely seem fine to me [17:09] ya, seems fair to me [17:11] smoser comment on that review :-P [17:11] on it [17:14] harlowja_, how do i review ? [17:14] press 'A' [17:14] i'm logged in... but i dont see a text area or anhyting [17:14] ya, the GUI changed [17:15] lowercase 'a' [17:15] man. [17:15] that is *worse* than it used to be! [17:15] which is pretty technically impressive [17:15] def [17:15] no disagreements from me, it got weirder [20:52] I'm trying to play around with cloud-init modules. I want to write a simple handler that takes the user-data passed in an EC2 instance and writes it to a yaml file. [20:53] what datatype is _cfg? [20:54] in the handle function `def handle(name, _cfg, _cloud, log, _args):` [21:01] sather i believe its just a dict [21:02] cloud is just a http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/cloud.py#L43 object [21:02] and args are i forget, lol [21:52] where'd the amazon guy go [21:52] damn, we lost him already :( [22:06] harlowja_: thanks [22:40] smoser: i see you maintain cloud-init for ubuntu. surprisingly, in ubuntu-14 cloud images, network config via cloud-init (0.7.5) does not work because "ifup: failed to open lockfile /run/network/ifstate.lo: No such file or directory" during first boot. is this worth filing a bug or never get looked at due to age of release? [22:41] smoser: or maybe it's packaging error for cloud images and should not go to cloud-init package? [22:44] could someone help me understand this error: [22:44] __init__.py[WARNING]: Unhandled no [22:44] n-multipart (text/x-not-multipart) [23:00] realized I should be using write_files module [23:09] the snippet in cloud-init-container.conf that does mkdir -p /run/network needs to also be done for non-containers or ifup --all fails [23:15] it runs _bring_up_interface() before network-interface.conf / network.conf have run apparently, which fails on ubuntu [23:15] due to mk /run/network [23:15] no [23:17] i'll bet the tests do not try static ip setup, only dhcp and that probably works [23:30] yeah, i can see, init-local banner, then ifup --all fails, then cloud-init-nonet runs (which blocks waiting for static), and finally static networking comes up, which is the one that does the mkdir -p. so it happens too late, it can never work [23:33] how do i inject runcmd in there to mkdir -p? network comes from metadata, it looks like it runs before anything from user-data [23:58] grr...boss says we can't use write_files directive [23:58] because we need to not touch the metadata file [23:58] :(