-
Notifications
You must be signed in to change notification settings - Fork 101
Clear upgrade_attempts on handleAck #4762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear upgrade_attempts on handleAck #4762
Conversation
|
This pull request does not have a backport label. Could you fix it @juliaElastic? 🙏
|
|
@jillguyonnet I saw this comment, do you know the quickest way to reproduce the failed upgrade? I tried upgrading to a non-existent version, but the retries take a long time (about 2 hours). |
Strange, IIRC that's also what I did. I don't remember the agent retrying for that long (essentially it went into |
Thanks, I'm seeing now the |
Yeah, I did notice that as well, but it transitioned into |
|
* clear upgrade_attempts on handleAck * clear upgrade_attempts if upgrade_details is missing * added unit test (cherry picked from commit fb093cc)
* Clear upgrade_attempts on handleAck (#4762) * clear upgrade_attempts on handleAck * clear upgrade_attempts if upgrade_details is missing * added unit test (cherry picked from commit fb093cc) * Clear agent.upgrade_attempts on upgrade complete (#4528) (#4777) * Clear agent.upgrade_attemps on upgrade complete * This actually works * Silence nolintlint error in handleCheckin.go * Remove nolint comment altogether * Add changelog * Update handleCheckin unit test * Change approach * Revert unit test change * This seems needed * Run make generate * Remove internal link * add unit test * reduce complexity * return nil if action is nil --------- Co-authored-by: Julia Bardi <[email protected]> Co-authored-by: Julia Bardi <[email protected]> (cherry picked from commit 2b40416) Co-authored-by: Jill Guyonnet <[email protected]> --------- Co-authored-by: Julia Bardi <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Jill Guyonnet <[email protected]>




What is the problem this PR solves?
upgrade_attemptswere not cleared correctly when agent doesn't haveupgrade_details(for example in horde or older versions).How does this PR solve the problem?
Clear
upgrade_attemptswhen upgrade is acked (at the same time whenupgrade_started_atfield is cleared).How to test this PR locally
Test with agent policy with auto upgrade config and a few horde agents enrolled. Verify that after the upgrade completed,
upgrade_attemptsis set tonull.The
upgrade_attemptsfield is only cleared if there is noupgrade_details. Tested with a real agent upgraded to a non-existent version, the agent going toUPG_FAILEDstate.Design Checklist
Checklist
./changelog/fragmentsusing the changelog toolRelated issues
Relates #4528
Relates elastic/kibana#212744