libvirt: make default value of numa cell memory to 0 when not defined
Some arch can have cells without memory or cpus defined and libvirt
will return an XML without these elements. Our object defintion of the
fields cpus and memory cannot let us to make them to None when not
defined but currently the config representation of a NUMA make it to
None.
This patch fix the default value of config memory to 0 when libvirt
does not return memory element for a cell.
Also this cannot be considered come a fix for bug 1418187 since we
have to handle these cases (cpus or memory not defined) during
scheduling. thse case can be addressed when using distances which will
be addressed in a next serie of patches.
NOTE(mriedem): The conflict in config.py is due to the mempages
code added on master with commit 3283e2a42 that's not in juno.
The test conflict was due to moving the tests in kilo.
Related-Bug: #1418187
Change-Id: Iac08d1221341a86c081d5e905c704fb1c9dca276
(cherry picked from commit 291c1a1db1ab3ceccfac7a3c8312b6fdce3aaa84)
Reviewed: https:/ /review. openstack. org/166004 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=34f029e68d6 07c7154adcb6d66 16da8da0db3650
Committed: https:/
Submitter: Jenkins
Branch: stable/juno
commit 34f029e68d607c7 154adcb6d6616da 8da0db3650
Author: Sahid Orentino Ferdjaoui <email address hidden>
Date: Tue Mar 3 05:00:40 2015 -0500
libvirt: make default value of numa cell memory to 0 when not defined
Some arch can have cells without memory or cpus defined and libvirt
will return an XML without these elements. Our object defintion of the
fields cpus and memory cannot let us to make them to None when not
defined but currently the config representation of a NUMA make it to
None.
This patch fix the default value of config memory to 0 when libvirt
does not return memory element for a cell.
Also this cannot be considered come a fix for bug 1418187 since we
have to handle these cases (cpus or memory not defined) during
scheduling. thse case can be addressed when using distances which will
be addressed in a next serie of patches.
Conflicts:
nova/ tests/unit/ virt/libvirt/ test_config. py
nova/ virt/libvirt/ config. py
NOTE(mriedem): The conflict in config.py is due to the mempages
code added on master with commit 3283e2a42 that's not in juno.
The test conflict was due to moving the tests in kilo.
Related-Bug: #1418187 6c081d5e905c704 fb1c9dca276 ccfac7a3c8312b6 fdce3aaa84)
Change-Id: Iac08d1221341a8
(cherry picked from commit 291c1a1db1ab3ce