diff --git a/doc/source/app-powervm.rst b/doc/source/app-powervm.rst index 01973d08..24f6b5d6 100644 --- a/doc/source/app-powervm.rst +++ b/doc/source/app-powervm.rst @@ -96,3 +96,17 @@ Additionally, you can enable flat network injection by using the nova_nova_conf_overrides: DEFAULT: flat_injected: True + +Enabling PowerVM RMC +~~~~~~~~~~~~~~~~~~~~ + +To enable PowerVM RMC_, IPv4/IPv6 dual-stack mode must be enabled. To do this, +you must set ``use_ipv6`` using the ``nova_nova_conf_overrides`` variable: + +.. code-block:: yaml + + nova_nova_conf_overrides: + DEFAULT: + use_ipv6: True + +.. _RMC: http://www.ibm.com/support/knowledgecenter/8284-22A/p8eig/p8eig_rmc.htm diff --git a/releasenotes/notes/support-powervm-rmc-dedce9da5fdd1bea.yaml b/releasenotes/notes/support-powervm-rmc-dedce9da5fdd1bea.yaml new file mode 100644 index 00000000..340be830 --- /dev/null +++ b/releasenotes/notes/support-powervm-rmc-dedce9da5fdd1bea.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - Setup for the PowerVM driver was not properly configuring the system + to support RMC configuration for client instances. This fix introduces + an interface template for PowerVM that properly supports mixed IPV4/IPV6 + deploys and adds documentation for PowerVM RMC. For more information see + bug 1643988. diff --git a/tasks/nova_compute_powervm.yml b/tasks/nova_compute_powervm.yml index 2955c856..2d5ace87 100644 --- a/tasks/nova_compute_powervm.yml +++ b/tasks/nova_compute_powervm.yml @@ -28,3 +28,13 @@ changed_when: false tags: - nova-powervm + +- name: Template Nova interfaces file + template: + src: nova-interfaces-template.j2 + dest: /etc/nova/nova-interfaces-template + owner: "root" + group: "root" + mode: 0644 + tags: + - nova-powervm diff --git a/templates/nova-interfaces-template.j2 b/templates/nova-interfaces-template.j2 new file mode 100644 index 00000000..098efad5 --- /dev/null +++ b/templates/nova-interfaces-template.j2 @@ -0,0 +1,51 @@ +# {{ ansible_managed }} + +{% raw %} +# Injected by Nova on instance boot +# +# This file describes the network interfaces available on your system +# and how to activate them. For more information, see interfaces(5). + +# The loopback network interface +auto lo +iface lo inet loopback +{% for ifc in interfaces %} + +auto {{ ifc.name }} +{% if ifc.address %} +iface {{ ifc.name }} inet static + hwaddress ether {{ ifc.hwaddress }} + address {{ ifc.address }} + netmask {{ ifc.netmask }} + broadcast {{ ifc.broadcast }} +{% if ifc.gateway %} + gateway {{ ifc.gateway }} +{% endif %} +{% if ifc.dns %} + dns-nameservers {{ ifc.dns }} +{% endif %} +{% endif %} +{% if use_ipv6 %} +{% if ifc.address_v6 %} +{% if libvirt_virt_type == 'lxc' %} +iface {{ ifc.name }} inet6 manual + post-up ip -6 addr add {{ ifc.address_v6 }}/{{ifc.netmask_v6 }} dev ${IFACE} +{% if ifc.gateway_v6 %} + post-up ip -6 route add default via {{ ifc.gateway_v6 }} dev ${IFACE} +{% endif %} +{% else %} +iface {{ ifc.name }} inet6 static + hwaddress ether {{ ifc.hwaddress }} + address {{ ifc.address_v6 }} + netmask {{ ifc.netmask_v6 }} +{% if ifc.gateway_v6 %} + gateway {{ ifc.gateway_v6 }} +{% endif %} +{% if ifc.dns_v6 %} + dns-nameservers {{ ifc.dns_v6 }} +{% endif %} +{% endif %} +{% endif %} +{% endif %} +{% endfor %} +{% endraw %} diff --git a/templates/nova.conf.j2 b/templates/nova.conf.j2 index f8a1ed4b..f896db1e 100644 --- a/templates/nova.conf.j2 +++ b/templates/nova.conf.j2 @@ -113,6 +113,10 @@ vif_plugging_is_fatal = False # Hypervisor default_ephemeral_format = ext4 +{% if nova_virt_type == 'powervm' %} +injected_network_template = /etc/nova/nova-interfaces-template +{% endif %} + # Configdrive force_config_drive = {{ nova_force_config_drive }}