Docker daemon does not use bashrc env HTTP_PROXY, HTTPS_PROXY and NO_PROXY

Bug #1632698 reported by Kevin Lefevre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Kevin Lefevre

Bug Description

When using swarm driver behind a proxy, the script add-proxy.sh automaticaly add env :
- HTTP_PROXY
- HTTPS_PROXY
- NO_PROXY (if not set it adds the IP of ETCD, SWARM NODE etc)

To bashrc but only add HTTP_PROXY to systemd docker.service.d drop in. This cause Docker deamon to use the HTTP_PROXY to contact the ETCD cluster which it should not

We should add this 3 vars to the systemd dropin to be more consistent.

I'll propose a fix after that.

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

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

Changed in magnum:
assignee: nobody → Kevin Lefevre (archifleks)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/385461
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=2e9c364eec6b5b72b427c49f516b0895ce1eca51
Submitter: Jenkins
Branch: master

commit 2e9c364eec6b5b72b427c49f516b0895ce1eca51
Author: ArchiFleKs <email address hidden>
Date: Wed Oct 12 15:00:30 2016 +0200

    Add docker daemon systemd proxy variables

    add HTTPS_PROXY and NO_PROXY to docker.service.d

    Change-Id: I9ab02773695fef14256ca79e68a3d3d1e52c3ff7
    Closes-Bug: #1632698

Changed in magnum:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to magnum (master)

Reviewed: https://review.openstack.org/407516
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=8d7bc9c99eda792d46b8b57994fe5db36e37a830
Submitter: Jenkins
Branch: master

commit 8d7bc9c99eda792d46b8b57994fe5db36e37a830
Author: ArchiFleKs <email address hidden>
Date: Tue Dec 6 14:58:52 2016 +0100

    Make Docker proxy configuration consistent across template

    Closes-Bug: #1647815
    Related-Bug: #1632698
    Change-Id: Ic5e5cadd3d912f01072eff427a1095309c4f6e9b

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/magnum 4.0.0

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to magnum (master)

Reviewed: https://review.openstack.org/457806
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=35dc923d66213edebf7db122dd929d79a8eb4cf7
Submitter: Jenkins
Branch: master

commit 35dc923d66213edebf7db122dd929d79a8eb4cf7
Author: Michael Tupitsyn <email address hidden>
Date: Mon Apr 17 15:39:45 2017 -0700

    Fix no_proxy evaluation for Swarm clusters

    At the moment, no_proxy variable is evaluated separately for docker
    daemon and for swarm-manager container running in docker. Evaluated
    value for swarm-manager is not getting into cloud-init script, because
    $NODE_PROXY token is getting replaced by Heat str_replace function.
    This commit is intended to unify NO_PROXY evaluation and also fix the
    issue with swarm-manager.

    Related-Bug: #1647815
    Related-Bug: #1632698
    Related-Bug: #1660562
    Change-Id: I336024265008b6cae308bf7b614476b71b81fa01

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to magnum (stable/pike)

Related fix proposed to branch: stable/pike
Review: https://review.openstack.org/497529

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to magnum (stable/pike)

Reviewed: https://review.openstack.org/497529
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=464186b7fa85905c2d27c798b3d05c15f292c064
Submitter: Jenkins
Branch: stable/pike

commit 464186b7fa85905c2d27c798b3d05c15f292c064
Author: Michael Tupitsyn <email address hidden>
Date: Mon Apr 17 15:39:45 2017 -0700

    Fix no_proxy evaluation for Swarm clusters

    At the moment, no_proxy variable is evaluated separately for docker
    daemon and for swarm-manager container running in docker. Evaluated
    value for swarm-manager is not getting into cloud-init script, because
    $NODE_PROXY token is getting replaced by Heat str_replace function.
    This commit is intended to unify NO_PROXY evaluation and also fix the
    issue with swarm-manager.

    Related-Bug: #1647815
    Related-Bug: #1632698
    Related-Bug: #1660562
    Change-Id: I336024265008b6cae308bf7b614476b71b81fa01
    (cherry picked from commit 35dc923d66213edebf7db122dd929d79a8eb4cf7)

tags: added: in-stable-pike
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.