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

Upgrade occasionally failing on Windows #1187

Closed
michalpristas opened this issue Sep 14, 2022 · 8 comments
Closed

Upgrade occasionally failing on Windows #1187

michalpristas opened this issue Sep 14, 2022 · 8 comments
Assignees
Labels
8.7-candidate bug Something isn't working enhancement New feature or request Team:Elastic-Agent Label for the Agent team

Comments

@michalpristas
Copy link
Contributor

Agent is experience some weird behavior on Upgrade.

It downloads artifacts just fine and verifies them
it does all the things necessary but after Upgrade handler is done no symlink in root directory is created (the old one cease to exist and new one is not there)

there's elastic-agent.exe.prev and elastic-agent.exe.old
not sure where .old comes from.

seems like only windows machines are affected

image

image

Reported for 8.3.2 -> 8.3.3 upgrade

@michalpristas michalpristas added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Sep 14, 2022
@cmacknz cmacknz added 8.6-candidate v8.5.0 enhancement New feature or request Team:Elastic-Agent Label for the Agent team and removed bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Sep 14, 2022
@michalpristas michalpristas self-assigned this Sep 15, 2022
@jlind23
Copy link
Contributor

jlind23 commented Sep 27, 2022

We do not have enough informations to reproduce, let's close it for now until this problem occurs again.

@jlind23 jlind23 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2022
@michalpristas
Copy link
Contributor Author

problem occured again

@man715
Copy link

man715 commented Dec 29, 2022

This is regularly happening to my Windows machines as well. Are there any logs generated during the upgrade process that we can look through to see what may be causing the issue? This happens when I upgrade using the Fleet.

@mukeshelastic mukeshelastic added the bug Something isn't working label Jan 4, 2023
@pierrehilbert pierrehilbert assigned pchila and unassigned blakerouse Feb 8, 2023
@pchila
Copy link
Member

pchila commented Feb 24, 2023

Tried to reproduce the issue for 2 days straight. The closest I got was not having the link updated during an 8.6.2 -> 8.7.0-SNAPSHOT upgrade but even that wasn't reproducible.
I and @michalpristas tried writing unit tests for both the SafeFileRotate and changeSymlink functions invoked during the upgrade process but we still didn't manage to trigger the behavior described in the issue.

One interesting tool to use if this happens again is Process Monitor so that we can filter the system calls during the upgrade and see if there's something strange happening when moving the elastic-agent link to the new version (we tried using it in our tests but since we didn't mange to reproduce the issue we didn't get anything useful out of that run).

@jlind23
Copy link
Contributor

jlind23 commented Feb 27, 2023

@pchila thanks for investigating. Let's close this as not reproducible for now.
@man715 What is the version you are running? Do you still observe this behaviour with the latest release?

@jlind23 jlind23 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2023
@michalpristas
Copy link
Contributor Author

running into this when testing upgrade from 7.17 to 8.8
symlink gets reverted

@michalpristas michalpristas reopened this May 10, 2023
@cmacknz
Copy link
Member

cmacknz commented May 10, 2023

@michalpristas is this a duplicate of #2645 or a separate problem?

@michalpristas
Copy link
Contributor Author

closing, at first i thought this is the issue i'm seeing, after investigation it turned out to be different problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.7-candidate bug Something isn't working enhancement New feature or request Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

No branches or pull requests

8 participants