Details
-
Type:
Bug
-
Status:
Fix Committed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.12.0
-
Fix Version/s: 11.6.0-client
-
Component/s: Chef Client
-
Labels:
Description
I'm extending the chef-client::service recipe to register chef-client as a Mac OS X daemon using the recently introduced Mac OS X service provider to Chef (since 0.10.10). One can checkout my work via COOK-1379.
However, when running chef-client as root, I always get the following stack trace, resulting a chef client run with an error. The service however is successfully registered.
[2012-06-25T12:12:02+02:00] INFO: Processing service[chef-client] action start (chef-client::service line 244) [2012-06-25T12:12:02+02:00] ERROR: service[chef-client] (chef-client::service line 244) has had an error [2012-06-25T12:12:02+02:00] ERROR: service[chef-client] (/var/chef/cache/cookbooks/chef-client/recipes/service.rb:244:in `from_file') had an error: service[chef-client] (chef-client::service line 244) had an error: ArgumentError: couldn't find HOME environment -- expanding `~/Library/LaunchAgents' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/provider/service/macosx.rb:111:in `expand_path' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/provider/service/macosx.rb:111:in `find_service_plist' /Library/Ruby/Gems/1.8/gems/erubis-2.7.0/lib/erubis/evaluator.rb:73:in `inject' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/provider/service/macosx.rb:110:in `each' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/provider/service/macosx.rb:110:in `inject' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/provider/service/macosx.rb:110:in `find_service_plist' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/provider/service/macosx.rb:36:in `load_current_resource' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/resource.rb:453:in `run_action' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/runner.rb:49:in `run_action' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/runner.rb:85:in `converge' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/runner.rb:85:in `each' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/runner.rb:85:in `converge' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/resource_collection.rb:94:in `execute_each_resource' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in `step' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/resource_collection.rb:92:in `execute_each_resource' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/runner.rb:80:in `converge' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/client.rb:330:in `converge' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/client.rb:163:in `run' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/application/client.rb:254:in `run_application' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/application/client.rb:241:in `loop' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/application/client.rb:241:in `run_application' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/../lib/chef/application.rb:70:in `run' /Library/Ruby/Gems/1.8/gems/chef-10.12.0/bin/chef-client:26 /usr/bin/chef-client:19:in `load' /usr/bin/chef-client:19 [2012-06-25T12:12:02+02:00] ERROR: Running exception handlers [2012-06-25T12:12:02+02:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json [2012-06-25T12:12:02+02:00] ERROR: Exception handlers complete
Issue Links
- relates to
-
CHEF-1700
Service Provider for Mac OS X
-
https://github.com/opscode/chef/pull/325