Bug discovered in scale tests: https://github.com/elastic/ingest-dev/issues/5774
There is a testcase that cancels upgrade action, which leaves agents in UPG_SCHEDULED state.
This causes the next testcase auto upgrade agents fail as auto upgrade doesn't pick up agents with upgrade details in non-terminal state.
This can be reproduced by starting an upgrade action with a rollout duration (e.g. 10m) and then cancelling the action.
The agents are stuck in scheduled state.