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

Increase waiting time and timeout for removal of agent files #4310

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

pchila
Copy link
Member

@pchila pchila commented Feb 22, 2024

What does this PR do?

This PR increases the timeout for removing files during elastic-agent uninstall and slows down retries to give time to the OS (especially windows) to release locks on the agent files.

This comes after checking the results of #4304 where we verified that no lingering agent processes were present when we still had some access denied errors on executable files

Why is it important?

This should prevent failures in our integration tests where we install/uninstall agent in quick succession.
It's also something that should make the uninstall process more reliable on a slower (especially windows) machine by giving more time to the OS to release files.
On a machine that already managed to deal with the quicker timeout (linux/darwin) there could be a negligible slowdown (most likely none) due to the slower interval between attempts.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • [ ] I have added an integration test or an E2E test

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

@pchila pchila 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 Testing labels Feb 22, 2024
@pchila pchila requested a review from rdner February 22, 2024 09:27
@pchila pchila self-assigned this Feb 22, 2024
@pchila pchila requested a review from a team as a code owner February 22, 2024 09:27
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

Copy link
Contributor

mergify bot commented Feb 22, 2024

This pull request does not have a backport label. Could you fix it @pchila? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

Copy link

@rdner rdner added backport-v8.12.0 Automated backport with mergify backport-v8.13.0 Automated backport with mergify and removed backport-skip labels Feb 22, 2024
@rdner
Copy link
Member

rdner commented Feb 22, 2024

I think we should backport this to 8.12 and 8.13. Added the labels.

@michalpristas michalpristas changed the title increase waiting time and timeout for removal of agent files Increase waiting time and timeout for removal of agent files Feb 22, 2024
@pchila pchila merged commit 2eecafb into elastic:main Feb 22, 2024
12 checks passed
@pchila pchila deleted the slow-down-uninstall-timeout branch February 22, 2024 12:08
mergify bot pushed a commit that referenced this pull request Feb 22, 2024
* increase waiting time and timeout for removal of agent files

(cherry picked from commit 2eecafb)
mergify bot pushed a commit that referenced this pull request Feb 22, 2024
* increase waiting time and timeout for removal of agent files

(cherry picked from commit 2eecafb)
pchila added a commit that referenced this pull request Feb 22, 2024
* increase waiting time and timeout for removal of agent files

(cherry picked from commit 2eecafb)
pchila added a commit that referenced this pull request Feb 22, 2024
…4311)

* increase waiting time and timeout for removal of agent files

(cherry picked from commit 2eecafb)

Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
pchila added a commit that referenced this pull request Feb 22, 2024
…4312)

* increase waiting time and timeout for removal of agent files

(cherry picked from commit 2eecafb)

Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.12.0 Automated backport with mergify backport-v8.13.0 Automated backport with mergify bug Something isn't working Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Flaky Test]: TestLogIngestionFleetManaged – Failed to remove install directory
4 participants