Bug 1490738 - "'openshift_hosted_registry_storage_swift_domainid' is undefined" error is seen when set openshift_hosted_registry_storage_provider to swift
Summary: "'openshift_hosted_registry_storage_swift_domainid' is undefined" error is se...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.7.0
Assignee: Scott Dodson
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-12 07:28 UTC by Johnny Liu
Modified: 2017-11-28 22:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously if the registry storage swift domain was not defined then an error was thrown. This variable is optional and the installer has been updated to correct the error.
Clone Of:
Environment:
Last Closed: 2017-11-28 22:10:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description Johnny Liu 2017-09-12 07:28:30 UTC
Description of problem:
See the following details, the error is caused by https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_hosted/templates/registry_config.j2#L56.


Version-Release number of the following components:
openshift-ansible-3.7.0-0.117.0

How reproducible:

Steps to Reproduce:
1. Set openshift_hosted_registry_storage_provider=swift in inventory host file
openshift_hosted_registry_storage_kind=object
openshift_hosted_registry_storage_provider=swift
openshift_hosted_registry_storage_swift_authurl=http://openshift-mtv2.lab.sjc.redhat.com:5000/v2.0/
openshift_hosted_registry_storage_swift_username=xxx
openshift_hosted_registry_storage_swift_password=xxx
openshift_hosted_registry_storage_swift_tenantid=xxx
openshift_hosted_registry_storage_swift_region=xxx
openshift_hosted_registry_storage_swift_container=xxx
2.Trigger installation
3.

Actual results:
Failed with the following error:
TASK [openshift_hosted : Ensure the resgistry secret exists] *******************
Tuesday 12 September 2017  06:56:34 +0000 (0:00:00.036)       0:15:28.326 ***** 
fatal: [openshift-125.lab.sjc.redhat.com]: FAILED! => {
    "failed": true
}

MSG:

the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'openshift_hosted_registry_storage_swift_domainid' is undefined

The error appears to have been in '/home/slave4/workspace/Launch Environment Flexy/private-openshift-ansible/roles/openshift_hosted/tasks/registry/storage/object_storage.yml': line 5, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Ensure the resgistry secret exists
  ^ here



Expected results:
installation should pass.

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 1 Johnny Liu 2017-09-12 07:32:24 UTC
Commit a PR to fix this bug - https://github.com/openshift/openshift-ansible/pull/5368

Comment 2 Johnny Liu 2017-09-15 02:35:33 UTC
During testing, found registry_config.j2 also have one more minor issue, openshift_hosted_registry_storage_gcs_rootdirectory does not have a default value.

Fix the minor issue in the same PR mentioned in comment 1.

Comment 4 Johnny Liu 2017-10-11 07:58:48 UTC
Verified this bug with openshift-ansible-3.7.0-0.148.0.git.0.b35eb14.el7.noarch, and PASS.

setting ansible options for swift:
openshift_hosted_registry_storage_swift_authurl=http://openshift-mtv2.lab.sjc.redhat.com:5000/v2.0/
openshift_hosted_registry_storage_swift_username=aaa
openshift_hosted_registry_storage_swift_password=bbb
openshift_hosted_registry_storage_swift_tenantid=ccc
openshift_hosted_registry_storage_swift_region=RegionOne
openshift_hosted_registry_storage_swift_container=osev3-docker-registry-data


# oc rsh docker-registry-1-rs938
sh-4.2$ env|grep config
REGISTRY_CONFIGURATION_PATH=/etc/registry/config.yml
sh-4.2$ cat /etc/registry/config.yml
version: 0.1
log:
  level: debug
http:
  addr: :5000
storage:
  delete:
    enabled: true
  cache:
    blobdescriptor: inmemory
  swift:
    authurl: http://openshift-mtv2.lab.sjc.redhat.com:5000/v2.0/
    username: aaa
    password: bbb
    container: osev3-docker-registry-data
    region: RegionOne
    tenantid: ccc
auth:
  openshift:
    realm: openshift
middleware:
  registry:
  - name: openshift
  repository:
  - name: openshift
    options:
      pullthrough: True
      acceptschema2: True
      enforcequota: False
  storage:
  - name: openshift

Comment 8 errata-xmlrpc 2017-11-28 22:10:32 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/RHSA-2017:3188


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