-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add default nodename for chef-client #1525
Conversation
Seems reasonable to me. Although it would be nice to add some "user" information to the node name, like |
@sethvargo Agreed. Do you know of a place in the code that I can easily get to that info currently? I thought about using the FQDN as well but that info is only known chef server side. This might be a bit easier because it's in the local chef config. |
@scott2449 you could probably just use client_name: if nodeName == "" {
nodeName = fmt.Sprintf("packer-%s-%s", p.config.ClientName uuid.TimeOrderedUUID())
} That being said, I don't know if that's actually a required field. |
@sethvargo Do you mean ValidationClientName? That can be shard by multiple builds (cookbooks). After looking a bit more I still do see anything we could use to make it more unique with running commands on the node (target machine) and parsing the results. At least with packer- we can find and remove any ones are aren't caught by a knife delete. I mean since we just use these to build and image I don't think there is a use case where you want to keep the node entry on the chef server. |
@mitchellh thoughts? |
Add default nodename for chef-client
Thanks! |
Defaulting on nodename which seems more graceful and in-line with other provisioners. Also clarifying knife docs. RFC.
See #1520, #1295, #1100, and probably some others 😀