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

OpenStack Infra 1839715 at bugs.launchpad.net
Tue Apr 27 06:54:05 UTC 2021


Reviewed:  https://review.opendev.org/c/openstack/masakari/+/787899
Committed: https://opendev.org/openstack/masakari/commit/35519c0ce02092aaef6b802817b74d017a84b08b
Submitter: "Zuul (22348)"
Branch:    stable/ussuri

commit 35519c0ce02092aaef6b802817b74d017a84b08b
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
    (cherry picked from commit 4322968b893b242f229912c2b70e3895f0227402)


** Changed in: masakari/ussuri
       Status: In Progress => Fix Committed

** Changed in: masakari/train
       Status: In Progress => Fix Committed

-- 
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 stein series:
  Won't Fix
Status in masakari train series:
  Fix Committed
Status in masakari ussuri series:
  Fix Committed
Status in masakari victoria series:
  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