sous-chefs / consul

Development repository for the consul cookbook
https://supermarket.chef.io/cookbooks/consul
Apache License 2.0
192 stars 244 forks source link

Recent Chef version (Chef 14.5.33?) breaks consul_config resource #506

Closed jeffbyrnes closed 4 years ago

jeffbyrnes commented 6 years ago

I’ve filed an issue upstream over here: poise/poise#37

Figured I’d open one here, too, just in case. Here’s the relevant backtrace:

expected no Exception, got #<NoMethodError: undefined method `new_resource' for ConsulCookbook::Resource::ConsulConfigV1> with backtrace:
  # /private/var/folders/30/nsmp68z977s8q1x10z4h9_fr0000gn/T/chefspec20181009-86300-3lhxmqfile_cache_path/cookbooks/poise/files/halite_gem/poise/helpers/lwrp_polyfill.rb:34:in `initialize'
  # /private/var/folders/30/nsmp68z977s8q1x10z4h9_fr0000gn/T/chefspec20181009-86300-3lhxmqfile_cache_path/cookbooks/poise/files/halite_gem/poise/helpers/resource_name.rb:32:in `initialize'
  # /var/folders/30/nsmp68z977s8q1x10z4h9_fr0000gn/T/chefspec20181009-86300-3lhxmqfile_cache_path/cookbooks/consul/recipes/default.rb:16:in `from_file'
jeffbyrnes commented 5 years ago

This remains an issue, I wonder if it makes sense to move away from using poise?

jeffbyrnes commented 5 years ago

Based on the fact that nothing can test properly right now b/c of this, it seems like a really good idea to move away from using poise. Sadly, that’s a rather serious refactor, though I think it would be an overall win for the cookbook.

damacus commented 5 years ago

It's totally on our radar. We've recently removed poise from haproxy, we're up to our eyeballs in oher cookbooks right now. But we're happy to help point and assit newcomers in this envedor!

freakinhippie commented 4 years ago

@damacus Would you please point me in the direction of how you'd like the see poise removed from this cookbook? I'd be interested in giving it a shot if I can find the time.

JohnRoesler commented 4 years ago

@freakinhippie here is the PR where we removed poise in haproxy https://github.com/sous-chefs/haproxy/pull/353/files

The general approach was to rebuild the service resources rather than trying to change what was in place. In the case of haproxy, installing it on a linux server directly gave a default systemd unit file and then that was used in conjunction with the chef systemd_unit and service resources

ramereth commented 4 years ago

Duplicate of #551