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

Fix order of operations in instructions. #195503

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Fix order of operations in instructions. #195503

merged 1 commit into from
Oct 9, 2024

Conversation

rhass
Copy link
Contributor

@rhass rhass commented Oct 8, 2024

Summary

The enroll command must be executed after the elastic-agent is running. This updates the instructions and tests so that users are told to enable and start the agent before running the enroll command to ensure the socket file is created and available.

This fixes issues with errors like this:

{"log.level":"info","@timestamp":"2024-10-08T20:47:06.857Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":518},"message":"Starting enrollment to URL: https://<REDACTED>.fleet.us-west-2.aws.elastic.cloud:443/","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-10-08T20:47:08.681Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":481},"message":"Restarting agent daemon, attempt 0","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-10-08T20:47:08.683Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":495},"message":"Restart attempt 0 failed: 'rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial unix /usr/share/elastic-agent/elastic-agent.sock: connect: no such file or directory\"'. Waiting for 2s","ecs.version":"1.6.0"}

Checklist

N/A

For maintainers

@rhass rhass requested a review from a team as a code owner October 8, 2024 20:50
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Oct 8, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@rhass rhass enabled auto-merge (squash) October 8, 2024 20:50
Copy link
Contributor

@jen-huang jen-huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! I suspect the Fleet Server instructions also need to be fixed similarly, would you be able to double check and fix if needed?:

deb: `${artifact.downloadCommand}\nsudo elastic-agent enroll ${commandArgumentsStr}\nsudo systemctl enable elastic-agent\nsudo systemctl start elastic-agent`,
rpm: `${artifact.downloadCommand}\nsudo elastic-agent enroll ${commandArgumentsStr}\nsudo systemctl enable elastic-agent\nsudo systemctl start elastic-agent`,

The enroll command must be executed after the elastic-agent is running.
This updates the instructions and tests so that users are told to enable
and startthe agent before running the `enroll` command to ensure the
socket file is created and available.
@rhass
Copy link
Contributor Author

rhass commented Oct 8, 2024

Thanks for the fix! I suspect the Fleet Server instructions also need to be fixed similarly, would you be able to double check and fix if needed?:

No problem! I found some other instances in a test which needed to be updated as well, I didn't find any others -- but I could be mistaken.

@rhass
Copy link
Contributor Author

rhass commented Oct 8, 2024

I think this fixes #179598 so I added it to the description.

Copy link
Contributor

@jen-huang jen-huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM!

@jen-huang jen-huang added release_note:skip Skip the PR/issue when compiling release notes backport:prev-major Backport to (8.x, 8.16, 8.15) the previous major branch and all later branches still in development labels Oct 8, 2024
@rhass rhass merged commit 13c2c76 into elastic:main Oct 9, 2024
28 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.15, 8.x

https:/elastic/kibana/actions/runs/11245643650

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #48 / discover/esql discover esql view switch modal should not show switch modal when switching to a data view while a saved search is open
  • [job] [logs] Jest Tests #14 / FilterPopover renders button label correctly

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.7MB 1.7MB +6.0B

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 9, 2024
## Summary

The enroll command must be executed after the elastic-agent is running.
This updates the instructions so that users are told to enable and start
the agent before running the `enroll` command to ensure the socket file
is created and available.

This fixes issues with errors like this:

```
{"log.level":"info","@timestamp":"2024-10-08T20:47:06.857Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":518},"message":"Starting enrollment to URL: https://<REDACTED>.fleet.us-west-2.aws.elastic.cloud:443/","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-10-08T20:47:08.681Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":481},"message":"Restarting agent daemon, attempt 0","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-10-08T20:47:08.683Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":495},"message":"Restart attempt 0 failed: 'rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial unix /usr/share/elastic-agent/elastic-agent.sock: connect: no such file or directory\"'. Waiting for 2s","ecs.version":"1.6.0"}
```

### Checklist

