Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libvirt: fix disablement of NUMA & hugepages on unsupported platforms
Two previous commits updated the libvirt XML config generator so that it would omit the config elements for huge pages and NUMA placement when running on old libvirt: commit cf3a126 Author: Vladik Romanovsky <vladik.romanovsky@enovance.com> Date: Wed Jan 28 00:54:26 2015 -0500 libvirt: avoid setting the memnodes where when it's not a supported option commit 3466e72 Author: Vladik Romanovsky <vladik.romanovsky@enovance.com> Date: Tue Jan 6 14:23:38 2015 -0500 libvirt: not setting membacking when mempages are empty host topology The problem arising from this is that the hosts are still reporting to the schedular that they can support NUMA and huge pages if libvirt >= 1.0.4, but we are silently discarding the guest config if libvirt < 1.2.7 (numa) or 1.2.8 (huge pages). The result is that the schedular thinks the host can support the requested feature and so places the guest there, but the actual guest that is launched is missing the feature. So the user is not getting what they requested. The correct approach is to update the "_get_host_numa_topology" method so that it does not report any NUMA topology in the first place, if the host is incapable of having guests configured in the way Nova requires. Likewise if the host cannot support the huge page configuration method required, it should not report availability of huge pages. In summary, we are moving the version checks added by the two commits above to the point at which host capability reporting is done. We add a fatal error check in the guest XML config generator methods, so that if there is some future schedular bug causing it to not honour host capabilities, we see a clear error instead of silently starting guests with the wrong config. There is a further mistake in that a version number check alone is insufficient. We must also check that the hypervisor is either QEMU or KVM, to prevent the code paths running on Xen or LXC. Closes-bug: #1425115 Related-bug: #1408070 Related-bug: #1415333 Change-Id: I8326596696cbb030ae95d17f3dd430d05279081a
- Loading branch information
Showing
3 changed files
with
221 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.