Ask Your Question
0

Instance Template Name not reflection on the instance hostname

asked 2011-06-09 23:02:35 -0500

it-tech gravatar image

Hi all, we configured a custom instance_name_template like this "--instance_name_template=DC4-%08x-controller1" as a FLAG on the nova.conf file on the controller node and the computes nodes (multinode config). The hostname gets setted ok on the KVM , if you do a "virsh list" you see it as we spected, BUT, the hostname inside the VM, is like i-0000060 , same as seen on euca-describe-instances.

So, we were wondering if this is a normal behavior, or if is there a way to pass this value to get into the instance ? ( via injection or metadata )

Regards

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2011-06-09 23:33:32 -0500

vishvananda gravatar image

The hostname for an instance is generated by a method called hostname_factory in compute_api. This is a method that accepts an integer id for an instance and returns a string. By default in the ec2_api it uses ec2_utils.id_to_ec2_id to make the conversion. If you want the hostname to be different, you can define a new method and pass it in when compute API is constructed.

Vish

On Jun 9, 2011, at 4:05 PM, Melicloud wrote:

New question #160910 on OpenStack Compute (nova): https://answers.launchpad.net/nova/+q...

Hi all, we configured a custom instance_name_template like this "--instance_name_template=DC4-%08x-controller1" as a FLAG on the nova.conf file on the controller node and the computes nodes (multinode config). The hostname gets setted ok on the KVM , if you do a "virsh list" you see it as we spected, BUT, the hostname inside the VM, is like i-0000060 , same as seen on euca-describe-instances.

So, we were wondering if this is a normal behavior, or if is there a way to pass this value to get into the instance ? ( via injection or metadata )

Regards


You received this question notification because you are a member of Nova Core, which is an answer contact for OpenStack Compute (nova).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-06-09 23:02:35 -0500

Seen: 10,107 times

Last updated: Jun 09 '11