Skip to content

Commit 1f72096

Browse files
committed
Fix bootstrap_instance function by adding missing newlines
The which cfn-init command was executed with the previous line so the aws-cfn-bootstrap package was always downloaded. It also fixes the cfn bootstrap in china Signed-off-by: Enrico Usai <[email protected]>
1 parent 988358d commit 1f72096

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cloudformation/aws-parallelcluster.cfn.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1998,7 +1998,7 @@
19981998
" tar -xzf /etc/chef/aws-parallelcluster-cookbook.tgz\n",
19991999
" HOME_BAK=\"${HOME}\"\n",
20002000
" export HOME=\"/tmp\"\n",
2001-
" . /tmp/proxy.sh\n",
2001+
" . /tmp/proxy.sh;\n",
20022002
" for d in `ls /tmp/cookbooks`; do\n",
20032003
" cd /tmp/cookbooks/$d\n",
20042004
" LANG=en_US.UTF-8 /opt/chef/embedded/bin/berks vendor /etc/chef/cookbooks --delete || error_exit 'Vendoring cookbook failed.'\n",
@@ -2015,7 +2015,7 @@
20152015
" if [ \"${apt}\" == \"0\" ]; then\n",
20162016
" apt-cache search build-essential; apt-get clean; apt-get update; apt-get -y install build-essential curl wget jq python-setuptools awscli\n",
20172017
" fi\n",
2018-
" [[ ${_region} =~ ^cn- ]] && s3_url=\"cn-north-1.amazonaws.com.cn/cn-north-1-aws-parallelcluster\"",
2018+
" [[ ${_region} =~ ^cn- ]] && s3_url=\"cn-north-1.amazonaws.com.cn/cn-north-1-aws-parallelcluster\"\n",
20192019
" which cfn-init 2>/dev/null || ( curl -s -L -o /tmp/aws-cfn-bootstrap-latest.tar.gz https://s3.${s3_url}/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz; easy_install -U /tmp/aws-cfn-bootstrap-latest.tar.gz)\n",
20202020
" mkdir -p /etc/chef && chown -R root:root /etc/chef\n",
20212021
" curl --retry 3 -L https://www.chef.io/chef/install.sh | bash -s -- -v ${chef_version}\n",
@@ -2934,14 +2934,14 @@
29342934
" mkdir /tmp/cookbooks\n",
29352935
" cd /tmp/cookbooks\n",
29362936
" tar -xzf /etc/chef/aws-parallelcluster-cookbook.tgz\n",
2937-
" HOME_BAK=${HOME}\n",
2937+
" HOME_BAK=\"${HOME}\"\n",
29382938
" export HOME=\"/tmp\"\n",
29392939
" . /tmp/proxy.sh;\n",
29402940
" for d in `ls /tmp/cookbooks`; do\n",
29412941
" cd /tmp/cookbooks/$d\n",
29422942
" LANG=en_US.UTF-8 /opt/chef/embedded/bin/berks vendor /etc/chef/cookbooks --delete || error_exit 'Vendoring cookbook failed.'\n",
2943-
" done;\n",
2944-
" export HOME=${HOME_BAK}\n",
2943+
" done;\n",
2944+
" export HOME=\"${HOME_BAK}\"\n",
29452945
"}\n",
29462946
"function bootstrap_instance\n",
29472947
"{\n",
@@ -2953,7 +2953,7 @@
29532953
" if [ \"${apt}\" == \"0\" ]; then\n",
29542954
" apt-cache search build-essential; apt-get clean; apt-get update; apt-get -y install build-essential curl wget jq python-setuptools awscli\n",
29552955
" fi\n",
2956-
" [[ ${_region} =~ ^cn- ]] && s3_url=\"cn-north-1.amazonaws.com.cn/cn-north-1-aws-parallelcluster\"",
2956+
" [[ ${_region} =~ ^cn- ]] && s3_url=\"cn-north-1.amazonaws.com.cn/cn-north-1-aws-parallelcluster\"\n",
29572957
" which cfn-init 2>/dev/null || ( curl -s -L -o /tmp/aws-cfn-bootstrap-latest.tar.gz https://s3.${s3_url}/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz; easy_install -U /tmp/aws-cfn-bootstrap-latest.tar.gz)\n",
29582958
" mkdir -p /etc/chef && chown -R root:root /etc/chef\n",
29592959
" curl --retry 3 -L https://www.chef.io/chef/install.sh | bash -s -- -v ${chef_version}\n",

0 commit comments

Comments
 (0)