我正在写shell脚本,女巫确实是这样做的:
1)我使用下面的命令创建快照:
SNAPSHOT_ID=$(aws ec2 create-snapshot "${DRYRUN}" --volume-id "${ROOT_VOLUME_ID}" --description "${SNAPSHOT_DESCRIPTION}" --query 'SnapshotId')
2)我用侍者等待完全状态:
aws ec2 wait snapshot-completed --snapshot-ids "${SNAPSHOT_ID}"
当我用EBS 8 GB大小测试它时,一切都很顺利。
当它是40 GB时,我有一个例外:
Waiter SnapshotCompleted failed: Max attempts exceeded
可能,40 GB需要更多的时间,然后8GB的时间,只是需要等待。
AWS (http://docs.aws.amazon.com/cli/latest/reference/ec2/wait/snapshot-completed.html)没有任何超时或尝试数量选项。
也许你们中的一些人也面临过同样的问题?
发布于 2022-10-13 12:50:02
问题:在ci/cd中,我们命令等待ecs服务稳定,并得到此错误。
aws ecs wait services-stable \
--cluster MyCluster \
--services MyService
误差MSG:Waiter ServicesStable failed: Max attempts exceeded
修复
为了解决这个问题,我们遵循了这个文档-> https://docs.aws.amazon.com/AmazonECS/latest/bestpracticesguide/load-balancer-healthcheck.html
aws elbv2 modify-target-group --target-group-arn <arn of target group> --healthy-threshold-count 2 --health-check-interval-seconds 5 --health-check-timeout-seconds 4
aws elbv2 modify-target-group-attributes --target-group-arn <arn of target group> --attributes Key=deregistration_delay.timeout_seconds,Value=10
这解决了这个问题
如果您有更多的目标组要编辑,只需将目标组arns输出到文件中并在循环中运行。
https://stackoverflow.com/questions/30977532
复制相似问题