Bug 1589134
Summary: | openshift-ansible 'dict object' crd has no attribute 'metadata' | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Matt Bruzek <mbruzek> |
Component: | Service Broker | Assignee: | Fabian von Feilitzsch <fabian> |
Status: | CLOSED ERRATA | QA Contact: | Zihan Tang <zitang> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.10.0 | CC: | aos-bugs, chezhang, jiazha, jmatthew, jmencak, jmontleo, jokerman, mbruzek, mifiedle, mmccomas, zhsun |
Target Milestone: | --- | ||
Target Release: | 3.10.z | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | aos-scalability-310 | ||
Fixed In Version: | Doc Type: | No Doc Update | |
Doc Text: |
undefined
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2018-07-30 19:17:50 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Matt Bruzek
2018-06-08 13:11:45 UTC
I wrote a small ansible playbook to test this code and the 3 files exist and all have metadata keys. http://pastebin.test.redhat.com/601164 Is it possible that the working directory is not relative to the ansible_service_broker directory? In this case I ran the test program from: /home/cloud-user/openshift-ansible/roles/ansible_service_broker I redeployed this same thing in CI and it failed with the exact same message: The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'metadata' The error appears to have been in '/home/cloud-user/openshift-ansible/roles/ansible_service_broker/tasks/install.yml': line 119, column 3, but may be elsewhere in the file depending on the exact syntax problem. Where did openshift-ansible-3.10.0-0.63.0-17-g37e2c16 come from? Is this an upstream package? Could we have an update on the question asked in comment #5? We were unable to reproduce this issue with our testing and we are unsure where the referenced RPM came from, it sounds like this issue is related to using a bad RPM build. It may be an issue with the symlink in the openstack playbook directory, Scott posted a possible fix here: https://github.com/openshift/openshift-ansible/pull/8853 Moving to 3.10.z based on limited scope. Our latest install generated this exact problem again. I was able to verify that the change in PR 8853 existed on the system. $ ls -al playbooks/openstack/openshift-cluster/roles lrwxrwxrwx. 1 cloud-user cloud-user 14 Jun 25 11:35 playbooks/openstack/openshift-cluster/roles -> ../../../roles $ git describe v3.10.0-rc.0-79-g60cbc1c We are using the 3.10 branch $ git status # On branch release-3.10 Error message: TASK [ansible_service_broker : Create custom resource definitions for asb] ***** task path: /home/cloud-user/openshift-ansible/roles/ansible_service_broker/tasks/install.yml:119 Monday 25 June 2018 11:55:34 -0400 (0:00:00.053) 0:17:42.243 *********** fatal: [master-0.scale-ci.example.com]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'metadata'\n\nThe error appears to have been in '/home/cloud-user/openshift-ansible/roles/ansible_service_broker/tasks/install.yml': line 119, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create custom resource definitions for asb\n ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has no attribute 'metadata'" } Looks like the 'crd' variable in the ansible_service_broker was colliding with a variable cluster monitoring operator command that was being run earlier. https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_cluster_monitoring_operator/tasks/install.yaml#L70 The fix involves renaming the variable in the ansible_service_broker role. Commits pushed to master at https://github.com/openshift/openshift-ansible https://github.com/openshift/openshift-ansible/commit/b0fa03265f84cbafcf4f20c03586a7da7d66726b Bug 1589134- Namespace the CRD variable to prevent collision https://github.com/openshift/openshift-ansible/commit/ffab936876043ef4cf4abafb2f9bcbd8f605ba78 Merge pull request #8965 from fabianvf/bz1589134 Bug 1589134- Namespace the CRD variable to prevent collision I was able to give the installer another go after these changes landed. I can attest that these PRs fixed the problem I originally reported! according to #comment 15, this is fixed. and I use openshift-ansible-3.10.15 to do regression, install succeed, CRDs are created. so mark it as VERIFIED. 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/RHBA-2018:1816 |