swarm monitor raise KeyError

Bug #1504715 reported by Eli Qiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
hongbin

Bug Description

This happened on atomic-6 image.

2015-10-10 10:28:22.887 TRACE magnum.service.periodic File "/opt/stack/magnum/magnum/service/periodic.py", line 179, in _send_bay_metrics
2015-10-10 10:28:22.887 TRACE magnum.service.periodic 'value': monitor.compute_metric_value(name),
2015-10-10 10:28:22.887 TRACE magnum.service.periodic File "/opt/stack/magnum/magnum/conductor/monitors.py", line 63, in compute_metric_value
2015-10-10 10:28:22.887 TRACE magnum.service.periodic return func()
2015-10-10 10:28:22.887 TRACE magnum.service.periodic File "/opt/stack/magnum/magnum/conductor/monitors.py", line 108, in compute_memory_util
2015-10-10 10:28:22.887 TRACE magnum.service.periodic mem_reserved += container['Config']['Memory']
2015-10-10 10:28:22.887 TRACE magnum.service.periodic KeyError: 'Memory'

-mem_reserved += container['Config']['Memory']
+mem_reserved += container['HostConfig']['Memory']

Eli Qiao (taget-9)
Changed in magnum:
assignee: nobody → Eli Qiao (taget-9)
status: New → Confirmed
Revision history for this message
Eli Qiao (taget-9) wrote :

Let's hold on when we upgrade to atomic-6 image.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Changed in magnum:
status: Confirmed → In Progress
Changed in magnum:
assignee: Eli Qiao (taget-9) → hongbin (hongbin034)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/233327
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=c818df26c00200541ba6111a408176ea0f6d3e83
Submitter: Jenkins
Branch: master

commit c818df26c00200541ba6111a408176ea0f6d3e83
Author: Eli Qiao <email address hidden>
Date: Sat Oct 10 11:24:43 2015 +0800

    Fix swarm monitor exception

    In docker 1.8 (atomic-6) image, docker inspect returns Memory information
    in 'HostConfig section', this patch will adopt that changes.

    Depend on: I009d8034335f54063a51b8d1395ddc6891a12346
    Change-Id: I63ee2393c106d59286f49f88c85c6cba0a57ae15
    Closes-Bug: #1504715

Changed in magnum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
status: Fix Committed → Fix Released
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.