cheffish
cheffish copied to clipboard
Wrong digitalocean_client_id when drivers is used in knife.rb
I'm not sure which gem's fault this is but story is I'm setting up cluster with chef-provisioning, my knife.rb is:
drivers({
'fog:DigitalOcean:staging' => {
:driver_options => {
:compute_options => {
:digitalocean_api_key => '<hash>',
:digitalocean_client_id => '<hash>'
}
}
}
})
I've also proper profile defined I'm running chef-client and I'm receiving '401 Unauthorized' from DO. chef-provisioning-fog is using Cheffish to get result config, extracts client_id and api_key.
result = Cheffish::MergedConfig.new(new_config, config, new_defaults)
...
id = result[:driver_options][:compute_options][:digitalocean_client_id]
When I'm running inspect on result[:driver_options]
I'm getting:
#<Cheffish::MergedConfig:0x007fe81fc63bf8 @configs=[{:compute_options=>{:provider=>"DigitalOcean", :digitalocean_client_id=>"staging"}}, {:compute_options=>{:digitalocean_api_key=>"<hash>", :digitalocean_client_id=>"<hash>"}}, {:compute_options=>{}}], @merge_arrays={}>
my driver id is used as 'digitalocean_client_id'. It should be digital_client_id hash.
Difficult to determine what the problem is without a lot of work setting up a replication case. Marking this as "Low" due to the narrow scope, effort involved in replicating, and hope that paving over Cheffish::MergedConfig with a proper Chef::Mash will make it disappear...