[16:13] <smoser> rharper, blackboxsw would like some thoguhts on https://code.launchpad.net/~d-info-e/cloud-init/+git/cloud-init/+merge/340112
[16:49] <brunobronosky> Anybody 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:58] <blackboxsw> brunobronosky: did you specify  install_type: "omnibus" in the chef: #cloud-config section?
[16:59] <blackboxsw> I thought I had validated this in a review on chef module a few months ago
[17:01] <blackboxsw> if install_type: 'packages' is specified as per that example, cloud-init will pull from distro packages
[17: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#L94
[17:02] <brunobronosky> Yep. 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:03] <blackboxsw> no 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 module
[17:04] <brunobronosky> I need to go back to http://media.tmz.com/2016/02/06/0206-derek-zoolander-vh1-films-paramount-pictures-01-1200x630.jpg
[17:04] <blackboxsw> I 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#chef
[17:05] <blackboxsw> excellent link brunobronosky . Glad you've got my same appreciation for good/bad movies.
[17:57] <blackboxsw> hrm, 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 branch
[17:59] <blackboxsw> I'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 stage
[19:39] <brunobronosky> Woot! 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:40] <brunobronosky> But 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.py
[19:41] <brunobronosky> But an error I encountered along the way raised an interesting question. http://termbin.com/k4m4
[19:44] <Gaffel> What version of cloud-init is that?
[19:48] <brunobronosky> I 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] <brunobronosky> Gaffel 17.1
[20:00] <blackboxsw> brunobronosky: 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 items
[20:01] <blackboxsw> brunobronosky: on the failed node you could call ubuntu-bug cloud-init and it'd prompt you for the information to file a bug
[20:01] <brunobronosky> ha! didn't know that. nice.
[20:01] <blackboxsw> that's:      ubuntu-bug cloud-init  on the commandline of the failed node
[20:02] <blackboxsw> yeah it's a recent addition it collects all cloud-init logs and user-data if you let it so you don't have to
[23:02] <blackboxsw> ok fixed up my hostname setting branch to take into account errors and retry. tested ec2 & vsphere. adding unit tests now
[23:02] <blackboxsw> https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/339720