95bce095ed
When live migrating a pinned instance, we recalculate pinning information for the destination host and then update the instance's XML before spawning the instance there. As part of the pinning information recalculation, we must also recalculate information for realtime cores, which are configured using the '<vcpusched>' element. The 'nova.virt.libvirt.migration._update_numa_xml' function, which handles this updating, was assuming there would only be one of these elements. This is a reasonably sane assumption since this is all we create in the 'nova.virt.libvirt.LibvirtDriver._get_guest_numa_config' function used to generate the initial instance XML. However, a look at logs show that at least some (all?) versions of libvirt actually rewrite the XML we're providing them. Compare what is returned from '_get_guest_xml': DEBUG nova.virt.libvirt.driver [...] [instance: ...] End _get_guest_xml xml=<domain type="kvm"> ... <cputune> <shares>4096</shares> ... <vcpusched vcpus="2-3" scheduler="fifo" priority="1"/> </cputune> ... </domain> {{(pid=12600) _get_guest_xml /opt/stack/nova/nova/virt/libvirt/driver.py:6331}} to what is seen when we enter '_update_numa_xml' (or via 'virsh dumpxml' at any point after instance creation): DEBUG nova.virt.libvirt.migration [-] _update_numa_xml input xml=<domain type="kvm"> ... <cputune> <shares>4096</shares> ... <vcpusched vcpus="2" scheduler="fifo" priority="1"/> <vcpusched vcpus="3" scheduler="fifo" priority="1"/> </cputune ... </domain> {{(pid=12600) _update_numa_xml /opt/stack/nova/nova/virt/libvirt/migration.py:97} The solution is simple: rather than trying to modify the existing XML, simply scrap it and rebuild the elements from scratch. We should probably do this for all elements, but that can/should be tackled separately. Change-Id: Ic01603a91f6099f1068af0e955f3e1056021d673 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Closes-Bug: #1889257 (cherry picked from commit |
||
---|---|---|
api-guide/source | ||
api-ref/source | ||
devstack | ||
doc | ||
etc/nova | ||
gate | ||
nova | ||
playbooks | ||
releasenotes | ||
roles/run-post-test-hook | ||
tools | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.stestr.conf | ||
.zuul.yaml | ||
CONTRIBUTING.rst | ||
HACKING.rst | ||
LICENSE | ||
MAINTAINERS | ||
README.rst | ||
babel.cfg | ||
bindep.txt | ||
lower-constraints.txt | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
README.rst
Team and repository tags
OpenStack Nova
OpenStack Nova provides a cloud computing fabric controller, supporting a wide variety of compute technologies, including: libvirt (KVM, Xen, LXC and more), Hyper-V, VMware, XenServer, OpenStack Ironic and PowerVM.
Use the following resources to learn more.
API
To learn how to use Nova's API, consult the documentation available online at:
For more information on OpenStack APIs, SDKs and CLIs in general, refer to:
Operators
To learn how to deploy and configure OpenStack Nova, consult the documentation available online at:
In the unfortunate event that bugs are discovered, they should be reported to the appropriate bug tracker. If you obtained the software from a 3rd party operating system vendor, it is often wise to use their own bug tracker for reporting problems. In all other cases use the master OpenStack bug tracker, available at:
Developers
For information on how to contribute to Nova, please see the contents of the CONTRIBUTING.rst.
Any new code must follow the development guidelines detailed in the HACKING.rst file, and pass all unit tests.
Further developer focused documentation is available at:
Other Information
During each Summit and Project Team Gathering, we agree on what the whole community wants to focus on for the upcoming release. The plans for nova can be found at: