Browse Source

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.
tags/1.0
Ben Nemec 3 years ago
parent
commit
5aa4bce35b
2 changed files with 33 additions and 1 deletions
  1. +18
    -1
      doc/source/host-cloud/patches.rst
  2. +15
    -0
      patches/nova/nova-pxe-boot-pike.patch

+ 18
- 1
doc/source/host-cloud/patches.rst View File

@@ -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

+ 15
- 0
patches/nova/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)

Loading…
Cancel
Save