binary/name gets confused under upgrades of osapi_compute and metadata when using wsgi files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Ebbex | ||
Pike |
Fix Committed
|
High
|
Ebbex |
Bug Description
Before an upgrade, we have these type of entries in the db.
MariaDB [nova]> SELECT id, host, `binary`, deleted, version FROM services;
+----+-
| id | host | binary | deleted | version |
+----+-
| 5 | r1-n-os-api | nova-osapi_compute | 0 | 16 |
| 21 | r1-n-m-api | nova-metadata | 0 | 16 |
The wsgi files we run basically boil down to something like
NAME=metadata
return wsgi_app.
In the wsgi_app.py we see this function
service_ref = objects.
Which results in a really big query, which again comes down to
SELECT host, `binary` FROM services
WHERE host = 'r1-n-m-api' AND `binary` == 'metadata'
No results. service_ref is set to None. Carry on.
if service_ref:
#Nope.
else:
try:
...
service_
service_
service_
Which results in a INSERT statement something like this;
INSERT INTO services(host, `binary`, report_count, disabled, deleted, version)
VALUES ('r1-n-m-api', 'nova-metadata', 0, 0, 0, 22)
ERROR 1062 (23000): Duplicate entry 'r1-n-m-
Changed in nova: | |
assignee: | nobody → Ebbex (eb4x) |
status: | New → In Progress |
Changed in nova: | |
status: | Incomplete → Confirmed |
Changed in nova: | |
status: | Confirmed → In Progress |
description: | updated |
summary: |
- binary name gets confused under upgrades of osapi_compute and metadata + binary/name gets confused under upgrades of osapi_compute and metadata + when using wsgi files |
What sequence of events got you here? Is this changing the deployment type post upgrade as well? It would be good to fully qualify what failed here, and why we didn't catch it, and if we need to put something into nova-manage to help.