Juju Charm - Neutron Gateway
Clone or download
gnuoy Purge old packages on upgrade-charm
On charm upgrade the charm may switch to py3 packages. If so, ensure
the old py2 packages are purged. If the purge occurs then restart

Change-Id: Iddfff1c7ce929776c294034706305f5d77ae9ade
Closes-Bug: 1803451
Latest commit ba1832f Nov 15, 2018
Failed to load latest commit information.
actions Remove deploy from source support Jan 12, 2018
files Replace LOG.warn with LOG.warning Nov 16, 2016
hooks Purge old packages on upgrade-charm Nov 15, 2018
lib Update tox.ini files from release-tools gold copy Sep 9, 2016
templates Allow Juju AZ context information to be used Oct 9, 2018
tests Merge "Remove nova metadata service" Oct 5, 2018
unit_tests Purge old packages on upgrade-charm Nov 15, 2018
.coveragerc Rename charm to neutron-gateway including code May 7, 2015
.gitignore Update for Python 3 execution Nov 16, 2017
.gitreview Add gitreview prior to migration to openstack Feb 24, 2016
.project Rename project Sep 15, 2015
.pydevproject Rename project Sep 15, 2015
.testr.conf Add tox support Feb 23, 2016
.zuul.yaml import zuul job settings from project-config Sep 11, 2018
Makefile Tests dir no longer need copy of charmhelpers Oct 10, 2018
README.md Minor deployment doc updates Sep 28, 2017
actions.yaml Remove deploy from source support Jan 12, 2018
charm-helpers-hooks.yaml Update repo to do ch-sync from Git Sep 26, 2017
config.yaml Allow Juju AZ context information to be used Oct 9, 2018
copyright Add missing copyright file Dec 7, 2012
hardening.yaml Add hardening support Mar 31, 2016
icon.svg Update charm icon Aug 2, 2017
metadata.yaml Update series metadata Jul 11, 2018
requirements.txt Update requirements Oct 3, 2018
revision added postgresql Mar 28, 2014
setup.cfg turn down logging a bit Oct 19, 2013
test-requirements.txt Update requirements Oct 3, 2018
tox.ini fix tox python3 overrides Nov 2, 2018



Neutron provides flexible software defined networking (SDN) for OpenStack.

This charm is designed to be used in conjunction with the rest of the OpenStack related charms in the charm store to virtualize the network that Nova Compute instances plug into.

Neutron supports a rich plugin/extension framework for propriety networking solutions and supports (in core) Nicira NVP, NEC, Cisco and others...

See the upstream Neutron documentation for more details.


In order to use Neutron with OpenStack, you will need to deploy the nova-compute and nova-cloud-controller charms with the network-manager configuration set to 'Neutron':

    network-manager: Neutron

This decision must be made prior to deploying OpenStack with Juju as Neutron is deployed baked into these charms from install onwards:

juju deploy nova-compute
juju deploy --config config.yaml nova-cloud-controller
juju deploy neutron-api
juju add-relation nova-compute nova-cloud-controller
juju add-relation neutron-api nova-cloud-controller

The Neutron Gateway can then be added to the deploying:

juju deploy neutron-gateway
juju add-relation neutron-gateway mysql
juju add-relation neutron-gateway rabbitmq-server
juju add-relation neutron-gateway nova-cloud-controller
juju add-relation neutron-gateway neutron-api

The gateway provides two key services; L3 network routing and DHCP services.

These are both required in a fully functional Neutron OpenStack deployment.

See upstream Neutron multi extnet

Configuration Options

Port Configuration

All network types (internal, external) are configured with bridge-mappings and data-port and the flat-network-providers configuration option of the neutron-api charm. Once deployed, you can configure the network specifics using neutron net-create.

If the device name is not consistent between hosts, you can specify the same bridge multiple times with MAC addresses instead of interface names. The charm will loop through the list and configure the first matching interface.

Basic configuration of a single external network, typically used as floating IP addresses combined with a GRE private network:

    bridge-mappings:         physnet1:br-ex
    data-port:               br-ex:eth1
    flat-network-providers:  physnet1

neutron net-create --provider:network_type flat \
    --provider:physical_network physnet1 --router:external=true \
neutron router-gateway-set provider external

Alternative configuration with two networks, where the internal private network is directly connected to the gateway with public IP addresses but a floating IP address range is also offered.

    bridge-mappings:         physnet1:br-data external:br-ex
    data-port:               br-data:eth1 br-ex:eth2
    flat-network-providers:  physnet1 external

Alternative configuration with two external networks, one for public instance addresses and one for floating IP addresses. Both networks are on the same physical network connection (but they might be on different VLANs, that is configured later using neutron net-create).

    bridge-mappings:         physnet1:br-data
    data-port:               br-data:eth1
    flat-network-providers:  physnet1

neutron net-create --provider:network_type vlan \
    --provider:segmentation_id 400 \
    --provider:physical_network physnet1 --shared external
neutron net-create --provider:network_type vlan \
    --provider:segmentation_id 401 \
    --provider:physical_network physnet1 --shared --router:external=true \
neutron router-gateway-set provider floating

This replaces the previous system of using ext-port, which always created a bridge called br-ex for external networks which was used implicitly by external router interfaces.

Instance MTU

When using Open vSwitch plugin with GRE tunnels default MTU of 1500 can cause packet fragmentation due to GRE overhead. One solution is to increase the MTU on physical hosts and network equipment. When this is not possible or practical the charm's instance-mtu option can be used to reduce instance MTU via DHCP.

juju set neutron-gateway instance-mtu=1400

OpenStack upstream documentation recommends a MTU value of 1400: OpenStack documentation

Note that this option was added in Havana and will be ignored in older releases.