-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Elastic Agent] Add basic protocol to control Elastic Agent. #20146
Conversation
Pinging @elastic/ingest-management (Team:Ingest Management) |
💔 Build FailedExpand to view the summary
Build stats
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
jenkins run tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a small comments but overall it looks ok
DEGRADED = 3; | ||
FAILED = 4; | ||
STOPPING = 5; | ||
UPGRADING = 6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
related to that can we introduce status for ROLLBACK? which takes place in between UPGRADING and FAILED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes will add rollback
message UpgradeRequest { | ||
// (Optional) Version to upgrade to. | ||
// | ||
// If not provided Elastic Agent will auto discover the latest version in the same major |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes sense but i'm worried a bit about sealed env. while it initially might all work without even using default sourceURI as everything is packed. then on upgrade request without version and sourceURI it will fail.
i would be up for these to values being required and relaxing later when we have clear use cases. relaxing is not breaking other way around is though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being that CLI call to upgrade over the socket will return an UpgradeResponse
we can place in the error message why the upgrade cannot be performed. Maybe it is we cannot discover the next version, or maybe we make the version required in some cases like when on the last minor of the current major.
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
…ne-2.0 * upstream/master: (29 commits) Add an explicit system test for processes on unix systems (elastic#20320) [Autodiscovery] Ignore ErrInputNotFinished errors in autodiscover config checks (elastic#20305) [CI] Update README.md with CI references (elastic#20316) Add ECK doc links to Heartbeat docs (elastic#20284) [Filebeat] Add export tests to x-pack/filebeat (elastic#20156) feat(ci): support building docker images for PRs (elastic#20323) Update system tests dependency (elastic#20287) [Libbeat] Log debug message if the Kibana dashboard can not be imported from the archive (elastic#12211) (elastic#20150) [Filebeat][Gsuite] Transform all dates to timestamp with processor (elastic#20308) Infer types in Prometheus remote_write (elastic#19944) Remove unnecessary restarts of metricsets while using Node autodiscover (elastic#19974) docs: update changelog on master branch (elastic#20259) feat(ci): support storing artifacts for PRs in separate dirs (elastic#20282) [CI] Change upstream reference (elastic#20296) [Filebeat] Updates to Suricata module (elastic#20220) [docs] Fix Windows download link for agent (elastic#20258) [docs] Rename release highlights to what's new (elastic#20255) fix: update the display name of the multibranch job (elastic#20265) [Elastic Agent] Add basic protocol to control Elastic Agent. (elastic#20146) Cisco ASA: Fix message 106100 (elastic#20245) ...
…#20146) * Add protocl to control Elastic Agent. * Add more to version response. * Fix CI with protoc. * Improve protocol and try and fix CI. * Fix proto. * Remove CI changes. * Update go.mod. * Add status ROLLBACK. * Run mage fmt.
What does this PR do?
Adds the protocol that Elastic Agent will expose between the CLI and daemon to control the running daemon.
Why is it important?
To provide a better UX, easy testing of re-exec and self-upgrading.
Checklist
[ ] 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 inCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues