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

[Beats CM] Saying no to enrollment still enrolls but config is not overwritten #10150

Closed
liza-mae opened this issue Jan 17, 2019 · 3 comments
Closed
Assignees

Comments

@liza-mae
Copy link

Version: 6.6.0 BC6
Operating System: Ubuntu 16.04
Steps to Reproduce:

  1. Install ES, Kibana, Filebeat
  2. In Kibana go Beats CM and enroll beat filebeat
  3. In terminal, enroll filebeat, but hit 'N' I would have expected it to cancel out the enrollment, but looks like it still enrolls and does not overwrite the config. Is this intended to work that way? Seems it should cancel the enrollment too.

./filebeat enroll URL TOKEN
This will replace your current settings. Do you want to continue? [Y/n]:n
Enrolled and ready to retrieve settings from Kibana

@liza-mae liza-mae added the CM label Jan 17, 2019
@ph ph added Management and removed CM labels Feb 12, 2019
@ph ph self-assigned this Mar 1, 2019
@ph
Copy link
Contributor

ph commented Mar 1, 2019

Taking a look at this, we definitively should not override the config.

@ph
Copy link
Contributor

ph commented Mar 1, 2019

I have a fix for that, It was a problem with the logic, first the token was right away enrolled and the confirm method did not return the right thing.

I have fixed the code, will do a bit more testing and see if there is any more edge cases.

@liza-mae
Copy link
Author

liza-mae commented Mar 1, 2019

Thanks @ph !

ph added a commit to ph/beats that referenced this issue Mar 5, 2019
Fix an issue with a partial enroll, when a user refused to overrides a
local configuration actually the enroll command did already used the
token on the ES cluster, this commit move the confirm in the CM instead
of having it in the Enroll's function and is executed by sending the
token or creating any files on disk.

Fixes: elastic#10150
@ph ph closed this as completed in #11067 Mar 11, 2019
ph added a commit that referenced this issue Mar 11, 2019
Fix an issue with a partial enroll, when a user refused to overrides a
local configuration actually the enroll command did already used the
token on the ES cluster, this commit move the confirm in the CM instead
of having it in the Enroll's function and is executed by sending the
token or creating any files on disk.

Fixes: #10150
ph added a commit to ph/beats that referenced this issue Mar 11, 2019
Fix an issue with a partial enroll, when a user refused to overrides a
local configuration actually the enroll command did already used the
token on the ES cluster, this commit move the confirm in the CM instead
of having it in the Enroll's function and is executed by sending the
token or creating any files on disk.

Fixes: elastic#10150
(cherry picked from commit 5eb5085)
ph added a commit to ph/beats that referenced this issue Mar 13, 2019
Fix an issue with a partial enroll, when a user refused to overrides a
local configuration actually the enroll command did already used the
token on the ES cluster, this commit move the confirm in the CM instead
of having it in the Enroll's function and is executed by sending the
token or creating any files on disk.

Fixes: elastic#10150
(cherry picked from commit 5eb5085)
ph added a commit to ph/beats that referenced this issue Mar 13, 2019
Fix an issue with a partial enroll, when a user refused to overrides a
local configuration actually the enroll command did already used the
token on the ES cluster, this commit move the confirm in the CM instead
of having it in the Enroll's function and is executed by sending the
token or creating any files on disk.

Fixes: elastic#10150
(cherry picked from commit 5eb5085)
ph added a commit that referenced this issue Mar 13, 2019
…1186)

* Fix a issue when cancelling an enroll. (#11067)

Fix an issue with a partial enroll, when a user refused to overrides a
local configuration actually the enroll command did already used the
token on the ES cluster, this commit move the confirm in the CM instead
of having it in the Enroll's function and is executed by sending the
token or creating any files on disk.

Fixes: #10150
(cherry picked from commit 5eb5085)
ph added a commit that referenced this issue Mar 14, 2019
…1185)

Cherry-pick of PR #11067 to 7.0 branch. Original message: 

Fix an issue with a partial enroll, when a user refused to overrides a
local configuration actually the enroll command did already used the
token on the ES cluster, this commit move the confirm in the CM instead
of having it in the Enroll's function and is executed by sending the
token or creating any files on disk.

Fixes: #10150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants