Hi,
On a setup with 4 nodes (running Centos 7.3):
-Openstack node (Mitaka)
-Contrail config, controller, analytics node (Contrail 3.2)
-2 compute nodes
The Openstack was installed first, then Contrail was installed and provisioned using the fab tool.
In the query below, the sort field is "stats_info.__key". The results are always sorted in ascending order regardless of sort order (ASCENDING = 1, DESCENDING = 2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[root@node-46 ~]# cat q10
{
"start_time": "now-1m",
"end_time": "now",
"select_fields": ["Source", "T", "CLASS(T)", "COUNT(stats_info)", "stats_info.__key", "stats_info.reads", "SUM(stats_info.reads)", "CLASS(stats_info.reads)", "MAX(stats_info.reads)", "MIN(stats_info.reads)", "PERCENTILES(stats_info.reads)", "AVG(stats_info.reads)", "stats_info.read_fails", "SUM(stats_info.read_fails)", "CLASS(stats_info.read_fails)", "MAX(stats_info.read_fails)", "MIN(stats_info.read_fails)", "PERCENTILES(stats_info.read_fails)", "AVG(stats_info.read_fails)", "stats_info.writes", "SUM(stats_info.writes)", "CLASS(stats_info.writes)", "MAX(stats_info.writes)", "MIN(stats_info.writes)", "PERCENTILES(stats_info.writes)", "AVG(stats_info.writes)", "stats_info.write_fails", "SUM(stats_info.write_fails)", "CLASS(stats_info.write_fails)", "MAX(stats_info.write_fails)", "MIN(stats_info.write_fails)", "PERCENTILES(stats_info.write_fails)", "AVG(stats_info.write_fails)", "stats_info.write_back_pressure_fails", "SUM(stats_info.write_back_pressure_fails)", "CLASS(stats_info.write_back_pressure_fails)", "MAX(stats_info.write_back_pressure_fails)", "MIN(stats_info.write_back_pressure_fails)", "PERCENTILES(stats_info.write_back_pressure_fails)", "AVG(stats_info.write_back_pressure_fails)", "name"],
"table": "StatTable.CollectorDbStats.stats_info",
"where": [[{ "name": "Source", "value": "", "op": 7}]],
"sort_fields":["stats_info.__key"],"sort":2
}
[root@node-46 ~]#
[root@node-46 ~]#
[root@node-46 ~]# curl -X POST --data @q10 10.240.150.170:8081/analytics/query --header "Content-Type:application/json" | python -mjson.tool | grep stats_info.__key
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 59040 0 57609 100 1431 54586 1355 0:00:01 0:00:01 --:--:-- 54605
"stats_info.__key": "AlarmgenStatus:counters",
"stats_info.__key": "AlarmgenUpdate:i",
"stats_info.__key": "AlarmgenUpdate:o",
"stats_info.__key": "AnalyticsApiStats:api_stats",
"stats_info.__key": "CassandraStatusData:cassandra_compaction_task",
"stats_info.__key": "CassandraStatusData:thread_pool_stats",
"stats_info.__key": "CollectorDbStats:cql_stats",
"stats_info.__key": "CollectorDbStats:cql_stats.errors",
"stats_info.__key": "CollectorDbStats:cql_stats.stats",
"stats_info.__key": "CollectorDbStats:errors",
"stats_info.__key": "CollectorDbStats:stats_info",
"stats_info.__key": "CollectorDbStats:table_info",
"stats_info.__key": "ComputeCpuState:cpu_info",
"stats_info.__key": "DatabaseUsageInfo:database_usage",
"stats_info.__key": "FieldNames:fields",
"stats_info.__key": "ModuleClientState:msg_type_diff",
"stats_info.__key": "ModuleClientState:tx_msg_diff",
"stats_info.__key": "NodeStatus:disk_usage_info",
"stats_info.__key": "NodeStatus:process_mem_cpu_usage",
"stats_info.__key": "NodeStatus:system_cpu_usage",
"stats_info.__key": "NodeStatus:system_mem_usage",
"stats_info.__key": "QueryPerfInfo:query_stats",
"stats_info.__key": "SandeshMessageStat:msg_info",
"stats_info.__key": "UveVMInterfaceAgent:flow_rate",
"stats_info.__key": "UveVMInterfaceAgent:if_stats",
"stats_info.__key": "UveVirtualNetworkAgent:vn_stats",
"stats_info.__key": "VirtualMachineStats:cpu_stats",
"stats_info.__key": "VncApiStatsLog:api_stats",
"stats_info.__key": "VrouterStatsAgent:flow_rate",
"stats_info.__key": "VrouterStatsAgent:phy_band_in_bps",
"stats_info.__key": "VrouterStatsAgent:phy_band_out_bps",
"stats_info.__key": "VrouterStatsAgent:phy_flow_rate",
"stats_info.__key": "VrouterStatsAgent:phy_if_stats",
"stats_info.__key": "VrouterStatsAgent:vhost_stats",
[root@node-46 ~]#
[root@node-46 ~]#
===================
Expected result:
The results should be sorted in appropriate order