Don't delete compute node when deleting service other than nova-compute
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Compute (nova) |
Medium
|
Pavel Gluschak | ||
| Rocky |
Medium
|
Sylvain Bauza | ||
| Stein |
Medium
|
Sylvain Bauza | ||
| Train |
Medium
|
Sylvain Bauza |
Bug Description
When upgrading to Stein, nova-consoleauth service is deprecated and should be removed. However if nova-consoleauth service is located on the same host with nova-compute, matching row in compute_nodes table is soft-deleted as well, making nova-compute service report in log, that stale resource provider exists in placement:
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
2019-11-18 16:03:20.069 7 ERROR nova.compute.
Steps to reproduce
==================
# nova service-list
+------
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason | Forced down |
+------
| 57885a23-
| 0b08d3ea-
| 7d7f3dc6-
| 367a4591-
+------
nova=# select uuid,deleted_at from compute_nodes;
-------
13c1fbd5-
# nova service-delete 7d7f3dc6-
nova=# select uuid,deleted_at from compute_nodes;
-------
13c1fbd5-
Expected result
===============
compute_node is not deleted from db if nova-consoleauth service is removed
Actual result
=============
compute_node is deleted from db if nova-consoleauth service is removed
Environment
===========
Queens, Stein
Changed in nova: | |
assignee: | nobody → Pavel Gluschak (scsnow) |
description: | updated |
Changed in nova: | |
status: | New → In Progress |
description: | updated |
description: | updated |
Matt Riedemann (mriedem) wrote : | #2 |
Deleting a nova-consoleauth service shouldn't have anything to do with deleting compute_nodes records, only deleting nova-compute services, but I guess this doesn't filter on the service binary being nova-compute:
However, a nova-consoleauth service id shouldn't be mapped to a compute node record, but that's probably where the OR is breaking things - the service_id is likely NULL and the host is the same.
Changed in nova: | |
importance: | Undecided → Medium |
tags: | added: db |
Sylvain Bauza (sylvain-bauza) wrote : | #3 |
Yeah, this is weird. We only delete the compute_nodes record if the related service ID is the same.
So, that would mean that two services (nova-compute *and* nova-consoleauth) would have the same service ID...
That said, I'm OK with the change just in case the above.
Sylvain Bauza (sylvain-bauza) wrote : | #4 |
Oh, Matt is right, we use a OR condition, my bad.
In this case, we go looking at whether the service host is the same. In the case of nova-consoleauth, this is the same, hence the bug. Grrr, my bad.
Fix proposed to branch: stable/train
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit cff9ecb20870daa
Author: Pavel Glushchak <email address hidden>
Date: Mon Nov 18 14:53:42 2019 +0300
Don't delete compute node, when deleting service other than nova-compute
We should not try to delete compute node from compute_nodes table,
when destroying service other than nova-compute.
Change-Id: If5b5945e699ec2
Closes-Bug: #1852993
Signed-off-by: Pavel Glushchak <email address hidden>
Changed in nova: | |
status: | In Progress → Fix Released |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 716cde5454a5cd5
Author: Pavel Glushchak <email address hidden>
Date: Mon Nov 18 14:53:42 2019 +0300
Don't delete compute node, when deleting service other than nova-compute
We should not try to delete compute node from compute_nodes table,
when destroying service other than nova-compute.
Change-Id: If5b5945e699ec2
Closes-Bug: #1852993
Signed-off-by: Pavel Glushchak <email address hidden>
(cherry picked from commit cff9ecb20870daa
Fix proposed to branch: stable/stein
Review: https:/
Fix proposed to branch: stable/rocky
Review: https:/
Fix proposed to branch: stable/queens
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit e00fa24a18909d5
Author: Pavel Glushchak <email address hidden>
Date: Mon Nov 18 14:53:42 2019 +0300
Don't delete compute node, when deleting service other than nova-compute
We should not try to delete compute node from compute_nodes table,
when destroying service other than nova-compute.
Change-Id: If5b5945e699ec2
Closes-Bug: #1852993
Signed-off-by: Pavel Glushchak <email address hidden>
(cherry picked from commit cff9ecb20870daa
(cherry picked from commit 716cde5454a5cd5
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit af668d395dd93f6
Author: Pavel Glushchak <email address hidden>
Date: Mon Nov 18 14:53:42 2019 +0300
Don't delete compute node, when deleting service other than nova-compute
We should not try to delete compute node from compute_nodes table,
when destroying service other than nova-compute.
Change-Id: If5b5945e699ec2
Closes-Bug: #1852993
Signed-off-by: Pavel Glushchak <email address hidden>
(cherry picked from commit cff9ecb20870daa
(cherry picked from commit 716cde5454a5cd5
(cherry picked from commit e00fa24a18909d5
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 4e9f85205697dfc
Author: Pavel Glushchak <email address hidden>
Date: Mon Nov 18 14:53:42 2019 +0300
Don't delete compute node, when deleting service other than nova-compute
We should not try to delete compute node from compute_nodes table,
when destroying service other than nova-compute.
Change-Id: If5b5945e699ec2
Closes-Bug: #1852993
Signed-off-by: Pavel Glushchak <email address hidden>
(cherry picked from commit cff9ecb20870daa
(cherry picked from commit 716cde5454a5cd5
(cherry picked from commit e00fa24a18909d5
(cherry picked from commit af668d395dd93f6
tags: | added: in-stable-queens |
This issue was fixed in the openstack/nova 20.1.0 release.
This issue was fixed in the openstack/nova 19.1.0 release.
This issue was fixed in the openstack/nova 18.3.0 release.
Fix proposed to branch: master /review. opendev. org/694756
Review: https:/