aws / aws/aws-codedeploy-agent

CodeAgent killed on Install phase using version 1.7.0.92

オープン
#402 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
337
フォーク
195
平均マージ
10時間 54分
マージ済み PR(30日)
4

説明

Hi,
My deployment task is always finishing with the error:

```
Error Code: UnknownError
Script Name: -
Message: Failed: Failing in-progress lifecycle event after an agent restart.
```
I have took a look at the logs and I found this stack error

```
2024-10-09T22:54:00 INFO [codedeploy-agent(6273)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.7.0-92_rpm.
2024-10-09T22:54:45 INFO [codedeploy-agent(6273)]: [Aws::CodeDeployCommand::Client 200 45.434682 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:us-west-2:724747361462:instance/i-0911fexxxxxxxxxx")

2024-10-09T22:54:46 INFO [codedeploy-agent(6273)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.7.0-92_rpm.
2024-10-09T22:55:00 INFO [codedeploy-agent(6271)]: master 6271: Received CHLD - cleaning dead child process2024-10-09T22:55:00 INFO [codedeploy-agent(6271)]: master 6271: been told to replace child 62732024-10-09T22:55:00 INFO [codedeploy-agent(6271)]: master 6271: not enough child processes running - missing at least 1 - respawning2024-10-09T22:55:01 INFO [codedeploy-agent(6523)]: Checking first if any deployment lifecycle event is in progress master 6271
2024-10-09T22:55:01 INFO [codedeploy-agent(6523)]: Master process (6271) will not be shut down right now, as a deployment is already in progress
2024-10-09T22:55:01 INFO [codedeploy-agent(6271)]: master 6271: Received TERM - stopping children and shutting down
2024-10-09T22:55:02 INFO [codedeploy-agent(6618)]: master 6618: Spawned child 1/1
2024-10-09T22:55:03 INFO [codedeploy-agent(6620)]: On Premises config file does not exist or not readable
2024-10-09T22:55:03 INFO [codedeploy-agent(6618)]: Started master 6618 with 1 children
2024-10-09T22:55:03 INFO [codedeploy-agent(6620)]: Creating client url from IMDS region and domain
2024-10-09T22:55:03 INFO [codedeploy-agent(6620)]: CodeDeploy endpoint: https://codedeploy-commands.us-west-2.amazonaws.com
2024-10-09T22:55:03 INFO [codedeploy-agent(6620)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandExecutor: Archives to retain is: 5}
2024-10-09T22:55:03 INFO [codedeploy-agent(6620)]: Creating client url from IMDS region and domain
2024-10-09T22:55:03 INFO [codedeploy-agent(6620)]: CodeDeploy endpoint: https://codedeploy-commands.us-west-2.amazonaws.com
2024-10-09T22:55:03 INFO [codedeploy-agent(6620)]: Creating client url from IMDS region and domain
2024-10-09T22:55:03 INFO [codedeploy-agent(6620)]: CodeDeploy endpoint: https://codedeploy-commands.us-west-2.amazonaws.com
2024-10-09T22:55:03 WARN [codedeploy-agent(6620)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Deployment tracking file found: /opt/codedeploy-agent/deployment-root/ongoing-deployment. The agent likely restarted while running a customer-supplied script. Failing the lifecycle event.
2024-10-09T22:55:03 INFO [codedeploy-agent(6620)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Calling PutHostCommandComplete: 'Failed' eyJiYXRjaElkIjoiMjI2YTBjNDY1YzlkZTBiMTJhZjNiZDQ5MDI1YmZlZjcvcHVibGljMDExIiwiZGVwbG95bWVudElkIjoiQ29kZURlcGxveS91cy13ZXN0LTIvcHJvZC9vcnBoZXVzOnB1YmxpYzAwNC83MjQ3NDczNjE0NjI6ZC0xUUtJNzg4MjgiLCJob3N0SWQiOiJhcm46YXdzOmVjMjp1cy13ZXN0LTI6NzI0NzQ3MzYxNDYyOmluc3RhbmNlL2ktMDkxMWZlNzk5ZWY0YmEwZWMiLCJjb21tYW5kSWQiOiJBcG9sbG9EZXBsb3lDb250cm9sU2VydmljZXxhcm46YXdzOmVjMjp1cy13ZXN0LTI6NzI0NzQ3MzYxNDYyOmluc3RhbmNlL2ktMDkxMWZlNzk5ZWY0YmEwZWN8NHwwIiwiY29tbWFuZE5hbWUiOiJJbnN0YWxsIiwiY29tbWFuZEluZGV4Ijo0LCJhdHRlbXB0SW5kZXgiOjF9
2024-10-09T22:55:03 INFO [codedeploy-agent(6620)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.7.0-92_rpm.
2024-10-09T22:55:03 INFO [codedeploy-agent(6620)]: [Aws::CodeDeployCommand::Client 200 0.051973 0 retries] put_host_command_complete(command_status:"Failed",diagnostics:{format:"JSON",payload:"{\"error_code\":7,\"script_name\":\"\",\"message\":\"Failed: Failing in-progress lifecycle event after an agent restart.\",\"log\":\"\"}"},host_command_identifier:"eyJiYXRjaElkIjoiMjI2YTBjNDY1YzlkZTBiMTJhZjNiZDQ5MDI1YmZlZjcvcHVibGljMDExIiwiZGVwbG95bWVudElkIjoiQ29kZURlcGxveS91cy13ZXN0LTIvcHJvZC9vcnBoZXVzOnB1YmxpYzAwNC83MjQ3NDczNjE0NjI6ZC0xUUtJNzg4MjgiLCJob3N0SWQiOiJhcm46YXdzOmVjMjp1cy13ZXN0LTI6NzI0NzQ3MzYxNDYyOmluc3RhbmNlL2ktMDkxMWZlNzk5ZWY0YmEwZWMiLCJjb21tYW5kSWQiOiJBcG9sbG9EZXBsb3lDb250cm9sU2VydmljZXxhcm46YXdzOmVjMjp1cy13ZXN0LTI6NzI0NzQ3MzYxNDYyOmluc3RhbmNlL2ktMDkxMWZlNzk5ZWY0YmEwZWN8NHwwIiwiY29tbWFuZE5hbWUiOiJJbnN0YWxsIiwiY29tbWFuZEluZGV4Ijo0LCJhdHRlbXB0SW5kZXgiOjF9")
```

The instance is a small t4g with Amazon Linux 2023, ruby version ruby 3.2.2, and Codedeploy Agent version: 1.7.0.92

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

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

調査の方向性

Ruby 3.2.2 とエージェントバージョン 1.7.0.92 を使用する Amazon Linux 2023 上の提供された CodeDeploy エージェントログから開始し、Install ライフサイクルイベント中の再起動と、進行中のデプロイメント追跡ファイルに焦点を当てます。報告された t4g 環境で失敗を再現します。エージェントの再起動後に Install イベントが失敗として報告されるのではなく、正しく処理されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, linux, ruby
領域
cloud, devops
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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