-
-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in configure_diplomat with Diplomat 2.5.0 #582
Comments
what is the ruby version running chef ? Could it be running 2.4? |
Chef is using Ruby 2.6.6, still above the minimum version according to Diplomat.
|
Ok, so what does the line
means exactly? => it means the dependency to the recipe should have been included first? |
I am including the |
The line can say whatever, it's included π€¦ββοΈ |
Ok, so, what's the issue? Two changes have been made:
Any idea? /me hate ruby dependencies |
Not sure what the issue is, just reporting the behavior π The gem is definitely installed and doesn't seem like any dependency issues:
I can also use the gem in [1] pry(main)> require 'diplomat'
=> true
[3] pry(main)> Diplomat.configure do |config|
[3] pry(main)* config.acl_token = 'master'
[3] pry(main)* end
=> "master"
[4] pry(main)> Diplomat::Policy.list
=> [{"ID"=>"00000000-0000-0000-0000-000000000001",
"Name"=>"global-management",
"Description"=>"Builtin Policy that grants unlimited access",
"Datacenters"=>nil,
"Hash"=>"swIQt6up+s0cV4kePfJ2aRdKCLaQyykF4Hl1Nfdeumk=",
"CreateIndex"=>16,
"ModifyIndex"=>16}] In the meantime pinning the gem to |
@evandam Could you try to modify the cookbook, change the file begin
require 'diplomat'
rescue LoadError => err
raise 'The diplomat gem is required; ' \
'include recipe[consul::client_gem] to install: #{err} / #{err.inspect}'
end => then re-launch convergence (skipping the cookbook updates if necessary) to get a maybe better error message? Still I suspect faraday to be the culprit... maybe the error message will be clearer In your shell, could you also do: require 'faraday'
Faraday::VERSION |
Good call, it's related to Faraday
|
β¦ use faraday 1.3+ This will fix sous-chefs/consul#582
This will avoid investigations such as sous-chefs#582
I fixed the issue in diplomat... I was very suspicious about the GEM recent bump in chef-client: chef/chef@72439d4#diff-89cade48462044ee1b672dc5f4c3ec250fbd29effcd8932096a23c1283c6731fL203
And if you 10 minutes to spend, I can recommend my last article about Consul performance with Streaming: https://medium.com/criteo-engineering/consul-streaming-whats-behind-it-6f44f77a5175?source=friends_link&sk=a4cf7321bf6f9d50807c7256feee21c5 :-) Have a good day! |
Thanks @pierresouchay! Just confirmed the new version of the gem works π |
Still, I recommend to vote for #583 ... would have helped quite a lot the diagnostic |
π» Brief Description
After the release of Diplomat 2.5.0, I'm seeing errors coming from
configure_diplomat
.π₯ Cookbook version
4.3.1
π©βπ³ Chef-Infra Version
15.15.1
π© Platform details
Ubuntu 18.04
Steps To Reproduce
Run the following recipe with
diplomat_version
not set (or set to 2.5.0), and again pointing to the previous version:Logs:
I confirmed the gem is installed:
π Expected behavior
Same behavior as previous version and consul_policy is created.
The text was updated successfully, but these errors were encountered: