Bug in log output in hardware.py "Not enough available memory to schedule instance" prints full memory instead of available memory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Andreas Karis | ||
Pike |
Fix Committed
|
Undecided
|
Sahid Orentino |
Bug Description
Description of problem:
Bug in log output in hardware.py "Not enough available memory to schedule instance" prints full memory instead of available memory
Version-Release number of selected component (if applicable):
Additional info:
When nova fails scheduling, it will print:
~~~
2017-11-29 10:50:16.904 325123 DEBUG nova.virt.hardware [req-b62c53d2-
2017-11-29 10:50:16.904 325123 DEBUG oslo_concurrenc
2017-11-29 10:50:16.905 325123 DEBUG nova.compute.
~~~
This of course looks very confusing (we need 32 GB, we have 64, so why is this failing?).
The problem here is the log output, which is flawed --- /usr/lib/
~~~
840 if host_cell.
841 LOG.debug('Not enough available memory to schedule instance. '
842 'Oversubscription is not possible with pinned instances. '
843 'Required: %(required)s, actual: %(actual)s',
844 {'required': instance_
845 'actual': host_cell.memory})
846 return
~~~
This should be:
~~~
840 if host_cell.
841 LOG.debug('Not enough available memory to schedule instance. '
842 'Oversubscription is not possible with pinned instances. '
843 'Required: %(required)s, actual: %(actual)s',
844 {'required': instance_
845 'actual': host_cell.
846 return
~~~
Or even better:
~~~
840 if host_cell.
841 LOG.debug('Not enough available memory to schedule instance. '
842 'Oversubscription is not possible with pinned instances. '
843 'Required: %(required)s, actual: %(actual)s, total: %(total)s',
844 {'required': instance_
845 'actual': host_cell.
846 'total': host_cell.memory})
847 return
~~~
Changed in nova: | |
assignee: | nobody → Andreas Karis (akaris) |
status: | New → In Progress |
tags: | added: ocata-backport-potential |
Fix proposed to branch: master /review. openstack. org/524038
Review: https:/