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
Commit a PR to fix this bug - https://github.com/openshift/openshift-ansible/pull/5368
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.
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
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