Hide Forgot
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:
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" ],
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.
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.
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