Add custom interfaces file and update docs for PowerVM RMC

This patch adds templating a custom Nova interfaces file for PowerVM only
to support doing mixed IPV4-only and IPV6-only deployments. It also adds
documentation for configuration of PowerVM RMC.

Change-Id: Ib1ff51c95998bbc3183ea9b896dc8fa2dfbc0435
Closes-Bug: #1643988
This commit is contained in:
Adam Reznechek 2016-11-22 13:17:22 -06:00 committed by Jesse Pretorius (odyssey4me)
parent 2c875dc440
commit cbd64aa00a
5 changed files with 86 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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

View File

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