Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1340511

Summary: NO_PROXY setting for 172.30.x.x and 10.1.x.x CIDR values in /etc/sysconfig/docker from ansible installation
Product: OpenShift Container Platform Reporter: Shanna Chan <shchan>
Component: InstallerAssignee: Scott Dodson <sdodson>
Status: CLOSED DUPLICATE QA Contact: Ma xiaoqiang <xiama>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2.0CC: aos-bugs, bleanhar, jokerman, mmccomas, shchan, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-09 20:14:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shanna Chan 2016-05-27 15:57:13 UTC
Description of problem:
Getting Error from builder.go:204] Error: build error: Failed to push image: Error: Status 504 trying to push repository metadata.Problem when OSE is trying to push images to internal registry 172.30.x.x:5000. Getting Notification: Gateway Timeout from build log.

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

How reproducible:
ansible install did not configured the proxies correctly.
We found the issue was with the docker and setting the NO_PROXY. We copied the NO_PROXY from the atomic-openshift service and since the OpenShift now supports CIDR notation we had that for the docker as well. 
To reproduce it is to use advance installer and use the 3.2 ansible hosts proxy setting. Since the NO_PROXY in docker configure is using CIDR, it will fail 

Steps to Reproduce:
1.install with ansible hosts file with all proxy setting in the ansible file
2.Try to do a build from a Dockerfile 
3.it will fail when build is done and try to push to the internal registry

Actual results:


Expected results:

you will get an build error simular to the one below.
builder.go:204] Error: build error: Failed to push image: Error: Status 504 trying to push repository metadata/sandbox: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n<title>Notification: Gateway Timeout</title>\n\n<style type=\"text/css\">\nbody {\n font-family: Arial, Helvetica, sans-serif;\n font-size: 14px;\n color:#333333;\n background-color: #ffffff;\n}\nh1 {\n font-size: 18px;\n font-weight: bold;\n text-decoration: none;\n padding-top: 0px;\n color: #2970A6;\n}\na:link {\n color: #2970A6;\n text-decoration: none;\n}\na:hover {\n color: #2970A6;\n text-decoration: underline;\n}\np.buttonlink {\n margin-bottom: 24px;\n}\n.copyright {\n font-size: 12px;\n color: #666666;\n margin: 5px 5px 0px 30px;\n\n}\n.details {\n font-size: 14px;\n color: #969696;\n border: none;\n padding: 20px 20px 20px 20px;\n margin: 0px 10px 10px 35px;\n}\n\n.shadow {\n border: 3px solid #9f9f9f;\n padding: 10px 25px 10px 25px;\n margin: 10px 35px 0px 30px;\n background-color: #ffffff;\n width: 600px;\n\n -moz-box-shadow: 3px 3px 3px #cccccc;\n -webkit-box-shadow: 3px 3px 3px #cccccc;\n box-shadow: 3px 3px 3px #cccccc;\n /* For IE 8 */\n -ms-filter: \"progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='cccccc')\";\n /* For IE 5.5 - 7 */\n filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='cccccc');\n}\n.logo {\n border: none;\n margin: 5px 5px 0px 30px;\n}\n</style>\n\n</head>\n\n<body>\n<div class=\"logo\"></div><p>&nbsp;</p>\n<div class=\"shadow\">\n<h1>This Page Cannot Be Displayed</h1>\n\n\n<p>\nThe system cannot communicate with the external server (&nbsp;172.30.214.8&nbsp;).\nThe Internet server may be busy, may be permanently down, or may be\nunreachable because of network problems.\n</p>\n\n<p>\nPlease check the spelling of the Internet address entered.
 
\nIf it is correct, try this request later.\n</p>\n\n\n\n<p>\nIf you have questions, please contact\nyour organization's network administrator \nand
 provide the codes shown below.\n</p>\n\n</div>\n\n<div class=\"details\"><p>\nDate: Wed, 18 May 2016 23:59:14 GMT<br />\nUsername: <br />\nSource IP: 10.13.22.38<br />\nURL: PUT
http://172.30.214.8/v1/repositories/metadata/sandbox/<br />\nCategory: Uncategorized URLs<br />\nReason: UNKNOWN<br />\nNotification:
 GATEWAY_TIMEOUT\n</p></div>\n</body>\n</html>\n"

Additional info:

Comment 1 Brenton Leanhardt 2016-06-01 13:49:12 UTC
Unfortunately I think this is a known problem right now.  However, you should be able to set openshift_no_proxy in your inventory.  What that already set?

Comment 2 Brenton Leanhardt 2016-06-01 14:00:57 UTC
[Was] that already set?

:)

Comment 3 Shanna Chan 2016-06-01 20:28:18 UTC
We did change the no_proxy in docker config file's values from CIDR to the actual IPs of the registry, but it was not obvious that where the problem were (with the help with support).

Hope this will be fixed soon.

Thanks & regards,
Shanna

Comment 4 Brenton Leanhardt 2016-06-01 20:43:04 UTC
Sorry, I probably wasn't clear enough.  Is Ansible in use at all?  If so, is the openshift_no_proxy setting in the inventory?

I want to make sure that is working as expected.

Comment 5 Scott Dodson 2016-06-07 16:03:04 UTC
There's no sensible solution to performing an installation and at the same time ensuring that docker has the registry's service ip address added to its NO_PROXY list. The real solution to this is to push to the registry based on dns name and that's blocked on https://github.com/openshift/origin/issues/8581

Comment 6 Brenton Leanhardt 2016-06-09 20:14:49 UTC

*** This bug has been marked as a duplicate of bug 1242961 ***

Comment 7 Red Hat Bugzilla 2023-09-14 03:23:29 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days