masakari-engine recovery looking for URL endpoint for service_name='Compute Service' instead of 'nova'

Bug #1746229 reported by Greg Waines
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
masakari
Fix Released
Undecided
Dinesh Bhor

Bug Description

I created an AIO devstack with Masakari on current / master on Jan 26 / 2018.
Built & installed python-masakariclient
Built and installed masakarimonitors.

started the 'masakari-instancemonitor'

# CONFIGURED MASAKARI SEGMENT AND HOST
cd ~/devstack
source openrc admin demo
masakari segment-create --name segment-1 --recovery-method auto --service-type COMPUTE
masakari host-create --name devstack-masakari-louie --type COMPUTE --control-attributes SSH --segment-id segment-1

# LAUNCHED A VM
cd ~/devstack
source openrc admin demo
FLAVOR1=`nova flavor-list | awk '{if ($4 == "m1.tiny") print $2; }'`
PRIVATENETID=`neutron net-list | grep private | awk '{print $2}'`
nova boot --flavor ${FLAVOR1} --nic net-id=${PRIVATENETID} --image cirros-0.3.5-x86_64-disk --meta HA_Enabled=True vm-1-cirros

# KILLED THE VM
ps -ef | fgrep qemu
sudo kill -9 <PID>

# RECEIVED instancemonitor's NOTIFICATION to masakari-engine
stack@devstack-masakari-louie:~/devstack$ masakari notification-list
+--------------------------------------+----------------------------+---------+--------------------------------------+------+
| notification_uuid | generated_time | status | source_host_uuid | type |
+--------------------------------------+----------------------------+---------+--------------------------------------+------+
| b8c6c561-7a93-40a2-8d73-3783024865b4 | 2018-01-26T19:41:29.000000 | running | 51bc8b8b-324f-499a-9166-38c22b3842cd | VM |
+--------------------------------------+----------------------------+---------+--------------------------------------+------+
stack@devstack-masakari-louie:~/devstack$

However I get the following error in masakari-engine, when the masakari-engine attempts to do the VM Recovery

Jan 26 19:41:28 devstack-masakari-louie masakari-engine[11795]: 2018-01-26 19:41:28.968 TRACE masakari.engine.drivers.taskflow.driver EndpointNotFound: publicURL endpoint for compute service named Compute Service not found

Why is masakari-engine looking for a publicURL endpoint for service_type=’compute’ and service_name=’Compute Service’ ?
See below that the Service Name = ‘nova’ ... NOT ‘Compute Service’

