Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
# 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://github.com/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://github.com/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://github.com/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]>
- Loading branch information