Modify razor nodenames ( node1,node2,node3.. )

48 views
Skip to first unread message

worldian

unread,
Oct 25, 2016, 5:19:39 PM10/25/16
to puppet-razor

I am trying to use puppet razor to deploy about 1000 servers, and i realize that puppet razor gives node names like node1,node2,node3 after a node is registered.


Is there any way to set user-specific node names to these servers, either before registration or after registration?


The reason being : After provisioning all these 1000 servers - and if one of those servers needed to be re-provisioned later in future - it would be easier to install using its hostname (OS hostname).


Right now - when i run - 'razor nodes'. All i see is a list of node names such as node1,node2,node3 and mac-addresses. If i have to re-install one of those 1000 servers - It would be a round about way to find out the mac-address of that machine and find the nodename of that mac-address to re-install that node.


Also, if i delete few nodes - those node-names will not be reused in future, which leads to node names like node1,node3,node8...


I am able to edit the node metadata - hostname successfully, but i would like to be able to modify the node name to be the same as the node OS hostname.


Is there any easy way to do this? ( other than writing my own wrapper to link the mac-addresses with hostnames and node names in CMDB)


Why is it that - there is no functionality provided to modify the node name? since it would resolve most of the above issues.


This is a major deal breaker for us, and i would love to know - if someone found a solution.

Kevin Sweeney

unread,
Oct 27, 2016, 2:02:03 PM10/27/16
to puppet-razor
My solution has been to treat node names as a razor internal. I've rewritten scripts and other interfaces to use metadata as you did to mask the node name. Those scripts handle mapping, so when searching for a particular node to reinstall, you pass in your metadata (hostname, etc) and it finds the correct node number in the background. The user never knows anything about the razor node, which also solves the gap issue you mention. 

Howard Jones

unread,
Jan 22, 2018, 8:19:24 AM1/22/18
to puppet-razor

On Tuesday, 25 October 2016 22:19:39 UTC+1, worldian wrote:

I am trying to use puppet razor to deploy about 1000 servers, and i realize that puppet razor gives node names like node1,node2,node3 after a node is registered.


Is there any way to set user-specific node names to these servers, either before registration or after registration?


 
Thread-reaping a bit, I am hitting this today too. I'd like to be able to use hostnames or at least serial numbers (which I am collecting from bootstrap.ipxe and stuffing into the metadata) to find nodes.

Even if 'razor nodes' had some sort of search ability, it would be useful - that way I could list all nodes matching metadata, and not have to dig through each one to find the correct one (since the only 'key' columns are the arbitrary node name and the mac_address that I'd like to avoid worrying about). Does this exist? There's no help for 'razor nodes', so I am assuming not, but it'd be nice to be wrong :-)

Reply all
Reply to author
Forward
0 new messages