Inconsistency in reporting cpu/memory information in UVE
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R3.0 |
Fix Committed
|
High
|
Santosh Gupta | |||
Trunk |
Fix Committed
|
High
|
Santosh Gupta |
Bug Description
While reviewing https:/
analytics-node
- collector, query-engine, analytics-api and alarm-gen sends process cpu/memory info in ModuleCpuState and AnalyticsCpuState
- snmp-collector and topology doesn’t send cpu/mem info
config-node
- api, svc-monitor, schema sends process cpu/memory info in ModuleCpuState and ConfigCpuState
- discovery, device-manager doesn’t send cpu/mem info
- should we send cpu/mem info for ifmap service from config-nodemgr?
control-node
- control service sends process cpu/mem info in ControlCpuState
compute-node
- vrouter-agent, tor-agent sends process and system cpu/mem info in ComputeCpuState and VRouterStatsAgent
1) ModuleCpuState is deprecated and should be removed
2) api sends build_info and config_node_ip in ModuleCpuState, which is not correct
cfgm_cpuinfo.
struct ModuleCpuState {
1: string name (key="ObjectCon
2: optional bool deleted
3: optional list<ModuleCpuInfo> module_cpu_info (aggtype="union")
4: optional string build_info <<<<<<<<
5: optional list<string> config_node_ip <<<<<<<
}
3) cpu_info should be removed from VRouterStatsAgent
4) ComputeCpuState structure is inconsistent with other modules
struct VrouterCpuInfo {
1: u32 mem_virt
2: double cpu_share
3: u32 used_sys_mem
4: double one_min_cpuload
5: u32 mem_res
}
struct ComputeCpuState {
1: string name (key="ObjectVRo
2: optional bool deleted
3: optional list<VrouterCpu
}
Other Modules follow the below structure
struct XXXCpuState {
1: string name (key=“XYZ")
2: optional bool deleted
3: optional list<cpuinfo.
}
uve sandesh XXXCpuStateTrace {
1: XXXCpuState data
}
VrouterCpuInfo has both process and system specific memory and cpu info.
ComputeCpuState should use cpuinfo.
A new structure named SystemCpuInfo should be added in cpuinfo.sandesh and ComputeCpuState should report the system cpu/mem info using this new structure
5) analytics-api and analrm-gen uses opserver/cpuinfo.py to get cpu and memory info.
config/
Presently, we are adding code in database-nodemgr to send cpu/mem info for cassandra, zookeeper and kafka
Therefore, we should move cpuinfo.py to a common directory and all python modules should use that instead of defining their own version or duplicating. Should we create a common python package (say contrail-
6) Since all the modules are expected to send the cpu/mem info, should we consider moving the reporting of cpu/mem info to the sandesh library? - Easy to maintain and minimal effort to ensure newly created generators sends cpu/memory info.
bug update...