improve flannel vxlan conditional logic

Bug #1516789 reported by Daneyon Hansen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Ton Ngo

Bug Description

Currently, the flannel conditional logic for managing the config json is difficult to understand:

https://github.com/openstack/magnum/blob/master/magnum/templates/kubernetes/fragments/write-network-config.sh#L27-L40

It is recommended to implement improved conditional logic to all bay types that support the flannel network-driver. For example:

if [ "$use_vxlan" = 1 ]; then
    backend_type="vxlan"
else
    backend_type="udp"
fi
cat > $FLANNEL_JSON <<EOF
....
    "Backend": {
         "Type": "$backend_type"
    }
}
EOF

Tags: tech-debt
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
Revision history for this message
Eli Qiao (taget-9) wrote :
Changed in magnum:
status: New → Confirmed
status: Confirmed → Triaged
Changed in magnum:
assignee: nobody → Ton Ngo (ton-i)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/241866
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=14909f0944649b4de7eb5c8785162defaad0d55a
Submitter: Jenkins
Branch: master

commit 14909f0944649b4de7eb5c8785162defaad0d55a
Author: Angus Lees <email address hidden>
Date: Thu Nov 5 15:12:43 2015 +1100

    Add flannel's host-gw backend option

    Allow configuring Flannel with 3 different backends

    Magnum deploys k8s/swarm over a dedicated neutron private network,
    possibly using flannel. Flannel's `host-gw` backend gives the best
    performance in this topopolgy (private layer2): no packet processing
    overhead, no reduction to MTU, scales to many hosts as well as the
    alternatives. The performance difference is significant, see bug for
    performance numbers for the 3 backend options.

    Note that part of this change involves relaxing the minion IP spoofing
    rules to allow traffic from all dynamically-allocated flannel subnets.
    This is morally equivalent to what we were doing previously with
    encapsulation - only now neutron is able to see the inner IP header
    directly.

    This patch repurposes the label "flannel_use_vxlan" when the network
    driver is flannel.

    1. Rename the label flannel_use_vxlan to flannel_backend
    2. Redefine the value of this label from "yes/no"
       to "udp/vxlan/host-gw"

    For example, to create a bay model with flannel as network driver:
    --network-driver flannel --labels flannel_backend=host-gw

    Other backend options are udp and vxlan.

    Co-Authored-By: Ton Ngo <email address hidden>
    Partial-Bug: #1518605
    Closes-Bug: #1516789
    Change-Id: I6d2441664ad1baaca14d0e6ff4bcddbe75bee094

Changed in magnum:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/magnum 3.0.0

This issue was fixed in the openstack/magnum 3.0.0 release.

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.