N/A

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit 13c2c76)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.15 Backport failed because of merge conflicts
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 195503

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 9, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [Fix order of operations in instructions.
(#195503)](#195503)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https:/sqren/backport)

<!--BACKPORT [{"author":{"name":"Ryan
Hass","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-09T00:01:48Z","message":"Fix
order of operations in instructions. (#195503)\n\n## Summary\r\n\r\nThe
enroll command must be executed after the elastic-agent is
running.\r\nThis updates the instructions so that users are told to
enable and start\r\nthe agent before running the `enroll` command to
ensure the socket file\r\nis created and available.\r\n\r\nThis fixes
issues with errors like
this:\r\n\r\n```\r\n{\"log.level\":\"info\",\"@timestamp\":\"2024-10-08T20:47:06.857Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":518},\"message\":\"Starting
enrollment to URL:
https://<REDACTED>.fleet.us-west-2.aws.elastic.cloud:443/\",\"ecs.version\":\"1.6.0\"}\r\n{\"log.level\":\"info\",\"@timestamp\":\"2024-10-08T20:47:08.681Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":481},\"message\":\"Restarting
agent daemon, attempt
0\",\"ecs.version\":\"1.6.0\"}\r\n{\"log.level\":\"error\",\"@timestamp\":\"2024-10-08T20:47:08.683Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":495},\"message\":\"Restart
attempt 0 failed: 'rpc error: code = Unavailable desc = connection
error: desc = \\\"transport: Error while dialing: dial unix
/usr/share/elastic-agent/elastic-agent.sock: connect: no such file or
directory\\\"'. Waiting for
2s\",\"ecs.version\":\"1.6.0\"}\r\n```\r\n\r\n###
Checklist\r\n\r\nN/A\r\n\r\n### For maintainers\r\n\r\n- [ ] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"13c2c7663546da0f6b34e5dd85932ebc74ecafa7","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-major"],"title":"Fix
order of operations in
instructions.","number":195503,"url":"https:/elastic/kibana/pull/195503","mergeCommit":{"message":"Fix
order of operations in instructions. (#195503)\n\n## Summary\r\n\r\nThe
enroll command must be executed after the elastic-agent is
running.\r\nThis updates the instructions so that users are told to
enable and start\r\nthe agent before running the `enroll` command to
ensure the socket file\r\nis created and available.\r\n\r\nThis fixes
issues with errors like
this:\r\n\r\n```\r\n{\"log.level\":\"info\",\"@timestamp\":\"2024-10-08T20:47:06.857Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":518},\"message\":\"Starting
enrollment to URL:
https://<REDACTED>.fleet.us-west-2.aws.elastic.cloud:443/\",\"ecs.version\":\"1.6.0\"}\r\n{\"log.level\":\"info\",\"@timestamp\":\"2024-10-08T20:47:08.681Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":481},\"message\":\"Restarting
agent daemon, attempt
0\",\"ecs.version\":\"1.6.0\"}\r\n{\"log.level\":\"error\",\"@timestamp\":\"2024-10-08T20:47:08.683Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":495},\"message\":\"Restart
attempt 0 failed: 'rpc error: code = Unavailable desc = connection
error: desc = \\\"transport: Error while dialing: dial unix
/usr/share/elastic-agent/elastic-agent.sock: connect: no such file or
directory\\\"'. Waiting for
2s\",\"ecs.version\":\"1.6.0\"}\r\n```\r\n\r\n###
Checklist\r\n\r\nN/A\r\n\r\n### For maintainers\r\n\r\n- [ ] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"13c2c7663546da0f6b34e5dd85932ebc74ecafa7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https:/elastic/kibana/pull/195503","number":195503,"mergeCommit":{"message":"Fix
order of operations in instructions. (#195503)\n\n## Summary\r\n\r\nThe
enroll command must be executed after the elastic-agent is
running.\r\nThis updates the instructions so that users are told to
enable and start\r\nthe agent before running the `enroll` command to
ensure the socket file\r\nis created and available.\r\n\r\nThis fixes
issues with errors like
this:\r\n\r\n```\r\n{\"log.level\":\"info\",\"@timestamp\":\"2024-10-08T20:47:06.857Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":518},\"message\":\"Starting
enrollment to URL:
https://<REDACTED>.fleet.us-west-2.aws.elastic.cloud:443/\",\"ecs.version\":\"1.6.0\"}\r\n{\"log.level\":\"info\",\"@timestamp\":\"2024-10-08T20:47:08.681Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":481},\"message\":\"Restarting
agent daemon, attempt
0\",\"ecs.version\":\"1.6.0\"}\r\n{\"log.level\":\"error\",\"@timestamp\":\"2024-10-08T20:47:08.683Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":495},\"message\":\"Restart
attempt 0 failed: 'rpc error: code = Unavailable desc = connection
error: desc = \\\"transport: Error while dialing: dial unix
/usr/share/elastic-agent/elastic-agent.sock: connect: no such file or
directory\\\"'. Waiting for
2s\",\"ecs.version\":\"1.6.0\"}\r\n```\r\n\r\n###
Checklist\r\n\r\nN/A\r\n\r\n### For maintainers\r\n\r\n- [ ] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"13c2c7663546da0f6b34e5dd85932ebc74ecafa7"}}]}]
BACKPORT-->

Co-authored-by: Ryan Hass <[email protected]>
@rhass
Copy link
Contributor Author

rhass commented Oct 9, 2024

💚 All backports created successfully

Status Branch Result
8.15

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

rhass added a commit to rhass/kibana that referenced this pull request Oct 9, 2024
## Summary

The enroll command must be executed after the elastic-agent is running.
This updates the instructions so that users are told to enable and start
the agent before running the `enroll` command to ensure the socket file
is created and available.

This fixes issues with errors like this:

```
{"log.level":"info","@timestamp":"2024-10-08T20:47:06.857Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":518},"message":"Starting enrollment to URL: https://<REDACTED>.fleet.us-west-2.aws.elastic.cloud:443/","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-10-08T20:47:08.681Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":481},"message":"Restarting agent daemon, attempt 0","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-10-08T20:47:08.683Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":495},"message":"Restart attempt 0 failed: 'rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial unix /usr/share/elastic-agent/elastic-agent.sock: connect: no such file or directory\"'. Waiting for 2s","ecs.version":"1.6.0"}
```

### Checklist

N/A

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit 13c2c76)

# Conflicts:
#	x-pack/plugins/fleet/public/applications/fleet/components/fleet_server_instructions/utils/install_command_utils.test.ts
rhass added a commit that referenced this pull request Oct 9, 2024
# Backport

This will backport the following commits from `main` to `8.15`:
- [Fix order of operations in instructions.
(#195503)](#195503)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https:/sqren/backport)

<!--BACKPORT [{"author":{"name":"Ryan
Hass","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-09T00:01:48Z","message":"Fix
order of operations in instructions. (#195503)\n\n## Summary\r\n\r\nThe
enroll command must be executed after the elastic-agent is
running.\r\nThis updates the instructions so that users are told to
enable and start\r\nthe agent before running the `enroll` command to
ensure the socket file\r\nis created and available.\r\n\r\nThis fixes
issues with errors like
this:\r\n\r\n```\r\n{\"log.level\":\"info\",\"@timestamp\":\"2024-10-08T20:47:06.857Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":518},\"message\":\"Starting
enrollment to URL:
https://<REDACTED>.fleet.us-west-2.aws.elastic.cloud:443/\",\"ecs.version\":\"1.6.0\"}\r\n{\"log.level\":\"info\",\"@timestamp\":\"2024-10-08T20:47:08.681Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":481},\"message\":\"Restarting
agent daemon, attempt
0\",\"ecs.version\":\"1.6.0\"}\r\n{\"log.level\":\"error\",\"@timestamp\":\"2024-10-08T20:47:08.683Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":495},\"message\":\"Restart
attempt 0 failed: 'rpc error: code = Unavailable desc = connection
error: desc = \\\"transport: Error while dialing: dial unix
/usr/share/elastic-agent/elastic-agent.sock: connect: no such file or
directory\\\"'. Waiting for
2s\",\"ecs.version\":\"1.6.0\"}\r\n```\r\n\r\n###
Checklist\r\n\r\nN/A\r\n\r\n### For maintainers\r\n\r\n- [ ] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"13c2c7663546da0f6b34e5dd85932ebc74ecafa7","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-major","v8.16.0"],"number":195503,"url":"https:/elastic/kibana/pull/195503","mergeCommit":{"message":"Fix
order of operations in instructions. (#195503)\n\n## Summary\r\n\r\nThe
enroll command must be executed after the elastic-agent is
running.\r\nThis updates the instructions so that users are told to
enable and start\r\nthe agent before running the `enroll` command to
ensure the socket file\r\nis created and available.\r\n\r\nThis fixes
issues with errors like
this:\r\n\r\n```\r\n{\"log.level\":\"info\",\"@timestamp\":\"2024-10-08T20:47:06.857Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":518},\"message\":\"Starting
enrollment to URL:
https://<REDACTED>.fleet.us-west-2.aws.elastic.cloud:443/\",\"ecs.version\":\"1.6.0\"}\r\n{\"log.level\":\"info\",\"@timestamp\":\"2024-10-08T20:47:08.681Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":481},\"message\":\"Restarting
agent daemon, attempt
0\",\"ecs.version\":\"1.6.0\"}\r\n{\"log.level\":\"error\",\"@timestamp\":\"2024-10-08T20:47:08.683Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":495},\"message\":\"Restart
attempt 0 failed: 'rpc error: code = Unavailable desc = connection
error: desc = \\\"transport: Error while dialing: dial unix
/usr/share/elastic-agent/elastic-agent.sock: connect: no such file or
directory\\\"'. Waiting for
2s\",\"ecs.version\":\"1.6.0\"}\r\n```\r\n\r\n###
Checklist\r\n\r\nN/A\r\n\r\n### For maintainers\r\n\r\n- [ ] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"13c2c7663546da0f6b34e5dd85932ebc74ecafa7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https:/elastic/kibana/pull/195503","number":195503,"mergeCommit":{"message":"Fix
order of operations in instructions. (#195503)\n\n## Summary\r\n\r\nThe
enroll command must be executed after the elastic-agent is
running.\r\nThis updates the instructions so that users are told to
enable and start\r\nthe agent before running the `enroll` command to
ensure the socket file\r\nis created and available.\r\n\r\nThis fixes
issues with errors like
this:\r\n\r\n```\r\n{\"log.level\":\"info\",\"@timestamp\":\"2024-10-08T20:47:06.857Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":518},\"message\":\"Starting
enrollment to URL:
https://<REDACTED>.fleet.us-west-2.aws.elastic.cloud:443/\",\"ecs.version\":\"1.6.0\"}\r\n{\"log.level\":\"info\",\"@timestamp\":\"2024-10-08T20:47:08.681Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":481},\"message\":\"Restarting
agent daemon, attempt
0\",\"ecs.version\":\"1.6.0\"}\r\n{\"log.level\":\"error\",\"@timestamp\":\"2024-10-08T20:47:08.683Z\",\"log.origin\":{\"function\":\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\",\"file.name\":\"cmd/enroll_cmd.go\",\"file.line\":495},\"message\":\"Restart
attempt 0 failed: 'rpc error: code = Unavailable desc = connection
error: desc = \\\"transport: Error while dialing: dial unix
/usr/share/elastic-agent/elastic-agent.sock: connect: no such file or
directory\\\"'. Waiting for
2s\",\"ecs.version\":\"1.6.0\"}\r\n```\r\n\r\n###
Checklist\r\n\r\nN/A\r\n\r\n### For maintainers\r\n\r\n- [ ] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"13c2c7663546da0f6b34e5dd85932ebc74ecafa7"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"url":"https:/elastic/kibana/pull/195524","number":195524,"state":"MERGED","mergeCommit":{"sha":"d3c0b006da9d607904f9e395849b99cf11a4413f","message":"[8.x]
Fix order of operations in instructions. (#195503) (#195524)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`8.x`:\n- [Fix order of operations in
instructions.\n(#195503)](https:/elastic/kibana/pull/195503)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https:/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Ryan\nHass\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-10-09T00:01:48Z\",\"message\":\"Fix\norder
of operations in instructions. (#195503)\\n\\n##
Summary\\r\\n\\r\\nThe\nenroll command must be executed after the
elastic-agent is\nrunning.\\r\\nThis updates the instructions so that
users are told to\nenable and start\\r\\nthe agent before running the
`enroll` command to\nensure the socket file\\r\\nis created and
available.\\r\\n\\r\\nThis fixes\nissues with errors
like\nthis:\\r\\n\\r\\n```\\r\\n{\\\"log.level\\\":\\\"info\\\",\\\"@timestamp\\\":\\\"2024-10-08T20:47:06.857Z\\\",\\\"log.origin\\\":{\\\"function\\\":\\\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff\\\",\\\"file.name\\\":\\\"cmd/enroll_cmd.go\\\",\\\"file.line\\\":518},\\\"message\\\":\\\"Starting\nenrollment
to
URL:\nhttps://<REDACTED>.fleet.us-west-2.aws.elastic.cloud:443/\\\",\\\"ecs.version\\\":\\\"1.6.0\\\"}\\r\\n{\\\"log.level\\\":\\\"info\\\",\\\"@timestamp\\\":\\\"2024-10-08T20:47:08.681Z\\\",\\\"log.origin\\\":{\\\"function\\\":\\\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\\\",\\\"file.name\\\":\\\"cmd/enroll_cmd.go\\\",\\\"file.line\\\":481},\\\"message\\\":\\\"Restarting\nagent
daemon,
attempt\n0\\\",\\\"ecs.version\\\":\\\"1.6.0\\\"}\\r\\n{\\\"log.level\\\":\\\"error\\\",\\\"@timestamp\\\":\\\"2024-10-08T20:47:08.683Z\\\",\\\"log.origin\\\":{\\\"function\\\":\\\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\\\",\\\"file.name\\\":\\\"cmd/enroll_cmd.go\\\",\\\"file.line\\\":495},\\\"message\\\":\\\"Restart\nattempt
0 failed: 'rpc error: code = Unavailable desc = connection\nerror: desc
= \\\\\\\"transport: Error while dialing: dial
unix\n/usr/share/elastic-agent/elastic-agent.sock: connect: no such file
or\ndirectory\\\\\\\"'. Waiting
for\n2s\\\",\\\"ecs.version\\\":\\\"1.6.0\\\"}\\r\\n```\\r\\n\\r\\n###\nChecklist\\r\\n\\r\\nN/A\\r\\n\\r\\n###
For maintainers\\r\\n\\r\\n- [ ] This was\nchecked for breaking API
changes and
was\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\",\"sha\":\"13c2c7663546da0f6b34e5dd85932ebc74ecafa7\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.16.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"Team:Fleet\",\"v9.0.0\",\"backport:prev-major\"],\"title\":\"Fix\norder
of operations
in\ninstructions.\",\"number\":195503,\"url\":\"https:/elastic/kibana/pull/195503\",\"mergeCommit\":{\"message\":\"Fix\norder
of operations in instructions. (#195503)\\n\\n##
Summary\\r\\n\\r\\nThe\nenroll command must be executed after the
elastic-agent is\nrunning.\\r\\nThis updates the instructions so that
users are told to\nenable and start\\r\\nthe agent before running the
`enroll` command to\nensure the socket file\\r\\nis created and
available.\\r\\n\\r\\nThis fixes\nissues with errors
like\nthis:\\r\\n\\r\\n```\\r\\n{\\\"log.level\\\":\\\"info\\\",\\\"@timestamp\\\":\\\"2024-10-08T20:47:06.857Z\\\",\\\"log.origin\\\":{\\\"function\\\":\\\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff\\\",\\\"file.name\\\":\\\"cmd/enroll_cmd.go\\\",\\\"file.line\\\":518},\\\"message\\\":\\\"Starting\nenrollment
to
URL:\nhttps://<REDACTED>.fleet.us-west-2.aws.elastic.cloud:443/\\\",\\\"ecs.version\\\":\\\"1.6.0\\\"}\\r\\n{\\\"log.level\\\":\\\"info\\\",\\\"@timestamp\\\":\\\"2024-10-08T20:47:08.681Z\\\",\\\"log.origin\\\":{\\\"function\\\":\\\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\\\",\\\"file.name\\\":\\\"cmd/enroll_cmd.go\\\",\\\"file.line\\\":481},\\\"message\\\":\\\"Restarting\nagent
daemon,
attempt\n0\\\",\\\"ecs.version\\\":\\\"1.6.0\\\"}\\r\\n{\\\"log.level\\\":\\\"error\\\",\\\"@timestamp\\\":\\\"2024-10-08T20:47:08.683Z\\\",\\\"log.origin\\\":{\\\"function\\\":\\\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\\\",\\\"file.name\\\":\\\"cmd/enroll_cmd.go\\\",\\\"file.line\\\":495},\\\"message\\\":\\\"Restart\nattempt
0 failed: 'rpc error: code = Unavailable desc = connection\nerror: desc
= \\\\\\\"transport: Error while dialing: dial
unix\n/usr/share/elastic-agent/elastic-agent.sock: connect: no such file
or\ndirectory\\\\\\\"'. Waiting
for\n2s\\\",\\\"ecs.version\\\":\\\"1.6.0\\\"}\\r\\n```\\r\\n\\r\\n###\nChecklist\\r\\n\\r\\nN/A\\r\\n\\r\\n###
For maintainers\\r\\n\\r\\n- [ ] This was\nchecked for breaking API
changes and
was\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\",\"sha\":\"13c2c7663546da0f6b34e5dd85932ebc74ecafa7\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https:/elastic/kibana/pull/195503\",\"number\":195503,\"mergeCommit\":{\"message\":\"Fix\norder
of operations in instructions. (#195503)\\n\\n##
Summary\\r\\n\\r\\nThe\nenroll command must be executed after the
elastic-agent is\nrunning.\\r\\nThis updates the instructions so that
users are told to\nenable and start\\r\\nthe agent before running the
`enroll` command to\nensure the socket file\\r\\nis created and
available.\\r\\n\\r\\nThis fixes\nissues with errors
like\nthis:\\r\\n\\r\\n```\\r\\n{\\\"log.level\\\":\\\"info\\\",\\\"@timestamp\\\":\\\"2024-10-08T20:47:06.857Z\\\",\\\"log.origin\\\":{\\\"function\\\":\\\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff\\\",\\\"file.name\\\":\\\"cmd/enroll_cmd.go\\\",\\\"file.line\\\":518},\\\"message\\\":\\\"Starting\nenrollment
to
URL:\nhttps://<REDACTED>.fleet.us-west-2.aws.elastic.cloud:443/\\\",\\\"ecs.version\\\":\\\"1.6.0\\\"}\\r\\n{\\\"log.level\\\":\\\"info\\\",\\\"@timestamp\\\":\\\"2024-10-08T20:47:08.681Z\\\",\\\"log.origin\\\":{\\\"function\\\":\\\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\\\",\\\"file.name\\\":\\\"cmd/enroll_cmd.go\\\",\\\"file.line\\\":481},\\\"message\\\":\\\"Restarting\nagent
daemon,
attempt\n0\\\",\\\"ecs.version\\\":\\\"1.6.0\\\"}\\r\\n{\\\"log.level\\\":\\\"error\\\",\\\"@timestamp\\\":\\\"2024-10-08T20:47:08.683Z\\\",\\\"log.origin\\\":{\\\"function\\\":\\\"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff\\\",\\\"file.name\\\":\\\"cmd/enroll_cmd.go\\\",\\\"file.line\\\":495},\\\"message\\\":\\\"Restart\nattempt
0 failed: 'rpc error: code = Unavailable desc = connection\nerror: desc
= \\\\\\\"transport: Error while dialing: dial
unix\n/usr/share/elastic-agent/elastic-agent.sock: connect: no such file
or\ndirectory\\\\\\\"'. Waiting
for\n2s\\\",\\\"ecs.version\\\":\\\"1.6.0\\\"}\\r\\n```\\r\\n\\r\\n###\nChecklist\\r\\n\\r\\nN/A\\r\\n\\r\\n###
For maintainers\\r\\n\\r\\n- [ ] This was\nchecked for breaking API
changes and
was\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\",\"sha\":\"13c2c7663546da0f6b34e5dd85932ebc74ecafa7\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Ryan Hass <[email protected]>"}}]}] BACKPORT-->
@mistic
Copy link
Member

mistic commented Oct 17, 2024

This PR didn't make it into the latest BC of v8.15.3. Updating the labels.

@mistic mistic added v8.15.4 and removed v8.15.3 labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-major Backport to (8.x, 8.16, 8.15) the previous major branch and all later branches still in development release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.15.4 v8.16.0 v9.0.0
Projects
None yet
5 participants