From 5aa4bce35b57ddc381a144a292a3a2a6ed591526 Mon Sep 17 00:00:00 2001 From: Ben Nemec Date: Thu, 8 Jun 2017 15:38:57 -0500 Subject: [PATCH] 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. --- doc/source/host-cloud/patches.rst | 19 ++++++++++++++++++- patches/nova/nova-pxe-boot-pike.patch | 15 +++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 patches/nova/nova-pxe-boot-pike.patch diff --git a/doc/source/host-cloud/patches.rst b/doc/source/host-cloud/patches.rst index 8310ba3..32797ed 100644 --- a/doc/source/host-cloud/patches.rst +++ b/doc/source/host-cloud/patches.rst @@ -5,12 +5,21 @@ The changes described in this section apply to compute nodes in the host cloud. 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:: 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: .. 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 cd /opt/stack/nova 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 diff --git a/patches/nova/nova-pxe-boot-pike.patch b/patches/nova/nova-pxe-boot-pike.patch new file mode 100644 index 0000000..6584cc2 --- /dev/null +++ b/patches/nova/nova-pxe-boot-pike.patch @@ -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)