Skip to content
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

[Bug] Upgrade not working #2645

Closed
michalpristas opened this issue May 10, 2023 · 3 comments · Fixed by #2655
Closed

[Bug] Upgrade not working #2645

michalpristas opened this issue May 10, 2023 · 3 comments · Fixed by #2655
Assignees
Labels
backport-v8.8.0 Automated backport with mergify bug Something isn't working QA:Needs Validation Needs validation by the QA Team Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@michalpristas
Copy link
Contributor

Upgrade rolls back, because status cannot be fetched by watcher

Repro:

  • install 7.x or 8.x (x<8) on Windows (does not need to be managed)
  • upgrade to latest 8.8 (using upgrade command and custom source-uri)
  • let it run
  • after 10 minutes check:
    • agent is running 8.8
    • symlink in Program Files/Elastic/Agent/elastic-agent.exe is pointing to stale version
  • restart service it should not boot up

This is because behavior of detecting if agent is installed as running changed: https://github.com/elastic/elastic-agent/pull/2500/files#diff-b62b1d326cae320349cdfca8ed36132a2b3f456042b9b56e34610810c9aa0556

Previously we were checking paths, now we're checking marks.

We could possibly add a fallback check with expected path.

@michalpristas michalpristas added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent Label for the Agent team backport-v8.8.0 Automated backport with mergify labels May 10, 2023
@ycombinator
Copy link
Contributor

ycombinator commented May 10, 2023

Thanks @michalpristas. I'm able to reproduce the issue and am working on a fix.

[EDIT] Since I'm able to reproduce this on MacOS as well, I've removed "windows" from the issue title.

@cmacknz cmacknz added the QA:Needs Validation Needs validation by the QA Team label May 10, 2023
@cmacknz
Copy link
Member

cmacknz commented May 10, 2023

Adding the QA:Needs-Validation label to request that the QA team manually test this. It would be valuable for the QA team to test this scenario before the fix is merged to ensure we have a test to catch this problem.

@ycombinator ycombinator changed the title [Bug] Upgrade on windows not working [Bug] Upgrade not working May 10, 2023
@amolnater-qasource
Copy link

amolnater-qasource commented Jun 1, 2023

Hi Team

We have revalidated agent upgrades from 7.17.10>8.7.1>8.8.0 having Elastic Defend integration in agent policy on 8.8.0 Kibana cloud environment and we had below observations:

  • Agent successfully upgraded to latest version following path 7.17.10>8.7.1>8.8.0.

Kibana Build details:

VERSION: 8.8.0
BUILD: 63142
COMMIT: 2973fcc10d985e4ab94e5eeef976aad0046c6cce

Screenshot:
image

Further we have observed an inconsistent agent behavior on restart, for which we have reported the detailed issue under #2761

Please let us know if we are missing anything here.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.8.0 Automated backport with mergify bug Something isn't working QA:Needs Validation Needs validation by the QA Team Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants