-
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
[Ingest Manager] Agent remains in Enrolling state on executing the enroll command to move it to a different policy after install command #21794
Comments
Pinging @elastic/ingest-management (Team:Ingest Management) |
Please review the bug @vipulsrivastava-qasource |
Reviewed and assigned to @EricDavisX |
I like that you tried the elastic-agent.exe run command, but that shouldn't be done in general as part of the test, I expect with a running agent that should error. ITs a good error handling test. :) Not sure if this is the same bug as is already found, but I'll raise it to the team now - thanks! |
@EricDavisX may not be critical for 7.10 but its good to identify the test cases we do want to eventually support (if not now) with the new 'install' command and what should work after it is executed. @blakerouse ? |
@EricDavisX You can still run from the extracted directory, with enroll followed by install. The But you cannot have another Agent already running on the system, and that seems to be the issue. |
Thank you for confirming, we will not focus on that use case or error message - the steps they intended indicate they did not intentionally have a separate Agent running. so we will request a clean test environment, with confirmation that no service is installed and no Agent or Endpoint running, then we can assess the below:
... in this case, should Agent require any 'run' command after the enroll to make Agent pick up the changes or does it automatically? @rahulgupta-qasource I am learning that (I think) 'install' command is supported to be done multiple times in a row, and this is because for the most part, it just takes the param/values sent and runs the enroll / restart commands that exist. so, lets add a case for this:
If either of the above is still broken in current build we can capture logs and post details. Thanks |
Hi @EricDavisX Thank you for sharing the feedback. We have validated the above scenario on 7.10.0 BC3 Kibana cloud environment with commit ed66f41a8a60ad03426beff65ed270a743c46ac4 and 7.10.0 BC3 elastic-agent downloaded from below location: https://staging.elastic.co/7.10.0-aea04452/downloads/beats/elastic-agent/elastic-agent-7.10.0-windows-x86_64.zip Steps followed:
We have created the testcase C34910 for the same. Please let us know if anything is missing from our end. |
@rahulgupta-qasource Based on your latest comment, I believe this to be resolved then? Can this issue be closed? |
@rahulgupta-qasource thanks for the follow thru. I'd like to run one more test before closing it. In short-hand: Unless we have that covered already elsewhere. If all relating cases are working we can indeed close this |
Hi @EricDavisX We have performed scenario as per steps mentioned in above comment (#21794 (comment)) on 7.10.0 BC3 Kibana cloud environment with commit ed66f41a8a60ad03426beff65ed270a743c46ac4 and 7.10.0 BC3 elastic-agent downloaded from below location: https://staging.elastic.co/7.10.0-aea04452/summary-7.10.0.html/elastic-agent-7.10.0-windows-x86_64.zip Steps followed:
Observation: - At UI, agent remains in enrolling state. |
Looking at the screenshot of the PowerShell, this looks to be a user error. What you are doing is installing Elastic Agent and enrolling it (that is the Online) agent shown in Kibana. Then you are enrolling the agent again in the current directory, not the installed agent. You are never starting this agent so it stays in the This is all expected behavour. You should not be executing the final enroll command in your testing. If you want to re-enroll the installed Elastic Agent you need to be sure to execute from the correct directory.
In your screenshot your doing it from the extracted directory of:
Which is incorrect. |
Thank you @blakerouse - this is a nuance I think that had not been updated in the test cases we had created, and I may have done a poor job of passing the specs out as we are learning the feature. @rahulgupta-qasource @dikshachauhan-qasource thanks for the continued testing, can you update this in test content please and re-test it as noted? Also, I'll request that we do a full review of test content that relates to 'install' or 'enrollment' and make sure we have the correct cited path (the installed Agent) listed for tests to be more confident moving forward. For reference, you can re-read thru the original issue with many good details, here: #21019 |
Thanks for the clarification of enroll command execution. We have updated the required information in our testcase. https://elastic.testrail.io/index.php?/cases/view/34391 Also, we have retested it on 7.10.0 BC3 Kibana cloud environment with commit ed66f41a8a60ad03426beff65ed270a743c46ac4 and 7.10.0 BC3 elastic-agent downloaded from below location: https://staging.elastic.co/7.10.0-aea04452/summary-7.10.0.html/elastic-agent-7.10.0-windows-x86_64.zip Steps followed:
Observation: Agent has been enrolled successfully with a new policy after install command. Hence, we are closing this ticket. |
Kibana version:
Kibana: 7.10.0 BC1 cloud environment with commit 7a9f9132fffd8567ce3b985dde8bea6529e8fa3c
Elasticsearch version:
Elasticsearch: 7.10.0 BC1 cloud environment
Host OS and Browser version:
Windows , All
Original install method (e.g. download page, yum, from source, etc.):
7.10.0 BC1 cloud environment deployed from Staging cloud platform https://staging.found.no
Description
Agent remains in Enrolling state on executing the enroll command to move it to a different policy after install command
Preconditions
Steps to Reproduce
.\elastic-agent enroll adfasdfasdf.asdf:9243 adsfasdfsdf==
Test data
N/A
Impacted Test case id
N/A
Actual Result
Agent remains in Enrolling state on executing the enroll command to move it to a different policy after install command
Expected Result
Agent should be Online state with new policy and activity logs.
What's working
What's not working
Screenshot
On executing enroll command :
On executing run command:
Logs
N/A
The text was updated successfully, but these errors were encountered: