Bug 1389534 - Export more flannel variables with flannel-docker container image
Summary: Export more flannel variables with flannel-docker container image
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: flannel-container
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Avesh Agarwal
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-27 20:08 UTC by Avesh Agarwal
Modified: 2016-11-04 09:11 UTC (History)
3 users (show)

Fixed In Version: flannel-docker-0.5.5-7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 09:11:40 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2650 0 normal SHIPPED_LIVE New Red Hat Enterprise Linux Atomic flannel Container Image 2016-11-03 22:15:57 UTC

Description Avesh Agarwal 2016-10-27 20:08:48 UTC
Description of problem:
Currently only following 2 variables are exported:

FLANNELD_ETCD_PREFIX
FLANNELD_ETCD_ENDPOINTS

Export more flannel variables with flannel-docker container image:
FLANNELD_PUBLIC_IP
FLANNELD_ETCD_ENDPOINTS
FLANNELD_ETCD_PREFIX
FLANNELD_ETCD_KEYFILE
FLANNELD_ETCD_CERTFILE
FLANNELD_ETCD_CAFILE
FLANNELD_IFACE
FLANNELD_SUBNET_FILE
FLANNELD_IP_MASQ
FLANNELD_LISTEN
FLANNELD_REMOTE
FLANNELD_REMOTE_KEYFILE
FLANNELD_REMOTE_CERTFILE
FLANNELD_REMOTE_CAFILE
FLANNELD_NETWORKS


Version-Release number of selected component (if applicable):
0.5.5-6

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Joy Pu 2016-11-01 08:56:10 UTC
Hi Avesh,

Do some tests they are passed, but seems the inspect info is not updated. Is this as expect?

Details:
Do following tests with other env options and it works well:
1. Config subnet.env and check it exist as we set.

# docker run --privileged -d -v /usr:/mnt -e FLANNELD_ETCD_ENDPOINTS="http://172.17.0.2:2379" \
 -e FLANNELD_ETCD_PREFIX="/atomic.io/netowork" \
 -e FLANNELD_SUBNET_FILE="/root/flannel/subnet.env" \
 flannel 

2. Test multi-network with env options
flannel docker cmds:
# docker run --privileged -d -v /usr:/mnt -e FLANNELD_ETCD_ENDPOINTS="http://172.17.0.2:2379" -e FLANNELD_NETWORKS="red" flannel
# docker run --privileged -d -v /usr:/mnt -e FLANNELD_ETCD_ENDPOINTS="http://172.17.0.2:2379" -e FLANNELD_NETWORKS="green" flannel
# docker run --privileged -d -v /usr:/mnt -e FLANNELD_ETCD_ENDPOINTS="http://172.17.0.2:2379" -e FLANNELD_NETWORKS="green,blue" flannel

3. Test server/client mode with env options:
# docker run --privileged -d -v /usr:/mnt -e FLANNELD_ETCD_ENDPOINTS="http://172.17.0.2:2379" -e FLANNELD_LISTEN="0.0.0.0:8888" flannel
# docker run --privileged -d -v /usr:/mnt -e FLANNELD_ETCD_ENDPOINTS="http://172.17.0.2:2379" -e FLANNELD_REMOTE="172.17.0.7:8888" flannel

But check the inspect info of the container, seems its still the same:

            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "container=docker",
                "FLANNELD_ETCD_ENDPOINTS=http://127.0.0.1:2379",
                "FLANNELD_ETCD_PREFIX=/atomic.io/network"
            ],

Comment 4 Avesh Agarwal 2016-11-01 15:13:42 UTC
Joy, the changes are for only when flannel is used as system containers with atomic (--system flag  or IOW  with runc).

Since docker allows -e option so this change is not needed, so this changes does not affect flannel functionality with docker in anyway.

Comment 5 Joy Pu 2016-11-02 03:32:17 UTC
Thanks Avesh,

So based on #comment4 use atomic install --system --set to test this image(flannel-docker-0.5.5-7) with multi-network case(which include on of the new options). The host can get ip as expect.

Commands are as following:
1. install the flannel container in to hosts:
# atomic install --system --name flannel-blue --set FLANNELD_NETWORKS="blue" 10.73.3.189:5000/flannel

# atomic install --system --name flannel-blue-red --set FLANNELD_ETCD_ENDPOINTS="http://10.73.199.147:2379" --set FLANNELD_NETWORKS="blue,red" 10.73.3.189:5000/flannel

2. Start the flannel-blue and flannel-blue-red service

3. Use systemctl status to check the service status

4. Use ifconfig to check the interface and ip are set as expect.


So this should work. Set it to verified.

Comment 6 errata-xmlrpc 2016-11-04 09:11:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:2650


Note You need to log in before you can comment on or make changes to this bug.