stack@devstack-masakari-louie:~/devstack$ openstack endpoint list
+----------------------------------+-----------+--------------+----------------+---------+-----------+----------------------------------------------+
| ID | Region | Service Name | Service Type | Enabled | Interface | URL |
+----------------------------------+-----------+--------------+----------------+---------+-----------+----------------------------------------------+
| 0111643ef1584decb523524a3db5ce18 | RegionOne | nova_legacy | compute_legacy | True | public | http://10.10.10.14/compute/v2/$(project_id)s |
| 01790448c22f49e69774adf290fba728 | RegionOne | gnocchi | metric | True | internal | http://10.10.10.14/metric |
| 0b31693c6650499a981d580721be9e48 | RegionOne | vitrage | rca | True | internal | http://10.10.10.14:8999 |
| 40f66ed61b4e4310829aa69e11c75554 | RegionOne | neutron | network | True | public | http://10.10.10.14:9696/ |
| 47479cf64af944b996b1fbca42efd945 | RegionOne | nova | compute | True | public | http://10.10.10.14/compute/v2.1 |
| 49dccfc61e8246a2a2c0b8d12b3db91a | RegionOne | vitrage | rca | True | admin | http://10.10.10.14:8999 |
| 5261ba0327de4c2d92842147636ee770 | RegionOne | masakari | ha | True | internal | http://10.10.10.14:15868/v1/$(tenant_id)s |
| 5df28622c6f449ebad12d9b62110cd08 | RegionOne | gnocchi | metric | True | admin | http://10.10.10.14/metric |
| 64f8f401431042a0ab1d053ca4f4df02 | RegionOne | glance | image | True | public | http://10.10.10.14/image |
| 69ad6b9d0b0b4d0a8da6fa36af8289cb | RegionOne | masakari | ha | True | public | http://10.10.10.14:15868/v1/$(tenant_id)s |
| 7dd9d5396e9c49d4a41e2865b841f6a0 | RegionOne | masakari | ha | True | admin | http://10.10.10.14:15868/v1/$(tenant_id)s |
| 811fa7f4b3c14612b4aca354dc8ea77e | RegionOne | vitrage | rca | True | public | http://10.10.10.14:8999 |
| 8535da724c424363bffe1d033ee033e5 | RegionOne | cinder | volume | True | public | http://10.10.10.14/volume/v1/$(project_id)s |
| 853f1783f1014075a03c16f7c3a2568a | RegionOne | keystone | identity | True | admin | http://10.10.10.14/identity |
| 9450f5611ca747f2a049f22ff0996dba | RegionOne | cinderv3 | volumev3 | True | public | http://10.10.10.14/volume/v3/$(project_id)s |
| 9a73696d88a9438cb0ab75a754a08e9d | RegionOne | gnocchi | metric | True | public | http://10.10.10.14/metric |
| b1ff2b4d683c4a58a3b27232699d0058 | RegionOne | cinderv2 | volumev2 | True | public | http://10.10.10.14/volume/v2/$(project_id)s |
| d4e66240faff48f2b5e1d0fcfb73a74b | RegionOne | placement | placement | True | public | http://10.10.10.14/placement |
| fda917fd368a4a479c9c186df1beb8e9 | RegionOne | keystone | identity | True | public | http://10.10.10.14/identity |
+----------------------------------+-----------+--------------+----------------+---------+-----------+----------------------------------------------+
stack@devstack-masakari-louie:~/devstack$

Louie Kwan (lkwan)
Changed in masakari:
assignee: nobody → Louie Kwan (lkwan)
Revision history for this message
Tushar Patil (tpatil) wrote :

If you change the config option "nova_catalog_admin_info" from default "compute:Compute Service:publicURL" to "compute:nova:publicURL" and then restart masakari-engine service, it works as expected.

The default service name set in config option "nova_catalog_admin_info" is "Compute Service" which should be set to "nova". This change is required in masakari to resolve this issue.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to masakari (master)

Fix proposed to branch: master
Review: https://review.openstack.org/546493

Changed in masakari:
assignee: Louie Kwan (lkwan) → Dinesh Bhor (dinesh-bhor)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to masakari (master)

Reviewed: https://review.openstack.org/546493
Committed: https://git.openstack.org/cgit/openstack/masakari/commit/?id=d6483b92821f645379bea7d8e1524f4345e510ab
Submitter: Zuul
Branch: master

commit d6483b92821f645379bea7d8e1524f4345e510ab
Author: dineshbhor <email address hidden>
Date: Wed Feb 21 12:00:16 2018 +0900

    Fix default value of 'nova_catalog_admin_info'

    Devstack deploys nova service with name as 'nova' but in
    masakari.conf 'nova_catalog_admin_info' default is
    'compute:Compute Service:publicURL' which causes below error
    while executing masakari notifications:

    EndpointNotFound: publicURL endpoint for compute service named
    Compute Service not found.

    This patch fixes this issue by changing the default value of config
    option 'nova_catalog_admin_info' to 'compute:nova:publicURL'.

    NOTE:
    In real production deployment of masakari operator has to set the
    value of this config option according to the nova service name that
    he/she configures.

    Closes-Bug: #1746229
    Change-Id: I032d85e7e11836a282251885a7f9d4bc76ce7045

Changed in masakari:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/masakari 5.0.0

This issue was fixed in the openstack/masakari 5.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.