← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1360139] [NEW] Live migration hosts dropbox should contain service host

 

Public bug reported:

To populate the available hosts in the live migration form, horizon use
hypervisor hostname else nova api want the service host, which is not
the same thing.


openstack_dashboard/dashboards/admin/instances/forms.py:
   def populate_host_choices(self, request, initial):
        hosts = initial.get('hosts')
        current_host = initial.get('current_host')
        host_list = [(host.hypervisor_hostname,
                      host.hypervisor_hostname)
                     for host in hosts
                     if host.service['host'] != current_host]
        ...

More details:
==========

When using libvirt, this later when asked about hostname i.e. "$ virsh
hostname", it will always return a fqdn
(https://github.com/c4milo/libvirt/blob/0eac9d1e90fc3388030c6109aeb1f4860f108054/src/libvirt.c#L1610),
which is what nova will set as hypervisor_hostname
(https://github.com/openstack/nova/blob/f0a43555b79fe3161933bc01d6bb79f1e622bec2/nova/virt/libvirt/driver.py#L4008)
in the NovaCompute table
(https://github.com/openstack/nova/blob/f0a43555b79fe3161933bc01d6bb79f1e622bec2/nova/db/sqlalchemy/models.py#L97).

In the other hand the service (nova-manage service list) will return the host as the hostname of the compute node i.e. "$ hostname
" (https://github.com/openstack/nova/blob/f0a43555b79fe3161933bc01d6bb79f1e622bec2/nova/db/sqlalchemy/models.py#L67).

In platform that make a difference between hostname and fqdn i.e. a call
to "$ hostname" and "$ hostname -f" return different things, both fields
service.host != compute_node. hypervisor_hostname will be different.

As for Nova API, this later accept the service.host, at least that how
it validate the destination host passed
(https://github.com/openstack/nova/blob/f0a43555b79fe3161933bc01d6bb79f1e622bec2/nova/conductor/tasks/live_migrate.py#L85
https://github.com/openstack/nova/blob/f0a43555b79fe3161933bc01d6bb79f1e622bec2/nova/db/sqlalchemy/api.py#L488)

** Affects: horizon
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1360139

Title:
  Live migration hosts dropbox should contain service host

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  To populate the available hosts in the live migration form, horizon
  use hypervisor hostname else nova api want the service host, which is
  not the same thing.

  
  openstack_dashboard/dashboards/admin/instances/forms.py:
     def populate_host_choices(self, request, initial):
          hosts = initial.get('hosts')
          current_host = initial.get('current_host')
          host_list = [(host.hypervisor_hostname,
                        host.hypervisor_hostname)
                       for host in hosts
                       if host.service['host'] != current_host]
          ...

  More details:
  ==========

  When using libvirt, this later when asked about hostname i.e. "$ virsh
  hostname", it will always return a fqdn
  (https://github.com/c4milo/libvirt/blob/0eac9d1e90fc3388030c6109aeb1f4860f108054/src/libvirt.c#L1610),
  which is what nova will set as hypervisor_hostname
  (https://github.com/openstack/nova/blob/f0a43555b79fe3161933bc01d6bb79f1e622bec2/nova/virt/libvirt/driver.py#L4008)
  in the NovaCompute table
  (https://github.com/openstack/nova/blob/f0a43555b79fe3161933bc01d6bb79f1e622bec2/nova/db/sqlalchemy/models.py#L97).

  In the other hand the service (nova-manage service list) will return the host as the hostname of the compute node i.e. "$ hostname
  " (https://github.com/openstack/nova/blob/f0a43555b79fe3161933bc01d6bb79f1e622bec2/nova/db/sqlalchemy/models.py#L67).

  In platform that make a difference between hostname and fqdn i.e. a
  call to "$ hostname" and "$ hostname -f" return different things, both
  fields service.host != compute_node. hypervisor_hostname will be
  different.

  As for Nova API, this later accept the service.host, at least that how
  it validate the destination host passed
  (https://github.com/openstack/nova/blob/f0a43555b79fe3161933bc01d6bb79f1e622bec2/nova/conductor/tasks/live_migrate.py#L85
  https://github.com/openstack/nova/blob/f0a43555b79fe3161933bc01d6bb79f1e622bec2/nova/db/sqlalchemy/api.py#L488)

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1360139/+subscriptions


Follow ups

References