Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.25.0
-
Linux 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
-
Patch, Important
Description
mesos 0.25.0 version if slave startup flags --containerizers=docker, using docker container the rest api "/monitor/statistics.json" output have no timestamp field,while if the mesoscontainer the output will have the timestamp field.
So if we use docker container we maybe cann't calculate cpu utilization based on timestamp, futhermore the "timestamp" is the required filed in ResourceStatistics message.
statistics.json
[ { "executor_id": "sleep.ecf0e700-b8da-11e5-95db-0242872c438f", "executor_name": "Command Executor (Task: sleep.ecf0e700-b8da-11e5-95db-0242872c438f) (Command: sh -c 'sleep 30000')", "framework_id": "cdb28c37-14c6-4877-a591-4eabbc6d84f2-0000", "source": "sleep.ecf0e700-b8da-11e5-95db-0242872c438f", "statistics": { "cpus_limit": 1.1, "cpus_system_time_secs": 0, "cpus_user_time_secs": 0.02, "mem_limit_bytes": 50331648, "mem_rss_bytes": 200704 } } ]
bug fix: we just like mesoscontainer in docker.cpp function cgroupsStatistics add the timestamp value set, more on patch,the result as flow
statistics.json
[ { "executor_id": "sleep.15dd3644-b902-11e5-ac40-0242872c438f", "executor_name": "Command Executor (Task: sleep.15dd3644-b902-11e5-ac40-0242872c438f) (Command: sh -c 'sleep 30000')", "framework_id": "cdb28c37-14c6-4877-a591-4eabbc6d84f2-0000", "source": "sleep.15dd3644-b902-11e5-ac40-0242872c438f", "statistics": { "cpus_limit": 1.1, "cpus_system_time_secs": 0, "cpus_user_time_secs": 0.02, "mem_limit_bytes": 50331648, "mem_rss_bytes": 192512, "timestamp": 1452585472.6926 } } ]