Bug 1371787 - The bundled django-psql-example template should not use RH PyPi mirror for Python packages.
Summary: The bundled django-psql-example template should not use RH PyPi mirror for Py...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Templates
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Vu Dinh
QA Contact: XiuJuan Wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-31 06:21 UTC by Graham Dumpleton
Modified: 2016-10-04 13:07 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-04 13:07:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Graham Dumpleton 2016-08-31 06:21:36 UTC
Attempts to deploy using the django-psql-example template on OpenShift Online developer preview are failing due to issues with the RH PyPi mirror for Python packages. Build logs fail with errors:

---> Installing dependencies ...
E0831 02:15:12.016248       1 util.go:91] You are using pip version 7.1.0, however version 8.1.2 is available.
E0831 02:15:12.016331       1 util.go:91] You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting django<1.9,>=1.8 (from -r requirements.txt (line 1))
E0831 02:15:12.190161       1 util.go:91]   DEPRECATION: Failed to find 'django' at https://mirror.openshift.com/mirror/python/web/simple/django/. It is suggested to upgrade your index to support normalized names as the name in /simple/{name}.
E0831 02:15:12.223421       1 util.go:91]   Cannot fetch index base URL https://mirror.openshift.com/mirror/python/web/simple/
E0831 02:15:12.256771       1 util.go:91]   Could not find a version that satisfies the requirement django<1.9,>=1.8 (from -r requirements.txt (line 1)) (from versions: )
E0831 02:15:12.258171       1 util.go:91] No matching distribution found for django<1.9,>=1.8 (from -r requirements.txt (line 1))
I0831 02:15:12.860934       1 cleanup.go:23] Removing temporary directory /tmp/s2i-build793213232
I0831 02:15:12.860975       1 fs.go:156] Removing directory '/tmp/s2i-build793213232'
F0831 02:15:12.863772       1 builder.go:204] Error: build error: non-zero (13) exit code from registry.access.redhat.com/rhscl/python-35-rhel7:latest

The ops teams has indicated that the RH PyPi mirror should not be used with OpenShift 3. The use of the mirror in the django-psql-template loaded into OpenShift Online should be removed. This is done by dropping the default value for the PIP_INDEX_URL template parameter.

    {
      "name": "PIP_INDEX_URL",
      "displayName": "Custom PyPi Index URL",
      "description": "The custom PyPi index URL",
      "value": ""
    }

This parameter value is empty in OpenShift Origin GitHub repository sample file as external parties shouldn't be using the RH mirror. So presuming that this template is modified when being added to OpenShift Online developer preview to add the value. Thus reporting this issue here and not against upstream OpenShift Origin, even though that may be where template originated in the first place.

Comment 3 Vu Dinh 2016-09-19 13:29:00 UTC
Please ignore my previous comment as it is intended for a different bug (wrong post, sorry!). We already fixed this issue as the Ops mirror for PyPi has been removed from the template. However, the PROD cluster hasn't been updated as it is still in progress.

Thanks,
Vu

Comment 4 Abhishek Gupta 2016-09-20 23:22:48 UTC
This has been fixed in devpreview STG

Comment 5 Bing Li 2016-09-21 06:07:08 UTC
"django-psql-example" template works fine now in dev-preview-stg, and the default value of parameter PIP_INDEX_URL has been removed.

$ oc get template django-psql-example -n openshift -o json
....
                "strategy": {
                    "type": "Source",
                    "sourceStrategy": {
                        "from": {
                            "kind": "ImageStreamTag",
                            "namespace": "openshift",
                            "name": "python:3.5"
                        },
                        "env": [
                            {
                                "name": "PIP_INDEX_URL",
                                "value": "${PIP_INDEX_URL}"
                            }
                        ]
                    }
                },
....
        {
            "name": "PIP_INDEX_URL",
            "displayName": "Custom PyPi Index URL",
            "description": "The custom PyPi index URL"
        }
....

Move to verified.


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