Fix the incorrect PciDeviceList version number

The following commit missed to bump the related list when bumping the
object version.

    commit 1d4ad44f15
    Author: Przemyslaw Czesnowicz <przemyslaw.czesnowicz@intel.com>
    Date:   Thu Nov 20 12:04:05 2014 +0000

        Add numa_node to PCIDevice

        The change extends the PCI device model and its DB representation.
        Query libvirt for the PCI devices numa node.

This patch adds the necessary changes to master. We only bump the
PciDeviceList version, and add a backporting rule to obj_relationship
dictionary of the Instance object, to start sending the new version with
1.20 version of the instance (we are currently on 1.21).

Landing this patch fixes versioning going forward, and all interactions
that request the PciDeviceList through the Instance object, however
applying the stable/kilo backport of this is required for Kilo nodes to
start requesting the latest version of PciDevice through PciDeviceList.

We can't send 1.2 PciDeviceList to Kilo nodes yet because of
related-bug 1475254 , so we have to backport this to Kilo first before
we can start sending the 1.2 to Kilo nodes.

Related-bug: #1474074
Change-Id: Id743848061d2bcd64d785979c7a11ee7c945f06b
This commit is contained in:
Nikola Dipanov 2015-07-14 16:25:15 +01:00 committed by Dan Smith
parent 0e5cefcf1d
commit 80c109f85a
3 changed files with 13 additions and 5 deletions

View File

@ -117,7 +117,8 @@ class Instance(base.NovaPersistentObject, base.NovaObject,
# Version 1.15: PciDeviceList 1.1
# Version 1.16: Added pci_requests
# Version 1.17: Added tags
# Version 1.18: Added flavor, old_flavor, new_flavor
# Version 1.18: Added flavor, old_flavor, new_flavor, will use
# PciDeviceList version 1.2
# Version 1.19: Added vcpu_model
# Version 1.20: Added ec2_ids
# Version 1.21: TagList 1.1
@ -225,7 +226,13 @@ class Instance(base.NovaPersistentObject, base.NovaObject,
'fault': [('1.0', '1.0'), ('1.13', '1.2')],
'info_cache': [('1.1', '1.0'), ('1.9', '1.4'), ('1.10', '1.5')],
'security_groups': [('1.2', '1.0')],
'pci_devices': [('1.6', '1.0'), ('1.15', '1.1')],
'pci_devices': [('1.6', '1.0'), ('1.15', '1.1'),
# FIXME(ndipanov): Currently we don't want to send 1.2
# to Kilo nodes - they can't handle it and will fail
# due to
# https://bugs.launchpad.net/nova/+bug/1474074
# Kilo Instance is at 1.19
('1.20', '1.2')],
'numa_topology': [('1.14', '1.0'), ('1.16', '1.1')],
'pci_requests': [('1.16', '1.1')],
'tags': [('1.17', '1.0'), ('1.21', '1.1')],

View File

@ -206,7 +206,8 @@ class PciDeviceList(base.ObjectListBase, base.NovaObject):
# Version 1.0: Initial version
# PciDevice <= 1.1
# Version 1.1: PciDevice 1.2
VERSION = '1.1'
# Version 1.2: PciDevice 1.3
VERSION = '1.2'
fields = {
'objects': fields.ListOfObjectsField('PciDevice'),

View File

@ -1113,7 +1113,7 @@ object_data = {
'NetworkRequest': '1.1-7a3e4ca2ce1e7b62d8400488f2f2b756',
'NetworkRequestList': '1.1-ea2a8e1c1ecf3608af2956e657adeb4c',
'PciDevice': '1.3-4d43db45e3978fca4280f696633c7c20',
'PciDeviceList': '1.1-2b8b6d0cf622c58543c5dec50c7e877c',
'PciDeviceList': '1.2-2b8b6d0cf622c58543c5dec50c7e877c',
'PciDevicePool': '1.1-3f5ddc3ff7bfa14da7f6c7e9904cc000',
'PciDevicePoolList': '1.1-ea2a8e1c1ecf3608af2956e657adeb4c',
'Quotas': '1.2-1fe4cd50593aaf5d36a6dc5ab3f98fb3',
@ -1158,7 +1158,7 @@ object_relationships = {
'Instance': {'InstanceFault': '1.2',
'InstanceInfoCache': '1.5',
'InstanceNUMATopology': '1.1',
'PciDeviceList': '1.1',
'PciDeviceList': '1.2',
'TagList': '1.1',
'SecurityGroupList': '1.0',
'Flavor': '1.1',