Skip to content

Add prod to prd fix in chef-bootstrap-ssh-keys template in order to bootstrap hosts

username-removed-1165651 requested to merge vl-chef-template-env-fix into master

This is a problem originated when creating the nodes for https://gitlab.com/gitlab-com/infrastructure/issues/2903

Basically, chef-client will fail upon node bootstrapping as the node gets an incorrect environment assigned:

10.68.50.51 [2017-10-05T11:56:33+00:00] INFO: *** Chef 12.19.36 ***
10.68.50.51 [2017-10-05T11:56:33+00:00] INFO: Platform: x86_64-linux
10.68.50.51 [2017-10-05T11:56:33+00:00] INFO: Chef-client pid: 2428
10.68.50.51 [2017-10-05T11:56:36+00:00] INFO: Setting the run_list to ["role[gitlab]"] from CLI options
10.68.50.51 [2017-10-05T11:56:37+00:00] INFO: HTTP Request Returned 404 Object Not Found: error
10.68.50.51
10.68.50.51 ================================================================================
10.68.50.51 Error expanding the run_list:
10.68.50.51 ================================================================================
10.68.50.51
10.68.50.51 Unexpected API Request Failure:
10.68.50.51 -------------------------------
10.68.50.51 Cannot load environment prod

The problem resides on the chef template file in terraform, which points to the environment variable (and we change it to prd on some resources).

I've done the same thing in the template so nodes now are properly bootstrapped.

Merge request reports