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

Assume all nodes matching the search query are valid nodes #272

Merged
merged 1 commit into from
May 15, 2017

Conversation

kamaradclimber
Copy link
Contributor

Previously we checked if nodes were matching search query AND had an existing chef key.
This patch assumes that all nodes have exiting chef keys.

Experience I have with chef is that nodes without proper keys are bugs and needs
to be fixed anyway (either have a key or be removed).

This patch allows to make usage of --clean-unknown-clients much faster (avoid
querying chef-server for each node) especially on secrets encrypted for many
nodes (where search query time is small compared to querying all clients)

Signed-off-by: Grégoire Seux g.seux@criteo.com

@kamaradclimber
Copy link
Contributor Author

I'm of course willing to discuss the assumption "all nodes have a client" (got no answer on slack https://chefcommunity.slack.com/archives/C0M1NGZE3/p1493210220884148).

@thommay
Copy link
Contributor

thommay commented Apr 26, 2017

Yeah, I don't really understand why you'd get to a position of having nodes without clients, unless you have a terrible reaper program that only deletes clients.

@kamaradclimber
Copy link
Contributor Author

kamaradclimber commented Apr 26, 2017 via email

Previously we checked if nodes were matching search query AND had an existing chef key.
This patch assumes that all nodes have exiting chef keys.

Experience I have with chef is that nodes without proper keys are bugs and needs
to be fixed anyway (either have a key or be removed).

This patch allows to make usage of --clean-unknown-clients much faster (avoid
querying chef-server for each node) especially on secrets encrypted for many
nodes (where search query time is small compared to querying all clients)

This introduces a small change in behavior:
- before: existing nodes without client would be cleanup by --clean-unknown-clients
- now: such nodes are not cleaned. They will be cleaned when node will be removed

Change-Id: If45da1faec5c36026a75762afe4bad08cab97f64
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
@thommay thommay merged commit f4e5d09 into chef:master May 15, 2017
@thommay thommay added the Type: Enhancement Adds new functionality. label Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Adds new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants