chef-boneyard / chef-vault

chef-vault cookbook
https://supermarket.chef.io/cookbooks/chef-vault
Apache License 2.0
60 stars 53 forks source link

chef-vault 3.0.0 failure on node without Internet access #63

Closed haidangwa closed 6 years ago

haidangwa commented 6 years ago

Cookbook version

3.0.0

Chef-client version

12.14.89

Platform Details

RHEL6

Scenario:

Nodes behind a firewall without Internet access fail when chef-vault 3.0.0 is introduced.

Steps to Reproduce:

Run chef-vault 3.0.0 on a node that doesn't have Internet access

Expected Result:

No failure

Actual Result:

Chef run fails:

Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '17'
---- Begin output of bundle install ----
STDOUT: Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching source index from https://rubygems.org/
Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Retrying fetcher due to error (4/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Could not fetch specs from https://rubygems.org/
STDERR: 
---- End output of bundle install ----
Ran bundle install returned 17
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/mixlib-shellout-2.2.7/lib/mixlib/shellout.rb:289:in `invalid!'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/mixlib-shellout-2.2.7/lib/mixlib/shellout.rb:276:in `error!'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/mixin/shell_out.rb:45:in `shell_out!'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/cookbook/gem_installer.rb:58:in `block (2 levels) in install'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/cookbook/gem_installer.rb:50:in `open'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/cookbook/gem_installer.rb:50:in `block in install'
/opt/chef/embedded/lib/ruby/2.3.0/tmpdir.rb:89:in `mktmpdir'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/cookbook/gem_installer.rb:49:in `install'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/cookbook/cookbook_collection.rb:60:in `install_gems'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/policy_builder/expand_node_object.rb:86:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/client.rb:510:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/client.rb:280:in `run'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/application.rb:302:in `block in fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/application.rb:290:in `fork'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/application.rb:290:in `fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/application.rb:255:in `block in run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/local_mode.rb:44:in `with_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/application.rb:243:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/application/client.rb:464:in `sleep_then_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/application/client.rb:451:in `block in interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/application/client.rb:450:in `loop'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/application/client.rb:450:in `interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/application/client.rb:434:in `run_application'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/lib/chef/application.rb:60:in `run'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.14.89/bin/chef-client:26:in `<top (required)>'
/usr/bin/chef-client:54:in `load'
/usr/bin/chef-client:54:in `<main>'

I believe it's due to this line: https://github.com/chef-cookbooks/chef-vault/blob/v3.0.0/metadata.rb#L14

thommay commented 6 years ago

Duplicate of #61

haidangwa commented 6 years ago

setting rubygems_url in the client.rb to point at our internal gems mirror works