You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using nexus_cli with the RiotGames Nexus cookbook. When I run a chef-client run manually it completes without errors, but when it's run from the daemonized chef-client (on a rhel 6 system), the run fails when trying to retrieve the config because it has no $HOME set.
This happens looking up the DEFAULT config file at "~/.nexus_cli"
Would it be a good to have a fall back if there is no $HOME set?
Generated at 2013-06-20 13:52:02 -0500
ArgumentError: nexus_user[admin](nexus::default line 184) had an error: ArgumentError: couldn't find HOME environment -- expanding ~' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/nexus_cli-3.0.0/lib/nexus_cli/configuration.rb:14:inexpand_path'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/nexus_cli-3.0.0/lib/nexus_cli/configuration.rb:14:in path' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/nexus_cli-3.0.0/lib/nexus_cli/configuration.rb:21:inparse'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/nexus_cli-3.0.0/lib/nexus_cli/remote_factory.rb:11:in `create'
The text was updated successfully, but these errors were encountered:
Thanks for the report @sfiggins. The nexus-cookbook uses this gem in its LWRPs, and the actual bug is that the Configuration class attempts to load the file, even though when we are using it as an API, we are creating an instance with config from attributes or a data bag.
While I'm not sure why your user would lose its $HOME, I think there might be some sort of fall back or a better error message.
In summary, I think there are two take-aways here:
I'm using nexus_cli with the RiotGames Nexus cookbook. When I run a chef-client run manually it completes without errors, but when it's run from the daemonized chef-client (on a rhel 6 system), the run fails when trying to retrieve the config because it has no $HOME set.
This happens looking up the DEFAULT config file at "~/.nexus_cli"
Would it be a good to have a fall back if there is no $HOME set?
Generated at 2013-06-20 13:52:02 -0500
ArgumentError: nexus_user[admin](nexus::default line 184) had an error: ArgumentError: couldn't find HOME environment -- expanding
~' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/nexus_cli-3.0.0/lib/nexus_cli/configuration.rb:14:in
expand_path'/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/nexus_cli-3.0.0/lib/nexus_cli/configuration.rb:14:in
path' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/nexus_cli-3.0.0/lib/nexus_cli/configuration.rb:21:in
parse'/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/nexus_cli-3.0.0/lib/nexus_cli/remote_factory.rb:11:in `create'
The text was updated successfully, but these errors were encountered: