[04:45] <nk121> anyone around? trying to merge to cloud-init files and not having any luck
[04:46] <nk121> the file /var/lib/cloud/instances/INSTANCE_ID/cloud.cfg  only shows the first file, and i can see both files in user-data.txt
[05:36] <nk121> n/m its working now
[05:43] <nk121> well, working more, its combining the two files, but its replacing sections, not combining
[05:43] <nk121> this doc http://cloudinit.readthedocs.org/en/latest/topics/merging.html  seems to imply the new way should combine 
[05:44] <nk121> and it gives an exact example of what i'm looking for -- combinging run_cmds
[05:57] <nk121> i tried the merge_how from comment #4 from https://bugs.launchpad.net/cloud-init/+bug/1316323
[05:57] <nk121> but same thing
[05:57] <nk121> my run_cmd section is not merging
[06:05] <nk121> merge_how: "dict(allow_delete,recurse_array)+list(recurse_array,append)"
[06:05] <nk121> shouldn't that list(recurse_array,append) do the trick?
[10:43] <zilberstein> harlowja_away, I specified timezone as the following:
[10:43] <zilberstein> timezone: UTC
[10:43] <zilberstein> doesnt work
[10:43] <zilberstein> I specified timezone in /etc/cloud/cloud.cfg
[10:43] <zilberstein> but it was not set
[12:50] <zilberstein> so why that bloody cloud-init do not set timezone ?!
[12:54] <Odd_Bloke> zilberstein: Is there anything in /var/log/cloud-init.log to suggest the problem?
[12:57] <zilberstein> Odd_Bloke, nothing related to timezone
[12:57] <zilberstein> that's the thing !
[12:57] <zilberstein> it silently ignores timezone !
[12:58] <Odd_Bloke> zilberstein: How are you checking what timezone is set? (And what distro are you on?)
[12:58] <zilberstein> cat /etc/sysconfig/clock, redhat
[12:58] <zilberstein> 6
[12:58] <zilberstein> also /etc/localtime 
[13:01] <Odd_Bloke> zilberstein: Is timezone in one of the module lists in cloud.cfg?
[13:04] <smoser> zilberstein, the timezone module only runs once per instance.
[13:04] <smoser> so booting, then changing /etc/cloud/cloud.cfg to have it, will not result in a reboot causing any change.
[13:05] <smoser> you'd need to specify user-data to affect it. or either
[13:05] <smoser>  a.) rm /var/lib/cloud/instance/sem/config_timezone && reboot
[13:06] <smoser> b.) sudo cloud-init single --frequency=always --name=timezone
[13:06] <smoser> c.) give user-data (or a part of multipart user-data) including:
[13:06] <smoser>  #cloud-config
[13:06] <smoser>  timezone: UTC
[13:07] <smoser> d.) capture the image, and then deploy it again (which changes the instance-id, which makes that "per-instance" module run again).
[13:08] <smoser> also, as Odd_Bloke said, you have to make sure that the module is enabled in /etc/cloud/cloud.cfg
[13:11] <smoser> i'm not 100% certain that cloud-init timezone works for rhel, but what it looks like it intends to do is
[13:11] <smoser>  delete /etc/localtime
[13:12] <smoser>  symlink /etc/localtime -> /usr/share/zoneinfo/UTC
[13:13] <smoser> now, if /usr/share/zoneinfo/UTC did not exist, it log an exception 'Invalid timezone'
[13:13] <smoser> zilberstein, ^
[13:24] <zilberstein> smoser, I know. Timezone was configured before instance started
[13:25] <smoser> zilberstein, cloud-init will configure it (i think correctly), but only does that once per instance. cloud-init is about initialization, not runtime sytem configuration.
[13:25] <zilberstein> smoser, I thought cloud-init should remove /etc/localtime and create new symlink on its own
[13:25] <smoser> well, it does.
[13:25] <smoser> once per instance.
[13:26] <smoser> launch an instance with the user-data (in 'c' above) and see if you get what you want. or do 'a'. i think it will.
[17:21] <nk121> good morning friends
[17:21] <nk121> i'm having trouble merginging to cloud init configurations
[17:22] <nk121> i don't understand the merge syntax
[17:22] <nk121> its not combining my runcmd and write_files sections, but instead overriding them in the second file
[17:34] <harmw> smoser: whats that ubuntu version and branch for cirros-dev again?
[17:37] <smoser> https://code.launchpad.net/cirros
[17:37] <harmw> sry, u meant the updated buildroot for ubuntu 14.04 (?) :)
[17:37] <harmw> *I meant
[17:38] <smoser> ah
[17:38] <smoser> https://code.launchpad.net/~smoser/cirros/buildroot-upgrade
[17:38] <harmw> cool
[17:39] <nk121> smoser: any tips on how to debug merges?
[17:41] <harlowja> nk121 eck, damn merging :(
[17:41] <nk121> :(
[17:41] <harlowja> haha
[17:41] <harlowja> i sorta created it, unleashed it on the world, lol
[17:41] <nk121> thanks :)
[17:41] <harlowja> ^ for better or worse, ha
[17:41] <harlowja> ha
[17:42] <nk121> i feel i'm trying to do something simple, just combine two files, no overwriting
[17:42] <nk121> actually q1- is there a way to re-run the merge without launching a new instance? (i figured out how to re-run cloud init on a box, but thats after the merge step)
[17:43] <nk121> q2- the docs seem to imply the defaults for the new merge style is what i'm looking for, but i don't see that being the case
[17:43] <harlowja> hmmm, i don't think so; pretty sure the merging happens to early
[17:43] <harlowja> let me see if i can make a way for u to try this merge stuff without having to boot instances all the time
[17:44] <nk121> if i don't have any merge_how sections, should the default do what i'm expecting?
[17:44] <nk121> which is, combine the two runcmd and write_files sections from two cloud init files
[17:44] <nk121> not overwrite or replace 
[17:45] <nk121> (i'm running on trusty using the ec2 default image)
[17:45] <harlowja> one way to find out :-P
[17:45] <nk121> well so far, does not seem to :P
[17:47] <harlowja> :)
[17:55] <harlowja> nk121 ok, so http://paste.ubuntu.com/10671425/ that should make it easier for u to mess around
[17:55] <harlowja> if u just run that on a vm with cloud-init; u can adjust that and see what the final result is...
[17:55] <harmw> smoser: I noticed some nice fbsd specific additions on LP
[17:56] <nk121> harlowja: ok, i'll give it a shot
[17:57] <harlowja> for example http://paste.ubuntu.com/10671436/ might be what u want
[17:57] <harlowja> that comes up with
[17:57] <harlowja> Merged result:
[17:57] <harlowja> {'a': 'b', 'c': [1, 2, 3, 4]}
[17:57] <harlowja> ^ list appends
[17:57] <harlowja> if u feel like it, keep track of a little readme doc about this while u are learning, could be useful docs for others
[17:58] <harlowja> since i know its not so obvious...
[17:59] <nk121> harlowja: sure, if i figure this out, i'll write up what i did and how to debug it
[17:59] <harlowja> thx; feel free to mutate the above script; probably useful for others to
[17:59] <harlowja> mutate/own/whatever lol
[17:59] <harlowja> maybe mutate not best word :-P
[18:00] <nk121> i follow ya
[18:06] <nk121> wow, its so much faster to develop when you can re-run locally =-]
[18:06] <nk121> and your second paste lead me to the solution
[18:06] <nk121> i only had the merge_how section in the first file
[18:07] <nk121> that seems to not be whats described in Specifying multiple types and its effect  in http://cloudinit.readthedocs.org/en/latest/topics/merging.html
[18:09] <nk121> or maybe i'm just not parsing that right
[18:09] <nk121> (the doc text)
[18:12] <harlowja> ya, u probably don't need it in certain ones, but how it works is that the current payload defines the merge_how ; which will then be used with the prior already merged/whatever yaml
[18:12] <harlowja> it doesn't really retain what was the 'last'
[18:12] <harlowja> although it could i suppose, just doesn't currently
[18:13] <nk121> i think that doc page could use a working example, and an explanation of the merge options
[18:13] <harlowja> sure
[18:13] <harlowja> http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/doc/merging.rst
[18:13] <harlowja> commits welcome ;)
[18:13] <harlowja> or any adjustments u feel appropriate
[18:14] <nk121> ok i've added it to my list, i'll give it a shot after i get this milestone completed
[18:14] <harlowja> cools
[18:14] <nk121> but regardless, you've got me unstuck, and i really appreciate that
[18:15] <harlowja> np
[18:15] <harlowja> here to serve!