Bug 1392859 - [3.2.1] docker-registry which used S3 backend storage failed to start when installer used environment variables as AWS keys
Summary: [3.2.1] docker-registry which used S3 backend storage failed to start when in...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.2.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.7.0
Assignee: Scott Dodson
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-08 11:34 UTC by Gan Huang
Modified: 2017-08-24 18:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-24 18:44:22 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Gan Huang 2016-11-08 11:34:39 UTC
Description of problem:
docker-registry which used S3 backend storage failed to start when installer used environment variables as AWS keys

Version-Release number of selected component (if applicable):
openshift-ansible-3.2.39-1.git.0.2c9adff.el7.noarch.rpm

How reproducible:
always

Steps to Reproduce:
1.#cat hosts
<--snip-->
openshift_cloudprovider_kind=aws
openshift_cloudprovider_aws_access_key="{{ lookup('env','AWS_ACCESS_KEY_ID') }}"
openshift_cloudprovider_aws_secret_key="{{ lookup('env','AWS_SECRET_ACCESS_KEY') }}"
openshift_hosted_registry_storage_kind=object
openshift_hosted_registry_storage_provider=s3
openshift_hosted_registry_storage_s3_accesskey={{ lookup('env','AWS_ACCESS_KEY_ID') }}
openshift_hosted_registry_storage_s3_secretkey={{ lookup('env','AWS_SECRET_ACCESS_KEY') }}
openshift_hosted_registry_storage_s3_bucket=openshift-qe-registry-testing-bucket1
openshift_hosted_registry_storage_s3_region=us-east-1

<--snip-->
2.
3.

Actual results:
# oc get pod

NAME                       READY     STATUS             RESTARTS   AGE
docker-registry-1-deploy   0/1       DeadlineExceeded   0          48m
docker-registry-2-deploy   0/1       Error              0          46m
docker-registry-3-deploy   1/1       Running            0          12s
docker-registry-3-vbbyt    0/1       CrashLoopBackOff   1          9s
router-1-8qjez             1/1       Running            0          46m

# oc logs docker-registry-3-vbbyt
time="2016-11-08T04:13:35-05:00" level=fatal msg="Error parsing configuration file: yaml: line 12: did not find expected ',' or '}'" 

sh-4.2$ cat /etc/registry/config.yml
version: 0.1
log:
  level: debug
http:
  addr: :5000
storage:
  cache:
    blobdescriptor: inmemory
  s3:
    accesskey: {# lookup('env','AWS_ACCESS_KEY_ID') #}
    secretkey: {# lookup('env','AWS_SECRET_ACCESS_KEY') #}
    region: us-east-1
    bucket: openshift-qe-registry-testing-bucket1
    encrypt: false
    secure: true
    v4auth: true
    rootdirectory: /registry
    chunksize: "26214400"
auth:
  openshift:
    realm: openshift
middleware:
  repository:
  - name: openshift
    options:
      pullthrough: True


Expected results:


Additional info:
3.4 installer has no such issues.

Comment 1 Scott Dodson 2017-08-24 18:44:22 UTC
The workaround is to simply set the variables to actual values.


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