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

Add default nodename for chef-client #1525

Merged
merged 1 commit into from
Nov 26, 2014
Merged

Conversation

scott2449
Copy link
Contributor

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 😀

@scott2449 scott2449 changed the title adding default nodename adding default nodename for chef-client Sep 24, 2014
@scott2449
Copy link
Contributor Author

@sethvargo
Copy link
Contributor

Seems reasonable to me. Although it would be nice to add some "user" information to the node name, like packer-<username>-<uuid>. This way, if I am looking in my Chef Sever and I see packer-sethvargo-1312-42-24-44, I know exactly who created it and can ask if it is still being used.

@scott2449
Copy link
Contributor Author

@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.

@sethvargo
Copy link
Contributor

@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.

@scott2449
Copy link
Contributor Author

@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.

@scott2449
Copy link
Contributor Author

@mitchellh thoughts?

@sethvargo sethvargo changed the title adding default nodename for chef-client Add default nodename for chef-client Nov 26, 2014
sethvargo added a commit that referenced this pull request Nov 26, 2014
Add default nodename for chef-client
@sethvargo sethvargo merged commit 0eb634a into hashicorp:master Nov 26, 2014
@sethvargo
Copy link
Contributor

Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants