bottlerocket-os / bottlerocket-ecs-updater

A service to automatically manage Bottlerocket updates in an Amazon ECS cluster.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSM command for update remains stuck InProgress for update apply command

srgothi92 opened this issue · comments

Description
After sending command apiclient update apply --reboot instance immediately goes into reboot, due to this occasionally SSM command gets stuck in In-Progress state.

There are two problems due to this:

  1. Currently, updater does not check command output. This could potentially ignore a situation where update was never started and we move on to next step
  2. If we do not ignore the output, SSM command would eventually timeout and updater would assume command was never completed and report update failed. Instead command can be successful but SSM never realized it.

Any alternatives you've considered:

  1. Find out why SSM command gets stuck. If this gets solved, updater can wait on command output to make correct decisions.
  2. break command in two separate steps, prepare update and reboot.

At present we are not calling GetCommandInvocation to get command result; therefore updater does not show error for this case. While addressing this issue, we should check for command output and act accordingly.

Fixed in PR-60