-
Notifications
You must be signed in to change notification settings - Fork 146
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
Quick multiple upgrades while agent is still in grace period break agent installation #2706
Comments
@pchila I agree this is a bug but I'm not sure we are going to see a lot of consecutive update though. What do you think? |
We discussed this with some folks today and apparently the best solution would be that Agent should refuse to upgrade until the grace period is over. |
@jlind23 Yes, that is the easiest and safest fix, I'll update the issue description |
This is some what related to #3371, but has possible 2 solutions:
|
This is my preference, because the watcher is an implementation detail that users shouldn't to know about or account for. If they want to upgrade again immediately, they should be able to. |
Discussed this issue in the weekly meeting. To summarize, here's how we want to solve it:
I will re-work #3399 to implement the above solution. |
As things stand, neither the Fleet UI nor the Fleet API will allow the user to initiate the second upgrade if the first one is still deemed to be in progress. The UI grays out the "Upgrade agent" link and the API returns a 400 Bad Request response saying the agent is not upgradeable. I'm not sure yet how Fleet decides that an upgrade is in progress. However, I have noticed that Fleet considers an upgrade as no longer in progress even while the Upgrade Watcher from that upgrade is still running. In other words, Fleet today will allow a user to request a second upgrade even while the Upgrade Watcher from the first upgrade is still running. What happens in this case is that the second upgrade's Upgrade Watcher never runs because the lock file, When the Agent receives the This approach certainly achieves the goal of the user not having to intervene to make that second upgrade happen. One thing I don't like about this approach, however, is that Fleet doesn't consider the Upgrade Watcher step as part of the upgrade process today but going forward, Agent will be reporting each upgrade step to Fleet, and one of the steps it will report is
Personally, I think we should go with the second option ("if no, ...") because:
WDYT @cmacknz? |
I agree with @ycombinator on option 2. |
Agreed, option 2 is the better path. @ycombinator create an issue in https://github.com/elastic/kibana/issues for the Fleet team to forbid upgrading based on the agent's reported upgrade states as suggested. |
|
This was fixed in #3473 |
Please post all questions and issues concerning the Elastic Agent on https://discuss.elastic.co/c/beats
before opening a Github Issue. Your questions will reach a wider audience there,
and if we confirm that there is a bug, then you can open a new issue.
For security vulnerabilities please only send reports to security@elastic.co.
See https://www.elastic.co/community/security for more information.
Please include configurations and logs if available.
For confirmed bugs, please report:
0af676
that was running had been cleaned up by the upgrade process)Agent should refuse an upgrade if a previous upgrade is still ongoing (that includes the grace period when the agent is still monitored by the watcher)
The text was updated successfully, but these errors were encountered: