Can't set gateway for provider network

Bug #1810319 reported by Damian Cikowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Jesse Pretorius

Bug Description

OSA 18.1.1 (Ubuntu)

There is a gateway key described in example: https://github.com/openstack/openstack-ansible/blob/master/etc/openstack_deploy/openstack_user_config.yml.example#L203

I'm trying to set specific default gateway for the haproxy containers, what is required in my environment.
It's definition looks as follow:

global_overrides:
  provider_networks:
    - network:
        container_bridge: "br-haproxyWan"
        container_type: "veth"
        container_interface: "eth14"
        ip_from_q: "haproxyWan"
        type: "raw"
        gateway: "10.0.11.11"
        group_binds:
          - haproxy

After containers are created network itself is working as expected but no specified gateway is set.
openstack_inventory.json inspection revealed that there is no gateway key in the appropriate container_networks network.
I've manually added the gateway key and after re-runing playbook gateway is set properly.

It looks like something is wrong with inventory generation script.

Revision history for this message
Mohammed Naser (mnaser) wrote :

We don't support setting a default gateway right now as the default gateway is the host which does the NAT.

https://github.com/openstack/openstack-ansible-lxc_container_create/blob/master/tests/group_vars/all_containers.yml#L17-L26

That is an example how to setup a static route to a specific subnet if you need one.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (master)

Fix proposed to branch: master
Review: https://review.openstack.org/629309

Changed in openstack-ansible:
assignee: nobody → James Denton (james-denton)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-lxc_container_create (master)

Fix proposed to branch: master
Review: https://review.openstack.org/629310

Changed in openstack-ansible:
assignee: James Denton (james-denton) → Damian Cikowski (dcdamien)
Changed in openstack-ansible:
assignee: Damian Cikowski (dcdamien) → Jesse Pretorius (jesse-pretorius)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (master)

Reviewed: https://review.openstack.org/629309
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=8f088db5d906d80cced665f5a14a9a3466f977b3
Submitter: Zuul
Branch: master

commit 8f088db5d906d80cced665f5a14a9a3466f977b3
Author: James Denton <email address hidden>
Date: Tue Jan 8 20:41:13 2019 +0000

    Update inventory generator to support container gateway override

    This patch updates the inventory generation script to support overriding
    the default gateway in a container, and aims to provide support for a feature
    documentation claims is there (but isn't).

    Change-Id: Id86396f3e016ad83f312988fdc00fec6302d0802
    Partial-Bug: #1810319

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-lxc_container_create (master)

Reviewed: https://review.openstack.org/629310
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-lxc_container_create/commit/?id=5a59d2bdd46e48818011cea85a90b8a6780b858e
Submitter: Zuul
Branch: master

commit 5a59d2bdd46e48818011cea85a90b8a6780b858e
Author: James Denton <email address hidden>
Date: Tue Jan 8 20:48:01 2019 +0000

    Update container interface template to disable DHCP routes when gateway set

    This patch updates the container interface template to disable DHCP routes,
    including the default route thru eth0/lxcbr0, when a gateway address override
    is set.

    Change-Id: I3ec0b8ddc68fc30aff40e80face9e3a6b1ffd4bc
    Partial-Bug: #1810319
    Depends-On: https://review.openstack.org/629309

Changed in openstack-ansible:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.