Environment Configuration Failed

book

Article ID: 5457

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio) CA Release Automation - DataManagement Server (Nolio)

Issue/Introduction

While trying to apply a recipe to an assigned agent the Pre Deployment Environment Configuration sub-stage results in Environment Configuration Failed. When clicking on the hotlink available in the Chef Node List value field, it shows more information (which should also be available in the nolio_all.log on the agent machine):

/opt/chef/embedded/lib/rub/gems/chef-12.7.2/lib/chef/config_fetcher.rb:58:in 'realpath': Permission denied @ realpath_rec - /etc/chef/client.rb (Errno::EACCES)
    from /opt/chef/embedded....

 

 

Cause

This error can happen when the chef-client is installed as root. Specifically, the files laid down as a result of the installation are not accessible by the user that is used to start/run the agent. The user that the nolioagent starts as is the user that will be attempting to run the chef-client command. You should be able to log into the agent system as the user that starts the nolioagent and run chef-client. If running chef-client (by itself) does not return the same error then parse the <NAGInstallDir>/logs/nolio_all.log file and search for the chef-client command that is being issued to apply the recipe. Then run that full command manually. 

Environment

CA Release Automation 6.2.0Chef 12.xLinux

Resolution

If you can reproduce the same error when running chef-client (by itself or the full command) then it is recommended that you consult your Chef administrators and decide if the user starting/running nolioagent should either:

  1. Be a different user (a user that has access to run those commands); or
  2. Possibly be given access to the necessary files so that it can run the commands (maybe by adding the nolioagent user to the owning group of chef-client files).

 

 

Additional Information

Chef Configuration: https://docops.ca.com/ca-release-automation/6-2/en/deployment-automation/configure-an-environment-specific-to-your-deployment/chef-configuration

Manage Configurations During Deployment: https://docops.ca.com/ca-release-automation/6-2/en/deployment-automation/deploy-applications/manage-configurations-during-deployment

Manage Environments: https://docops.ca.com/ca-release-automation/6-2/en/deployment-automation/design-applications/manage-environments