use map instead of list for reporting cpu/mem usage in NodeStatus UVE

Bug #1601909 reported by Sundaresan Rajangam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
Fix Committed
Medium
Santosh Gupta
Trunk
Fix Committed
Medium
Santosh Gupta

Bug Description

These are the proposed changes:

1.
Change the stats from list to map.
The client code doing the send will also have to change.

struct NodeStatus {
    1: string name (key="")
    2: optional bool deleted

    6: optional list<process_info.DiskPartitionUsageStats> disk_usage_info (tags="")

   10: optional list<cpuinfo.ProcessCpuInfo> process_mem_cpu_usage (tags=".module_id:.inst_id,.cpu_share")
}

Should change to:

struct NodeStatus {
    1: string name (key="")
    2: optional bool deleted

    // map key is partition name
    6: optional map<string,process_info.DiskPartitionUsageStats> disk_usage_info (tags="")

   // map key is <module_id>:<inst_id>
   10: optional map<string,cpuinfo.ProcessCpuInfo> process_mem_cpu_usage (tags=“.__key,.cpu_share")
}

2.
Remove “partition_name” from DiskPartitionUsageStats

3.
Remove "module_id and “inst_id” from ProcessCpuInfo

Tags: analytics
Revision history for this message
Santosh Gupta (sangupta) wrote :

before and after the changes in diff.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/21826
Submitter: Santosh Gupta (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/21826
Committed: http://github.org/Juniper/contrail-controller/commit/3f025bb047a682b5037cf5dd66d17b769bd75d1e
Submitter: Zuul
Branch: master

commit 3f025bb047a682b5037cf5dd66d17b769bd75d1e
Author: Santosh Gupta <email address hidden>
Date: Mon Jul 11 18:42:14 2016 -0700

Use map instead of list for reporting cpu/mem usage in NodeStatus

The new DerivedStats infra supports maps and not lists.
- Updating new NodeStatus structure to use maps instead of lists.
- Corresponding changes on client.
- Marked the deprecated fields, these will be deleted after UI moves to new structures.
List of contrail-stats test commands attached to the bug.

Change-Id: I3e4f2f38d11dff149cacda98162303917281c4cf
Closes-Bug:1601909

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

Review in progress for https://review.opencontrail.org/22153
Submitter: Santosh Gupta (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/22153
Committed: http://github.org/Juniper/contrail-controller/commit/e3df29fc384bb99851dd5746b193131297e179a8
Submitter: Zuul
Branch: R3.1

commit e3df29fc384bb99851dd5746b193131297e179a8
Author: Santosh Gupta <email address hidden>
Date: Mon Jul 11 18:42:14 2016 -0700

Use map instead of list for reporting cpu/mem usage in NodeStatus

The new DerivedStats infra supports maps and not lists.
- Updating new NodeStatus structure to use maps instead of lists.
- Corresponding changes on client.
- Marked the deprecated fields, these will be deleted after UI moves to new structures.
List of contrail-stats test commands attached to the bug.

Change-Id: I3e4f2f38d11dff149cacda98162303917281c4cf
Closes-Bug:1601909
(cherry picked from commit 3f025bb047a682b5037cf5dd66d17b769bd75d1e)

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.