Custom hostnames for OpenStack nodes

Asked by Rob Neff on 2015-08-13

Is it possible to tell Fuel to assign a PXE booted server a specific hostname based on its PXE nic mac address?

Is there a database or file I can edit to do this?

Right now, it's very difficult to troubleshoot errors with server names like node-29, node-58 that do not correspond to rack location.


Question information

English Edit question
Fuel for OpenStack Edit question
No assignee Edit question
Last query:
Last reply:
Michal Rostecki (mrostecki) said : #1

You can set specific hostname before PXE provisioning. You can do this by command:

fuel node --node-id <node_id> --hostname <new_hostname>

We currently don't support hostname changes after provisioning.

There's also a blueprint aiming to use names provided via UI as hostnames:


Michal Rostecki (mrostecki) said : #2

If you have some not provisioned nodes in which you set names via UI, you can also do:

fuel node | grep ready | while read node; do fuel node --node-id $(awk '{ print $1 }' <<< $node) --hostname $(awk '{ print $5; }' <<< $node); done


Michal Rostecki (mrostecki) said : #3

Sorry, there is a mistake in the snippet above. This should be:

fuel node | grep discover | while read node; do fuel node --node-id $(awk '{ print $1 }' <<< $node) --hostname $(awk '{ print $5; }' <<< $node); done

Can you help with this problem?

Provide an answer of your own, or ask Rob Neff for more information if necessary.

To post a message you must log in.