Nova incorrectly calculates service version

Bug #1506089 reported by Dan Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Smith

Bug Description

Nova will incorrectly calculate the service version from the database, resulting in improper upgrade decisions like automatic compute rpc version pinning.

For a dump that looks like this:

2015-10-13 23:53:15.824 | created_at updated_at deleted_at id host binary topic report_count disabled deleted disabled_reason last_seen_up forced_down version
2015-10-13 23:53:15.824 | 2015-10-13 23:42:34 2015-10-13 23:50:39 NULL 1 devstack-trusty-hpcloud-b2-5398906 nova-conductor conductor 49 0 0 NULL 2015-10-13 23:50:39 0 2
2015-10-13 23:53:15.824 | 2015-10-13 23:42:34 2015-10-13 23:50:39 NULL 2 devstack-trusty-hpcloud-b2-5398906 nova-cert cert 49 0 0 NULL 2015-10-13 23:50:39 0 2
2015-10-13 23:53:15.824 | 2015-10-13 23:42:34 2015-10-13 23:50:39 NULL 3 devstack-trusty-hpcloud-b2-5398906 nova-scheduler scheduler 49 0 0 NULL 2015-10-13 23:50:39 0 2
2015-10-13 23:53:15.824 | 2015-10-13 23:42:34 2015-10-13 23:50:40 NULL 4 devstack-trusty-hpcloud-b2-5398906 nova-compute compute 49 0 0 NULL 2015-10-13 23:50:40 0 2
2015-10-13 23:53:15.824 | 2015-10-13 23:42:44 2015-10-13 23:50:39 NULL 5 devstack-trusty-hpcloud-b2-5398906 nova-network network 48 0 0 NULL 2015-10-13 23:50:39 0 2

Where all versions are 2, this is displayed in logs that load the compute rpcapi module:

2015-10-13 23:56:05.149 INFO nova.compute.rpcapi [req-d3601f93-73a2-4427-91d0-bb5964002592 None None] Automatically selected compute RPC version 4.0 from minimum service version 0

Which is clearly wrong (service_version minimum should be 2 not 0)

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

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

Changed in nova:
assignee: nobody → Dan Smith (danms)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/234809
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a337a5f1d3c138b4e70d3b273838100f73623eae
Submitter: Jenkins
Branch: master

commit a337a5f1d3c138b4e70d3b273838100f73623eae
Author: Dan Smith <email address hidden>
Date: Wed Oct 14 07:36:53 2015 -0700

    Fix service_version minimum calculation for compute RPC

    The compute rpcapi module incorrectly specified the binary as "compute"
    instead of "nova-compute" when calling get_minimum_version() on the
    Service object class. This resulted in always getting back a zero answer.

    This patch fixes that, adds a warning and an exception if the method
    is called with a binary that doesn't start with "nova-" and corrects
    the tests.

    Change-Id: I265ee1e14335f837eac4c07dc19dcb7ac5d63886
    Closes-Bug: #1506089

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/nova 13.0.0.0b1

This issue was fixed in the openstack/nova 13.0.0.0b1 development milestone.

Changed in nova:
status: Fix Committed → Fix Released
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.