[Statistics] Data can be wrongly exported as removed to csv if cluster id and resource id is the same for resource

Bug #1426279 reported by Andrey Sledzinskiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Alexander Kislitsky

Bug Description

{

    "build_id": "2015-02-25_15-02-21",
    "ostf_sha": "1a0b2c6618fac098473c2ed5a9af11d3a886a3bb",
    "build_number": "349",
    "release_versions":

{

    "2014.2-6.1":

{

    "VERSION":

{

    "build_id": "2015-02-25_15-02-21",
    "ostf_sha": "1a0b2c6618fac098473c2ed5a9af11d3a886a3bb",
    "build_number": "349",
    "api": "1.0",
    "nailgun_sha": "5b26d49dda10dde00aa0527278e74a9bf85ea4cd",
    "production": "docker",
    "python-fuelclient_sha": "5657dbf06fddb74adb61e9668eb579a1c57d8af8",
    "astute_sha": "6d6ad68e0cde286d74ac7d52e21da4fc8dcbe9ab",
    "feature_groups":

            [
                "mirantis"
            ],
            "release": "6.1",
            "fuelmain_sha": "87223c15bb734bb668050850a6b43aa4291349b7",
            "fuellib_sha": "8384b8ca4db84794fb21e287202f05e31f78841c"
        }
    }

},
"auth_required": true,
"api": "1.0",
"nailgun_sha": "5b26d49dda10dde00aa0527278e74a9bf85ea4cd",
"production": "docker",
"python-fuelclient_sha": "5657dbf06fddb74adb61e9668eb579a1c57d8af8",
"astute_sha": "6d6ad68e0cde286d74ac7d52e21da4fc8dcbe9ab",
"feature_groups":

    [
        "mirantis"
    ],
    "release": "6.1",
    "fuelmain_sha": "87223c15bb734bb668050850a6b43aa4291349b7",
    "fuellib_sha": "8384b8ca4db84794fb21e287202f05e31f78841c"

}

Steps:
1. Deploy any cluster, create flavor, send flavor data to collector
2. Reset cluster, re-deploy cluster, create another one flavor and send data to collector
3. Export flavors to csv report

Actual - pre-defined flavors of re-deployed cluster are wrongly marked as removed. It probably happens because they have the same id(1,2,3,4,5) and cluster_id as pre-defined flavors of reset cluster so that's why they were exported as removed.

This problem can only occur for pre-defined resources like typical flavors that have the same id for every cluster

Tags: statistics
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

Changed in fuel:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/159823
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=44c0e95b94e2985a236e59b26be15fac41be1bad
Submitter: Jenkins
Branch: master

commit 44c0e95b94e2985a236e59b26be15fac41be1bad
Author: Alexander Kislitsky <email address hidden>
Date: Fri Feb 27 15:31:31 2015 +0300

    Fix for pre-defined workloads stats status

    Pre-defined OpenStack workloads resources (flavors) mark as removed
    on cluster reset. As result we have duplication of resources in
    'current' and 'removed'.

    Closes-Bug: #1426279
    Change-Id: I1fcd8dbdc9243b141631df696b9595873e7dc4ab

Changed in fuel:
status: In Progress → Fix Committed
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.