Bug 1414268 - The environment variable:REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_MIRRORPULLTHROUTH can't override the configuration option
Summary: The environment variable:REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_MIRRORPULLT...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Michal Minar
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-18 08:45 UTC by zhou ying
Modified: 2017-02-28 06:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-01 12:12:50 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description zhou ying 2017-01-18 08:45:31 UTC
Description of problem:
On the configuration option the mirrorpullthrough is true, when set environment variable REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_MIRRORPULLTHROUTH=false , the environment variable can't override the configuration option

Version-Release number of selected component (if applicable):
openshift version
openshift v3.5.0.5+8f2840d
kubernetes v1.5.2+43a9be4
etcd 3.1.0-rc.0


How reproducible:
always

Steps to Reproduce:
1. Create registry with  config file that  mirrorpullthrough = true:
version: 0.1
log:
  level: debug
http:
  addr: :5000
  cache:
    blobdescriptor: inmemory
  filesystem:
  delete:
    enabled: true
auth:
  openshift:
    realm: openshift

    # tokenrealm is a base URL to use for the token-granting registry endpoint.
    # If unspecified, the scheme and host for the token redirect are determined from the incoming request.
    # If specified, a scheme and host must be chosen that all registry clients can resolve and access:
    #
    # tokenrealm: https://example.com:5000
middleware:  
  registry:
    - name: openshift
  repository:
    - name: openshift
      options:
        acceptschema2: false
        pullthrough: true
        mirrorpullthrough: true
        enforcequota: false
        projectcachettl: 1m
        blobrepositorycachettl: 10m
  storage:
    - name: openshift

2. Set environment variable:REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_MIRRORPULLTHROUTH=false
  `oc env dc/docker-registry REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_MIRRORPULLTHROUTH=false`
3. Deploy the docker-registry and check the mirrorpullthrough function.

Actual results:
3. The environment variable can't override the configuration option



Expected results:
3. The environment variable should  override the configuration option


Additional info:

Comment 1 Michal Fojtik 2017-02-01 09:56:48 UTC
I think the correct variable name should be:

'REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_MIRRORPULLTHROUGH'

Can you check if that helps?

Comment 2 zhou ying 2017-02-28 06:08:05 UTC
yes, the variable is 'REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_MIRRORPULLTHROUGH'


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