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

Report client run mode to data collector #9218

Open
kmacgugan opened this issue Jan 14, 2020 · 3 comments
Open

Report client run mode to data collector #9218

kmacgugan opened this issue Jan 14, 2020 · 3 comments

Comments

@kmacgugan
Copy link
Contributor

@kmacgugan kmacgugan commented Jan 14, 2020

Describe the Enhancement:

With the current client run reports we are unable to determine if a client run was run under the effortless pattern, in target mode, or other modes. It would be better if we had a top level field that reported the circumstances of the run (target mode, effortless, local mode, chef-server?, others?).

Describe the Need:

We can display this information in automate, and users can have a better idea of the types of nodes they are running.

Current Alternative

We use the chef_server_fqdn to determine if it was run as localmode, as this should be localhost if so. We have no other information to go on.

Can We Help You Implement This?:

Yes.

@TheLunaticScripter

This comment has been minimized.

Copy link
Contributor

@TheLunaticScripter TheLunaticScripter commented Jan 14, 2020

This would be awesome. Just for the effortless side of things we currently have two ways to pass in things like this, the client.rb file and in the chef-client command. Not sure if adding another flag for effortless is the best option or a setting in the client.rb. 🤷‍♂

@lamont-granquist

This comment has been minimized.

Copy link
Contributor

@lamont-granquist lamont-granquist commented Jan 24, 2020

Chef::Config.target_mode? could just be rendered into the payload somewhere.

how strict is the ingestion of the JSON on the server-side? i've been wary of adding any top-level keys to the data collector output for fear of breaking it (and creating a backwards incompatibility issue).

@kmacgugan

This comment has been minimized.

Copy link
Contributor Author

@kmacgugan kmacgugan commented Jan 27, 2020

I think we could reuse the top level "source" field in the current payload. From the original RFC it is an enum of chef_client and chef_solo, and we don't have validation on the values received in automate.
https://github.com/chef-boneyard/chef-rfc/blob/master/rfc077-mode-agnostic-data-collection.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.