aws-samples / aws-samples/aws-codedeploy-samples

How to recover from failed deploy when using ASG lifecycle scripts?

オープン
#42 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る
bug
主要言語
Shell
スター
639
フォーク
778
PR マージ指標
30日以内にマージされた PR はありません

説明

We just started using CodeDeploy with ASG and ELB, and we achieve zero downtime when we use `register_with_elb.sh` and `deregister_from_elb.sh`. Today I simulated a situation where a deploy step before `deregister_from_elb.sh` fails. In that case, the server instance in ASG stays in Standby mode and the capacity of ASG is decreased by one because `deregister_from_elb.sh` is never executed.

Currently, I have to manually increase the ASG capacity back to normal and move the server instance out of Standby. This isn't acceptable. Is there a way to do proper cleanup automatically after a failed deploy?

The only way that came to my mind is to add error handling logic to every deploy script I run between `register_with_elb.sh` and `deregister_from_elb.sh` scripts.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。