diff --git a/cli/src/pcluster/resources/compute_node/user_data.sh b/cli/src/pcluster/resources/compute_node/user_data.sh index 1adb6e130b..76a5c7dfb3 100644 --- a/cli/src/pcluster/resources/compute_node/user_data.sh +++ b/cli/src/pcluster/resources/compute_node/user_data.sh @@ -137,7 +137,7 @@ write_files: error_exit "This AMI was not baked by ParallelCluster. Please use pcluster build-image command to create an AMI by providing your AMI as parent image." fi if [ "${!custom_cookbook}" != "NONE" ]; then - curl --retry 3 -v -L -o /etc/chef/aws-parallelcluster-cookbook.tgz ${!cookbook_url} + curl --retry 9 --retry-all-errors -v -L -o /etc/chef/aws-parallelcluster-cookbook.tgz ${!cookbook_url} vendor_cookbook fi cd /tmp diff --git a/cli/src/pcluster/resources/head_node/user_data.sh b/cli/src/pcluster/resources/head_node/user_data.sh index d08cdddd59..f93a060111 100644 --- a/cli/src/pcluster/resources/head_node/user_data.sh +++ b/cli/src/pcluster/resources/head_node/user_data.sh @@ -123,7 +123,7 @@ else error_exit "This AMI was not baked by ParallelCluster. Please use pcluster build-image command to create an AMI by providing your AMI as parent image." fi if [ "${!custom_cookbook}" != "NONE" ]; then - curl --retry 3 -v -L -o /etc/chef/aws-parallelcluster-cookbook.tgz ${!cookbook_url} + curl --retry 9 --retry-all-errors -v -L -o /etc/chef/aws-parallelcluster-cookbook.tgz ${!cookbook_url} vendor_cookbook fi diff --git a/cli/src/pcluster/resources/imagebuilder/parallelcluster.yaml b/cli/src/pcluster/resources/imagebuilder/parallelcluster.yaml index eb25b13bda..a89cc3d5eb 100644 --- a/cli/src/pcluster/resources/imagebuilder/parallelcluster.yaml +++ b/cli/src/pcluster/resources/imagebuilder/parallelcluster.yaml @@ -219,7 +219,7 @@ phases: # Download cookbook mkdir -p /etc/chef && sudo chown -R root:root /etc/chef - curl --retry 3 -L -o /etc/chef/aws-parallelcluster-cookbook.tgz "$COOKBOOK_URL" + curl --retry 9 --retry-all-errors -L -o /etc/chef/aws-parallelcluster-cookbook.tgz "$COOKBOOK_URL" cd /etc/chef && tar -xzf /etc/chef/aws-parallelcluster-cookbook.tgz --strip-components 1 && rm -f aws-parallelcluster-cookbook.tgz diff --git a/cli/src/pcluster/resources/login_node/user_data.sh b/cli/src/pcluster/resources/login_node/user_data.sh index f142731926..372012d10a 100644 --- a/cli/src/pcluster/resources/login_node/user_data.sh +++ b/cli/src/pcluster/resources/login_node/user_data.sh @@ -120,7 +120,7 @@ write_files: error_exit "This AMI was not baked by ParallelCluster. Please use pcluster build-image command to create an AMI by providing your AMI as parent image." fi if [ "${!custom_cookbook}" != "NONE" ]; then - curl --retry 3 -v -L -o /etc/chef/aws-parallelcluster-cookbook.tgz ${!cookbook_url} + curl --retry 9 --retry-all-errors -v -L -o /etc/chef/aws-parallelcluster-cookbook.tgz ${!cookbook_url} vendor_cookbook fi cd /tmp