-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Shorten CLI identifiers #675
Conversation
iverberk
commented
Jan 14, 2016
- Truncate all UUID identifiers to eight characters by default
- Refactor the node identifier to an auto-generated UUID
- Created and updated tests and mocks
* Truncate all UUID identifiers to eight characters by default * Refactor the node identifier to an auto-generated UUID * Created and updated tests and mocks
Not sure what is going on with the tests failing. They run without errors on my local machine. Will take a look at them tomorrow. Would be nice to know if this is happening locally to other people as well. |
* full-id argument is now called verbose to be more future-proof * constants for identifier length are a little more concise
@@ -450,6 +450,11 @@ func (c *Client) setupNode() error { | |||
node = &structs.Node{} | |||
c.config.Node = node | |||
} | |||
id, err := c.nodeID() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you do:
// Generate an ID for the node
var err error
node.id, err := c.nodeID()
if err != nil {...}
LGTM! Sorry this is a bit tedious but can you update the documentation on these pages: https://www.nomadproject.io/docs/commands/agent-info.html |
Thanks for the review! I updated the code according to your comments. The website documentation has also been updated, not tedious at all, just part of maintaining a solid product. |
Awesome work! Thanks @iverberk |
Sweet, thanks! :-) Maybe also good to mention in the changelog that the node id can no longer be specified through the configuration (backwards incompatible)? |
Yeah I threw it under the "BACKWORDS INCOMPATIBLE" section. We will have to On Tue, Jan 19, 2016 at 3:25 PM, iverberk [email protected] wrote:
|
Specifically, see https://github.com/hashicorp/nomad/blob/master/CHANGELOG.md#030 > Node ID is no longer specifiable. For users who have set a custom Node ID, the node should be drained before Nomad is updated and the data_dir should be deleted before starting for the first time [hashicorpGH-675]
Dropped `node_id` from docs, per #675
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |