mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	Merge pull request #15069 from justinsb/aws_increase_s3_bucket_timeout
AWS: Increase the timeout for S3 bucket creation
This commit is contained in:
		@@ -498,10 +498,12 @@ function upload-server-tars() {
 | 
				
			|||||||
    # and then the bucket is most-simply named (s3.amazonaws.com)
 | 
					    # and then the bucket is most-simply named (s3.amazonaws.com)
 | 
				
			||||||
    aws s3 mb "s3://${AWS_S3_BUCKET}" --region ${AWS_S3_REGION}
 | 
					    aws s3 mb "s3://${AWS_S3_BUCKET}" --region ${AWS_S3_REGION}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    echo "Confirming bucket was created..."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    local attempt=0
 | 
					    local attempt=0
 | 
				
			||||||
    while true; do
 | 
					    while true; do
 | 
				
			||||||
      if ! aws s3 ls --region ${AWS_S3_REGION} "s3://${AWS_S3_BUCKET}" > /dev/null 2>&1; then
 | 
					      if ! aws s3 ls --region ${AWS_S3_REGION} "s3://${AWS_S3_BUCKET}" > /dev/null 2>&1; then
 | 
				
			||||||
        if (( attempt > 5 )); then
 | 
					        if (( attempt > 120 )); then
 | 
				
			||||||
          echo
 | 
					          echo
 | 
				
			||||||
          echo -e "${color_red}Unable to confirm bucket creation." >&2
 | 
					          echo -e "${color_red}Unable to confirm bucket creation." >&2
 | 
				
			||||||
          echo "Please ensure that s3://${AWS_S3_BUCKET} exists" >&2
 | 
					          echo "Please ensure that s3://${AWS_S3_BUCKET} exists" >&2
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user