yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #82697
[Bug 1816543] Re: nova service-delete report ComputeHostNotFound when delete compute service after I delete other nova service on the same compute node
this bug has been fixed, track by
https://bugs.launchpad.net/nova/+bug/1852993
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1816543
Title:
nova service-delete report ComputeHostNotFound when delete compute
service after I delete other nova service on the same compute node
Status in OpenStack Compute (nova):
Fix Released
Bug description:
Description
===========
nova service-delete report ComputeHostNotFound when deleting nova-compute service after I delete other nova service(nova-consoleauth) on the same compute node.
The compute_node should be removed according to the binary of the service to be deleted. When the binary of the service to be deleted is nova-compute, it is appropriate to delete the compute_node.
Steps to reproduce
==================
1) nail1 is an all in one environment,there are nova-compute and nova-consoleauth service on host nail1
2) remove all instances on hypervisor nail1
[root@nail1 ~]# nova service-list
+--------------------------------------+------------------+-----------------+----------+---------+-------+----------------------------+-----------------+-------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason | Forced down |
+--------------------------------------+------------------+-----------------+----------+---------+-------+----------------------------+-----------------+-------------+
| b4ca49a8-c3a9-4fc8-b9a8-f2d662e26060 | nova-conductor | nail1 | internal | enabled | up | 2019-02-19T06:39:49.000000 | - | False |
| e6ae7de7-d8dc-4364-84ed-1845fe967cb6 | nova-scheduler | nail1 | internal | enabled | up | 2019-02-19T06:39:43.000000 | - | False |
| ea3689d5-ace1-4561-acab-369b4e067053 | nova-compute | nail1 | nova | enabled | down | 2019-02-19T06:35:41.000000 | - | False |
| 25da267f-9b7c-4cef-8044-9b26fc2aa18a | nova-compute | nail2 | nova | enabled | up | 2019-02-19T06:39:50.000000 | - | False |
| 90686f1f-6a16-4c97-af9d-bdedb9ebec7d | nova-consoleauth | nail1 | internal | enabled | down | 2019-02-19T06:37:48.000000 | - | False |
+--------------------------------------+------------------+-----------------+----------+---------+-------+----------------------------+-----------------+-------------+
3) delete nova-consoleauth service on nail1
[root@nail1 ~]# nova service-delete 90686f1f-6a16-4c97-af9d-bdedb9ebec7d
4) delete nova-compute service on hypervisor nail1
Actual result
=============
[root@nail1 ~]# nova service-delete ea3689d5-ace1-4561-acab-369b4e067053
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'nova.exception.ComputeHostNotFound'> (HTTP 500) (Request-ID: req-f283de97-7f00-4eae-af77-9155a7b9395d)
Environment
===========
[root@nail1 ~]# rpm -qa|grep openstack-nova-compute
openstack-nova-compute-18.0.2-1.el7.noarch
hypervisor: Libvirt + KVM
The relevant code is as follows:
nova/db/sqlalchemy/api.py
@pick_context_manager_writer
def service_destroy(context, service_id):
service = service_get(context, service_id)
model_query(context, models.Service).\
filter_by(id=service_id).\
soft_delete(synchronize_session=False)
# TODO(sbauza): Remove the service_id filter in a later release
# once we are sure that all compute nodes report the host field
model_query(context, models.ComputeNode).\
filter(or_(models.ComputeNode.service_id == service_id,
models.ComputeNode.host == service['host'])).\
soft_delete(synchronize_session=False)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1816543/+subscriptions
References