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

=== nacc_ is now known as nacc
=== nacc_ is now known as nacc
smoserrharper, blackboxsw would like some thoguhts on https://code.launchpad.net/~d-info-e/cloud-init/+git/cloud-init/+merge/34011216:13
=== cj_ is now known as cj
=== dustymab1 is now known as dustymabe
=== rharper` is now known as rharper
brunobronoskyAnybody here have experience with cloud-init + chef? I'm trying to use http://cloudinit.readthedocs.io/en/17.1/topics/examples.html#install-and-run-chef-recipes and it is not respecting my intent to install the chef omnibus and is installing chef/xenial package instead.16:49
blackboxswbrunobronosky: did you specify  install_type: "omnibus" in the chef: #cloud-config section?16:58
blackboxswI thought I had validated this in a review on chef module a few months ago16:59
blackboxswif install_type: 'packages' is specified as per that example, cloud-init will pull from distro packages17:01
* brunobronosky does not read comments good! https://github.com/cloud-init/cloud-init/blob/ubuntu/17.1-0ubuntu1/doc/examples/cloud-config-chef.txt#L9417:01
brunobronoskyYep. That is exactly what it is doing. Sorry.17:02
* blackboxsw thinks that example is confusing/muddled, it tries to comment multiple behaviors at the same time.17:02
blackboxswno worries brunobronosky good news is, it's on our radar to update schema definitions and docs for modules like chef this year, so this should be better documented as we get through this module17:03
brunobronoskyI need to go back to http://media.tmz.com/2016/02/06/0206-derek-zoolander-vh1-films-paramount-pictures-01-1200x630.jpg17:04
blackboxswI generally also go to the specific module docs too when looking at how to configure it. But, unfortunately chef is not currently that helpful. http://cloudinit.readthedocs.io/en/latest/topics/modules.html#chef17:04
blackboxswexcellent link brunobronosky . Glad you've got my same appreciation for good/bad movies.17:05
blackboxswhrm, ok so a datassource's metdata is only updated by the std datasource.get_data() which gets both user-data and meta-data, either we can decouple those  in all datasources to process metadata alone, or we add a cache_clear option to the datasource if errors are raised during userdata processing. either way looks like this hostname setting early  is going to be a bigish branch17:57
blackboxswI'm more inclined to go the UserDataProcess raises errors approach and the datasource base class could handle that exception and avoid caching metadata  userdata on the datasource in that case (because we know we'll be re-running in a later cloud-init stage17:59
brunobronoskyWoot! I have finally got my "cloud-init chef bootstrap" POC done. It's pretty functional, but I need to find a way to use the value of the ECS Name tag in the user-data file which is of type cloud-init.19:39
brunobronoskyBut anyway, to do it I used and undocumented feature `exec_arguments` that I found in https://github.com/cloud-init/cloud-init/blob/ubuntu/17.1-0ubuntu1/cloudinit/config/cc_chef.py19:40
brunobronoskyBut an error I encountered along the way raised an interesting question. http://termbin.com/k4m419:41
GaffelWhat version of cloud-init is that?19:44
brunobronoskyI fixed that error by quoting the entries like so http://termbin.com/ymz6 But I think it's a bug that YAML is passed directly to cmd.extend because util.subp is never going to like int, or any other non-strings.19:48
brunobronoskyGaffel 17.119:48
blackboxswbrunobronosky: your example could also be   exec_arguments: '-d -i 1800 -s 20'      and that'd work. I think it's worth a bug against cc_chef, it's taking the proper yaml (including int types and blindly appending it the to subprocess call on the cli, it shouldn't be calling util.subp with a list containing non-string items20:00
blackboxswbrunobronosky: on the failed node you could call ubuntu-bug cloud-init and it'd prompt you for the information to file a bug20:01
brunobronoskyha! didn't know that. nice.20:01
blackboxswthat's:      ubuntu-bug cloud-init  on the commandline of the failed node20:01
blackboxswyeah it's a recent addition it collects all cloud-init logs and user-data if you let it so you don't have to20:02
blackboxswok fixed up my hostname setting branch to take into account errors and retry. tested ec2 & vsphere. adding unit tests now23:02
blackboxswhttps://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/33972023:02

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