Add new Nova patch file for Pike

The existing diff finally doesn't apply cleanly, so we need a new
one for Pike and up.
This commit is contained in:
Ben Nemec 2017-06-08 15:38:57 -05:00
parent f01cc0e10a
commit 5aa4bce35b
2 changed files with 33 additions and 1 deletions

View File

@ -5,12 +5,21 @@ The changes described in this section apply to compute nodes in the
host cloud. host cloud.
Apply the Nova pxe boot patch file in the ``patches`` directory to the host Apply the Nova pxe boot patch file in the ``patches`` directory to the host
cloud Nova. Examples: cloud Nova. ``nova-pxe-boot.patch`` can be used with all releases prior to
Pike, ``nova-pxe-boot-pike.patch`` must be used with Pike and later.
Examples:
TripleO/RDO:: TripleO/RDO::
sudo patch -p1 -d /usr/lib/python2.7/site-packages < patches/nova/nova-pxe-boot.patch sudo patch -p1 -d /usr/lib/python2.7/site-packages < patches/nova/nova-pxe-boot.patch
or
::
sudo patch -p1 -d /usr/lib/python2.7/site-packages < patches/nova/nova-pxe-boot-pike.patch
Devstack: Devstack:
.. note:: You probably don't want to try to run this with devstack anymore. .. note:: You probably don't want to try to run this with devstack anymore.
@ -27,3 +36,11 @@ Devstack:
cp patches/nova/nova-pxe-boot.patch /opt/stack/nova cp patches/nova/nova-pxe-boot.patch /opt/stack/nova
cd /opt/stack/nova cd /opt/stack/nova
patch -p1 < nova-pxe-boot.patch patch -p1 < nova-pxe-boot.patch
or
::
cp patches/nova/nova-pxe-boot-pike.patch /opt/stack/nova
cd /opt/stack/nova
patch -p1 < nova-pxe-boot-pike.patch

View File

@ -0,0 +1,15 @@
diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py
index 0139f80..0db3661 100644
--- a/nova/virt/libvirt/driver.py
+++ b/nova/virt/libvirt/driver.py
@@ -4777,6 +4777,10 @@ class LibvirtDriver(driver.ComputeDriver):
self._conf_non_lxc_uml(virt_type, guest, root_device_name, rescue,
instance, inst_path, image_meta, disk_info)
+ if (CONF.libvirt.virt_type in ['qemu', 'kvm'] and
+ instance.metadata.get('libvirt:pxe-first')):
+ guest.os_boot_dev = ['network'] + guest.os_boot_dev
+
self._set_features(guest, instance.os_type, caps, virt_type,
image_meta)
self._set_clock(guest, instance.os_type, image_meta, virt_type)