Ask Your Question
0

OS-EXT-SRV-ATTR:hypervisor_hostname and OS-EXT-SRV-ATTR:host difference

asked 2014-10-08 15:04:55 -0500

efwe gravatar image

What is the difference between OS-EXT-SRV-ATTR:hypervisor_hostname and OS-EXT-SRV-ATTR:host in nova rest server answer? Thank you!

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-10-08 20:45:21 -0500

Mark Xie gravatar image

"host" field is associated with service nova-compute. It is get by calling gethostname().

    cfg.StrOpt('host',
           default=socket.gethostname(),
           help='Name of this node.  This can be an opaque identifier.  '
                'It is not necessarily a hostname, FQDN, or IP address. '
                'However, the node name must be valid within '
                'an AMQP key, and if using ZeroMQ, a valid '
                'hostname, FQDN, or IP address'),

"hypervisor_hostname" filed is associated with special hypervisor like libvirt + kvm. In driver "libvirt", it is get by libvirt's call.

    def get_hypervisor_hostname(self):
    """Returns the hostname of the hypervisor."""
    hostname = self._conn.getHostname()
edit flag offensive delete link more
0

answered 2014-10-08 15:26:31 -0500

I am not sure, but I think OS-EXT-SRV-ATTR:host holds the ID value of the host machine, but OS-EXT-SRV-ATTR:hypervisor_hostname holds the hostname of the machine that hypervisor is run on.

edit flag offensive delete link more

Comments

See a part of JSON response:

 "servers": [
    {
        "OS-EXT-SRV-ATTR:host": "dd99797793774612b081a8be19bf721a",
        "OS-EXT-SRV-ATTR:hypervisor_hostname": "fake-mini",
        "OS-EXT-SRV-ATTR:instance_name": "instance-00000001",
        "accessIPv4": "",
Mzoorikh gravatar imageMzoorikh ( 2014-10-08 15:30:04 -0500 )edit

For host id there is a "hostId": "16d193736a5cfdb60c697ca27ad071d6126fa13baeb670fc9d10645e" property.

efwe gravatar imageefwe ( 2014-10-08 22:46:14 -0500 )edit

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: 2014-10-08 15:04:55 -0500

Seen: 1,797 times

Last updated: Oct 08 '14