Netuitive / chef-netuitive

Installs Native Netuitive Agent
MIT License
4 stars 6 forks source link

[WIP] fixes: #33, #34 #35

Closed majormoses closed 8 years ago

majormoses commented 8 years ago

Better chef version support:

majormoses commented 8 years ago

@emilhdiaz took a first crack but needs more work, chef 11 is still grumpy and I have not written anything for chef 11 for a while. If you have some time to look into it a little more that would be greatly appreciated. I did some restructuring to support testing of multiple versions of chef easier.

emilhdiaz commented 8 years ago

@majormoses thanks for taking the lead with this. I had some similar changes in my fork, but I'm still running into other issues on Chef 11 both in that fork and with this branch. I haven't had time to figure out the error below just yet. Any thoughts on what this could be?

Recipe Compile Error in /var/lib/aws/opsworks/cache.stage2/cookbooks/netuitive/libraries/resource_collector.rb

ArgumentError
-------------
wrong number of arguments (1 for 0)

Cookbook Trace:
---------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/netuitive/libraries/resource_collector.rb:2:in `<class:NetuitiveCollectorResource>'
/var/lib/aws/opsworks/cache.stage2/cookbooks/netuitive/libraries/resource_collector.rb:1:in `<top (required)>'

Relevant File Content:
----------------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/netuitive/libraries/resource_collector.rb:

1:  class NetuitiveCookbook::NetuitiveCollectorResource < Chef::Resource::LWRPBase
2>>   resource_name :netuitive_collector
3:    provides :netuitive_collector if defined?(provides)
4:  
5:    actions :create
6:    default_action :create
7:  
8:    attribute(:conf_path, kind_of: String, default: '/opt/netuitive-agent/conf/netuitive-agent.conf')
9:    attribute(:collectors_dir, kind_of: String, default: '/opt/netuitive-agent/conf/collectors')
10:    attribute(:cookbook_template, kind_of: String, default: 'netuitive')
11:    attribute(:custom_collectors, kind_of: Hash)
majormoses commented 8 years ago

@emilhdiaz its been interesting to try to go back to chef 11 land...and realize how much more I appreciate what they did in chef 12...

Interesting as I did not see that error but instead a different one regarding provider not found. Do you get the same error testing in kitchen?

majormoses commented 8 years ago

@emilhdiaz I seem to be able to get it to work with either chef 11 or 12 but not both...I am going to say its not worth the effort here...if you are willing to put a working PR together for 11 and 12 working then I am happy to accept it, otherwise I am gonna say this cookbook only support chef 12. If you want I can push my working chef 11 to a branch that you can use though I would strongly encourage you to make the upgrade to 12 as there will not be much effort going into adding new functionality into chef 11.