Cleanups for pci stats in preparation for RT using ComputeNode

Bug #1461362 reported by OpenStack Infra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
Low
Diane Fleming

Bug Description

https://review.openstack.org/161843
commit f1a0d852c8754fca64fbd1c1f331989ee8d9d007
Author: Paul Murray <email address hidden>
Date: Thu Mar 5 18:48:03 2015 +0000

    Cleanups for pci stats in preparation for RT using ComputeNode

    While converting the resource tracker to use the ComputeNode
    object it became apparent that there was a trivial bug in the
    way tags were assigned in PciDevicePool.from_dict() and that
    the format for pci stats in the examples is wrong.

    The bug was that a dict was assigned to the tags field and then
    items were added to it as follows:

    pool.tags = {}
    pool.tags.update(pool_dict)

    The setter for objects is over ridden to perform type checking
    and coercion for fields. In the above case the tags field is
    a dict of strings, so the coercion converts all values in
    the dict to be strings (if it can). In the above snippet
    the values of pool_dict are not type checked or coerced because
    they are added directly to the dict. The correct way to do this
    is (it just so happens that pool_dict again here):

    pool.tags = pool_dict

    The format of the pci stats does not include an extra_info
    field as was originally planned by the author. Instead tags
    that would have been in extra_info are included as additional
    fields. The phys_function tag was intended to have particular
    meaning but has now been dropped.

    The api samples and related tests for hypervisors-pci-detail-resp
    and hypervisors-pci-show-resp do include extra_info, so the
    samples and tests are incorrect. This patch corrects them.

    The change in the samples is not an API change, only
    a correction, so there is no change to the API version. However,
    the api samples are included in documentation so this patch is
    marked with with a document impact.

    DocImpact

    Change-Id: I8730f18d660777e23637b4846e06af1c3e14238e

Tags: nova
affects: openstack-manuals → openstack-api-site
Changed in openstack-api-site:
status: New → In Progress
assignee: nobody → Diane Fleming (diane-fleming)
importance: Undecided → Low
milestone: none → liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to api-site (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to api-site (master)

Reviewed: https://review.openstack.org/189163
Committed: https://git.openstack.org/cgit/openstack/api-site/commit/?id=1f24e25eeb0b98c41ba083b42ac426203a5677ce
Submitter: Jenkins
Branch: master

commit 1f24e25eeb0b98c41ba083b42ac426203a5677ce
Author: Diane Fleming <email address hidden>
Date: Sun Jun 7 17:26:37 2015 -0500

    Cleanups for pci stats in preparation for RT using ComputeNode

    Add missing os-pci extension
    Update os-hypervisor extension with pci calls

    Change-Id: I41cc180dcd05828bd31f84ddb374781445f53dde
    Closes-Bug: #1461362

Changed in openstack-api-site:
status: In Progress → 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.