Setting hypervisor_hostname for compute node

asked 2014-12-23 13:09:02 -0600

musufu gravatar image

updated 2014-12-24 10:13:06 -0600

I am trying to build a simple Juno setup. With a single controller and a single compute node.

I have hosts entries for os_controller and os_compute1. However in reality, these machines have different hostnames; as testmachine1 and testmachine2. All of my setup works correctly except for hypervisor_hostname field; this fields somehow manages to get the hostname of the compute node, instead of the name I gave it in nova.conf.

Service list is OK;

$ nova service-list
+----+------------------+---------------+----------+---------+-----+----------------------------+
| Id | Binary           | Host          | Zone     | Status  |State| Updated_at                 |
+----+------------------+---------------+----------+---------+-----+----------------------------+
| 7  | nova-conductor   | os_controller | internal | enabled | up  | 2014-12-23T18:56:18.343676 |
| 8  | nova-scheduler   | os_controller | internal | enabled | up  | 2014-12-23T18:56:23.133151 |
| 9  | nova-consoleauth | os_controller | internal | enabled | up  | 2014-12-23T18:56:19.313647 |
| 10 | nova-cert        | os_controller | internal | enabled | up  | 2014-12-23T18:56:27.916682 |
| 11 | nova-compute     | os_compute1   | nova     | enabled | up  | 2014-12-23T18:56:18.331502 |
+----+------------------+---------------+----------+---------+-----+----------------------------+

Hypervisor list is not OK;

$ nova hypervisor-list
+----+---------------------+
| ID | Hypervisor hostname |
+----+---------------------+
| 2  | testmachine2        |
+----+---------------------+

/etc/hosts entries

10.0.20.1    os_controller    testmachine1
10.0.20.10  os_compute1   testmachine2

I don't want to edit the machine hostname for it. Isn't there a way that to force this hypervisor_hostname to be same with the name I define in nova.conf ?

edit retag flag offensive close merge delete

Comments

What is the output of "hostname" in compute node ?

Bipin gravatar imageBipin ( 2014-12-23 22:53:11 -0600 )edit

it's "testmachine2", and I don't want to change that if possible. In the nova.conf, I've set "host = os_compute1", and was expecting that to be used as hypervisor_hostname.

musufu gravatar imagemusufu ( 2014-12-24 05:21:43 -0600 )edit

As per the documentation, its clearly mentioned that you need to put the hostname which you are going to communicate in the /etc/hosts file of each and every node. Can you try that as a trial and error mode?

Bipin gravatar imageBipin ( 2014-12-24 06:39:03 -0600 )edit

editing answer with hosts file entires that I currently have.

musufu gravatar imagemusufu ( 2014-12-24 10:11:25 -0600 )edit