Bug 1317975 - Proxy variables for Containerized Nodes and Masters for using oc commands.
Summary: Proxy variables for Containerized Nodes and Masters for using oc commands.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Scott Dodson
QA Contact: Gan Huang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-15 16:23 UTC by Eric Rich
Modified: 2016-05-12 16:38 UTC (History)
6 users (show)

Fixed In Version: openshift-ansible-3.0.60-1.git.0.3dbcb72.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 16:38:43 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1065 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise atomic-openshift-utils bug fix update 2016-05-12 20:32:56 UTC

Description Eric Rich 2016-03-15 16:23:49 UTC
Description of problem:

The proxy variables are not getting set for containerized Nodes and Masters and master services. Variable are inside the docker image but not used by openshift 

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

How reproducible:
100%

Steps to reproduce: 
1. The platform behind proxy all on atomic
2. Run $ oc start-build cakephp-example

Result: 
Error from server: imageStreamTag "php:5.6" not found

when oc get is -n openshift

Additional info:


$ systemctl show atomic-openshift-master-api.service  | grep -i environmentfile
EnvironmentFile=/etc/sysconfig/atomic-openshift-master-api (ignore_errors=no)


$ cat /etc/systemd/system/atomic-openshift-master-api.service 

ExecStart=/usr/bin/docker run --rm --privileged --net=host --name atomic-openshift-master-api -v /var/lib/origin:/var/lib/origin -v /var/run/docker.sock:/var/run/docker.sock -v /etc/origin:/etc/origin openshift3/ose start master api --config=${CONFIG_FILE} $OPTIONS


Systemd services created only accept  $OPTIONS 

In order for Proxy variables to get set for the node.controller,or api workaround using openshift-master-api as an example. 

ExecStart=/usr/bin/docker run --rm --privileged --net=host --name atomic-openshift-master-api -v /var/lib/origin:/var/lib/origin -v /var/run/docker.sock:/var/run/docker.sock -v /etc/origin:/etc/origin openshift3/ose start master api --config=${CONFIG_FILE} $OPTIONS  -e HTTP_PROXY=${HTTP_PROXY} -e HTTPS_PROXY=${HTTPS_PROXY}  -e NO_PROXY=${NO_PROXY}

Comment 2 Scott Dodson 2016-03-16 15:55:22 UTC
Proposed fix is to pass in environment file via --env-file flag to docker run
https://github.com/openshift/openshift-ansible/pull/1624

To merge this into your installer to test :
git pull https://github.com/sdodson/openshift-ansible bz1317975

Comment 4 Gan Huang 2016-03-18 11:10:30 UTC
Verified with openshift-ansible-3.0.61-1.git.0.8150c45.el7.noarch

Test env:container + RHEL72 + 1 master + 1 node
Config http proxy, https proxy, no_proxy after installation.
Check master and node container:
[root@10 ~]# ps -ef |grep docker |grep master
root     19984     1  0 05:57 ?        00:00:00 /usr/bin/docker run --rm --privileged --net=host --name atomic-openshift-master --env-file=/etc/sysconfig/atomic-openshift-master -v /var/lib/origin:/var/lib/origin -v /var/run/docker.sock:/var/run/docker.sock -v /etc/origin:/etc/origin openshift3/ose start master --config=/etc/origin/master/master-config.yaml --loglevel=5

Sti build success.
Move it to verified.

Comment 6 errata-xmlrpc 2016-05-12 16:38:43 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:1065


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