Update sendCommand to return list of successful instances
WilboMo opened this issue · comments
What I'd like:
sendCommand
's WaitUntilCommandExecuted may encounter errors while awaiting sent commands to complete. If errors are encountered during this step instances which failed should be removed from the list of instances to be operated on for future steps of updaters operations.
Any alternatives you've considered:
Modifying sendCommand
to return []string
of instances which did not fail. Could also return []instance
which may make updating methods which are receiving the list of updates from the instance
struct simpler.
Apparently I came across a consequence of this issue. I have a cluster with 2 instances and SSM commands fails for one of them. When SSM command timedout for 1 instance, updater still tried to fetch the command output and error was reported in parsing command output which is incorrect. Updater should not fetch command output for instances on which SSM command timedout.
Another alternative solution to this problem can be to to check command status in getCommandResult
and throw error if is not Success
that way command output is not parsed for Failed or InProgress SSM command.
closed in #99