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

Cherry-pick #24128 to 7.x: Fix: Successfully installed and enrolled agent running standalone #24131

Merged
merged 1 commit into from
Feb 19, 2021

Conversation

michalpristas
Copy link
Contributor

@michalpristas michalpristas commented Feb 19, 2021

Cherry-pick of PR #24128 to 7.x branch. Original message:

What does this PR do?

In #23865 there was a change in order of starting a service and enrollment itself.
Installation procedure first enrolled agent and then started a service.

With the change introduced we first start a service in standalone mode and then enroll to fleet/fleet-server if needed.
This lead into race which either did not manifest or manifested as agent with fleet config in it's directory running standalone

During enrollment there was a check if it originates in install command and if so restart is not performed. This check is no longer needed and restart needs to be performed every time.

Manifested as what we thought of as flaky-ness in e2e

Why is it important?

Successfully installed and enrolled agent running standalone

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.next.asciidoc or CHANGELOG-developer.next.asciidoc.

…ng standalone (elastic#24128)

[Ingest Manager] Fix: Successfully installed and enrolled agent running standalone (elastic#24128)
@michalpristas michalpristas added bug backport test-plan Add this PR to be manual test plan Team:Ingest Management Team:Elastic-Agent Label for the Agent team labels Feb 19, 2021
@michalpristas michalpristas self-assigned this Feb 19, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Feb 19, 2021
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #24131 opened

  • Start Time: 2021-02-19T15:50:46.016+0000

  • Duration: 52 min 39 sec

  • Commit: d441d3f

Test stats 🧪

Test Results
Failed 0
Passed 6486
Skipped 24
Total 6510

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 6486
Skipped 24
Total 6510

@michalpristas michalpristas merged commit e79aad3 into elastic:7.x Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bug Team:Elastic-Agent Label for the Agent team test-plan Add this PR to be manual test plan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants