[Bug 1839715] Re: masakari fails if hypervisor name does not match nova service name

OpenStack Infra 1839715 at bugs.launchpad.net
Wed Sep 23 09:08:17 UTC 2020


Reviewed:  https://review.opendev.org/728629
Committed: https://git.openstack.org/cgit/openstack/masakari/commit/?id=4322968b893b242f229912c2b70e3895f0227402
Submitter: Zuul
Branch:    master

commit 4322968b893b242f229912c2b70e3895f0227402
Author: Dmitriy Rabotyagov <drabotyagov at vexxhost.com>
Date:   Sat May 16 12:22:13 2020 +0300

    Search in nova services instead of hypervisors
    
    Nova services and hypervisor naming can differ, as they retireve node
    names in different way.
    In the meanwhile we operate with nova.services while enabling/disabling
    nodes duringh the incident. So we're supposed to have in database record
    matching to what we have in service list, but not in hypervisor list.
    
    Closes-Bug: #1839715
    Change-Id: I9c591d33f17a8d5950bdb1fc2d686e2301fc6d95


** Changed in: masakari
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to masakari in Ubuntu.
https://bugs.launchpad.net/bugs/1839715

Title:
  masakari fails if hypervisor name does not match nova service name

Status in masakari:
  Fix Released
Status in masakari package in Ubuntu:
  Fix Released
Status in masakari source package in Eoan:
  Won't Fix
Status in masakari source package in Focal:
  Fix Released

Bug description:
  When adding a host to a segment masakari validates the provided
  hostname is a valid hypervisor name *1. But when masakari is mapping
  nova services *2 and servers *3 it uses the host attribute which may
  not necessarily match. It is common for the hypervisor entry to be a
  fqdn but service entry to be a bare hostname. In this situation both
  service and servers lookup fail and throw an IndexError.

  
  $ openstack hypervisor list -c ID -c "Hypervisor Hostname"
  +----+------------------------------------------------------+
  | ID | Hypervisor Hostname                                  |
  +----+------------------------------------------------------+
  |  1 | juju-f4bd71-zaza-9db566d782a2-18.project.serverstack |
  |  2 | juju-f4bd71-zaza-9db566d782a2-16.project.serverstack |
  |  3 | juju-f4bd71-zaza-9db566d782a2-17.project.serverstack |
  +----+------------------------------------------------------+

  $ openstack compute service list -c ID -c Binary -c Host
  +----+----------------+----------------------------------+
  | ID | Binary         | Host                             |
  +----+----------------+----------------------------------+
  |  1 | nova-conductor | juju-f4bd71-zaza-9db566d782a2-15 |
  |  2 | nova-scheduler | juju-f4bd71-zaza-9db566d782a2-15 |
  |  4 | nova-compute   | juju-f4bd71-zaza-9db566d782a2-18 |
  |  5 | nova-compute   | juju-f4bd71-zaza-9db566d782a2-16 |
  |  6 | nova-compute   | juju-f4bd71-zaza-9db566d782a2-17 |
  +----+----------------+----------------------------------+

  $ openstack server show 65419346-6509-4c73-b8f4-22c5aa7f0d77 -c 'OS-EXT-SRV-ATTR:host'
  +----------------------+----------------------------------+
  | Field                | Value                            |
  +----------------------+----------------------------------+
  | OS-EXT-SRV-ATTR:host | juju-f4bd71-zaza-9db566d782a2-18 |
  +----------------------+----------------------------------+

  
  *1 https://github.com/openstack/masakari/blob/master/masakari/compute/nova.py#L248
  *2 https://github.com/openstack/masakari/blob/master/masakari/compute/nova.py#L147
  *3 https://github.com/openstack/masakari/blob/master/masakari/compute/nova.py#L154

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



More information about the Ubuntu-openstack-bugs mailing list