Files
openstack-ansible/playbooks/roles/lxc_container_create/templates/container-interface.ini.j2
kevin 8cf1f44c9e Change to set the container network MTU
This change adds the container network MTU option within the container
network LXC config file. This will allow a deployer to set the MTU within
a provider networks entry in openstack_user_config.yml.

Example:

  ....
  provider_networks:
    - network:
        container_bridge: "br-storage"
        container_type: "veth"
        container_interface: "eth2"
        ip_from_q: "storage"
        type: "raw"
        container_mtu: "9000"
        group_binds:
          - glance_api
          - cinder_api
          - cinder_volume
          - nova_compute
          - swift_proxy

This changes gives the deployer the ability to selectively set the mtu as
needed.

The dynamic_inventory.py script has been updated to allow for the MTU entry.

Example file documentation has been added to show how to use this new setting.

BackportPotential
DocImpact
Closes-Bug: #1477346

Change-Id: If8c0ee042d2f1322f8322ea6c8ee33606070d880
2015-07-22 19:25:01 -05:00

16 lines
498 B
Django/Jinja

# {{ ansible_managed }}
# Create a veth pair within the container
lxc.network.type = {{ item.value.type|default('veth') }}
# Network device within the container
lxc.network.name = {{ item.value.interface }}
# Host link to attach to, this should be a bridge
lxc.network.link = {{ item.value.bridge }}
# Hardware Address
lxc.network.hwaddr = 00:16:3e:xx:xx:xx
# enable the device on boot
lxc.network.flags = up
# Set the container network MTU
lxc.network.mtu = {{ item.value.mtu|default('1500') }}