sous-chefs / consul

Development repository for the consul cookbook

Home Page:https://supermarket.chef.io/cookbooks/consul

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recent Chef version (Chef 14.5.33?) breaks consul_config resource

jeffbyrnes opened this issue · comments

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'

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

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.

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!

@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.

@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

Duplicate of #551