/srv/irclogs.ubuntu.com/2016/06/16/#cloud-init.txt

zero_shanehi 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 information00:28
smoserharlowja_, coul dyou merge with trunk?00:52
smoserthere is one conflict in debian.py00:53
smoserharlowja_, and if you are around...01:09
smoserharlowja_, i merged for yhou.04:22
smoserall-in04:23
smoserand uploaded to yakkety04:23
smoserso you better not have messed it up!04:23
=== rharper` is now known as rharper
coolshiva123hi team10:54
coolshiva123need a help with cloud-init on centos10:54
coolshiva123anyone there?11:00
Odd_Blokecoolshiva123: Ask your question, and if anyone knows the answer then they might respond. :)11:05
coolshiva123I have a centos7 template and i have some scripts in per-boot11:28
coolshiva123the cloud-init fails to execute them11:28
coolshiva123i have a clean cloud-init.log11:28
coolshiva123and cloud-init-output.log11:28
coolshiva123anyway to troubleshoot why cloudinit ignores script in per boot?11:28
smosercoolshiva123, are they executable ?11:58
smoseryou should be able to run11:59
smoser sudo cloud-init single --name=scripts-per-boot --frequency=always11:59
smoserand with '--debug' you'll get mroe output to screen.11:59
coolshiva123hi12:17
coolshiva123these scripts are definitley executable12:18
coolshiva123[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: --debug13:06
smosercoolshiva123, --debug has to go to cloud-init not to 'single'15:43
=== Toger_ is now known as Toger
harlowja_smoser thx boss16:49
harlowja_i was gonna merge today, but i guess u did16:49
smoseryeah, i fixed that.16:49
smoserpylint and six is obnoxious16:49
harlowja_lol16:49
smoserpylint --errors-only is really helpful16:49
smoserbut six really tricks it out16:49
smoseron curtin we run --errors-only and it catches so many things16:49
harlowja_cool16:49
smoserbut here it has a bunch of false positives16:50
smosermaybe 1216:50
harlowja_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
harlowja_that was a cloud-init 2.0 thing, but doesn't seem so hard to do it ...16:50
smoserso..16:51
smoserplans for cloud-init in near term.16:51
smosera.) get 0.7.8 release that works for network configuration on centos on NoCloud and ConfigDrive16:51
smoserb.) get to git16:51
smoserc.) support getting network configuration from network'd datasources16:52
harlowja_k16:52
smoserie, in he OpenstackMetadata16:52
smoserso tha'td mean in the local stage, we'd bring up networking for the localnet and check 169.254.169.25416:52
smoserand then say "oh look, my networking!"16:53
harlowja_smoser u might also want to comment on  https://review.openstack.org/#/c/324054/16:53
harlowja_i'll eventually start a openstack-dev ML about that if it doesn't move16:53
harlowja_its sorta whacky to say 'the bug is there, and we aren't gonna change it, to bad...'16:53
smoserits not really a bug17:00
smoserjust stupid17:00
harlowja_:-p17:00
smoserchaing the format of an opaque string is not breaking abi17:00
harlowja_agreed17:00
smoserit would seem like a change in EC2 from :17:01
smoser i-abcdefg17:01
smoserto17:01
smoser i-abcdefgh17:01
harlowja_omg17:01
harlowja_how dare u17:01
harlowja_lol17:01
smoser(ie, they realized at some point that 6 chars was not enough)17:01
smoserthis is actually true17:01
harlowja_nice17:01
harlowja_lol17:01
smoserand it actually *did* break things (stupid things)17:01
harlowja_stupid things be stupid17:01
smoserthat assumed 8 chars (or whatever it was) was how long that thing should be17:01
smoserall that MP is doing is replacing the internal (host) interface name17:02
smoserwith another interface name, right?17:02
smoseras 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 me17:02
harlowja_ya, seems fair to me17:09
harlowja_smoser comment on that review :-P17:11
smoseron it17:11
smoserharlowja_, how do i review ?17:14
harlowja_press 'A'17:14
smoseri'm logged in... but i dont see a text area or anhyting17:14
harlowja_ya, the GUI changed17:14
harlowja_lowercase 'a'17:15
smoserman.17:15
smoserthat is *worse* than it used to be!17:15
smoserwhich is pretty technically impressive17:15
harlowja_def17:15
harlowja_no disagreements from me, it got weirder17:15
satherI'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:52
satherwhat datatype is _cfg?20:53
satherin the handle function `def handle(name, _cfg, _cloud, log, _args):`20:54
harlowja_sather i believe its just a dict21:01
harlowja_cloud is just a http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/cloud.py#L43 object21:02
harlowja_and args are i forget, lol21:02
harlowja_where'd the amazon guy go21:52
harlowja_damn, we lost him already :(21:52
satherharlowja_: thanks22:06
smemshsmoser: 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:40
smemshsmoser: or maybe it's packaging error for cloud images and should not go to cloud-init package?22:41
sathercould someone help me understand this error:22:44
sather__init__.py[WARNING]: Unhandled no22:44
sathern-multipart (text/x-not-multipart)22:44
satherrealized I should be using write_files module23:00
smemshthe snippet in cloud-init-container.conf that does mkdir -p /run/network needs to also be done for non-containers or ifup --all fails23:09
smemshit runs _bring_up_interface() before network-interface.conf / network.conf have run apparently, which fails on ubuntu23:15
smemshdue to mk /run/network23:15
smemshno23:15
smemshi'll bet the tests do not try static ip setup, only dhcp and that probably works23:17
smemshyeah, 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 work23:30
smemshhow do i inject runcmd in there to mkdir -p? network comes from metadata, it looks like it runs before anything from user-data23:33
sathergrr...boss says we can't use write_files directive23:58
satherbecause we need to not touch the metadata file23:58
sather:(23:58

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