Bug 1730311
Summary: | The embedded Ansible manageiq-automate role's 'get_attribute' task fails to return some state machine attributes | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Peter McGowan <pmcgowan> | ||||||
Component: | Automate | Assignee: | Drew Bomhof <dbomhof> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Gaurav Talreja <gtalreja> | ||||||
Severity: | high | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | ||||||
Priority: | high | ||||||||
Version: | 5.10.6 | CC: | dbomhof, dmetzger, gmccullo, gtalreja, jocarter, jprause, mfeifer, mkanoor, obarenbo, simaishi, tfitzger, wfitzger | ||||||
Target Milestone: | GA | ||||||||
Target Release: | 5.11.0 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | 5.11.0.23 | Doc Type: | If docs needed, set a value | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2019-12-12 13:36:50 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | Bug | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | CFME Core | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Reproduced on appliance: 10.8.99.177 Hi Josh, After further investigation, this issue does not appear to be a regression. Thanks, Tina PR: Manageiq-content: https://github.com/ManageIQ/manageiq-content/pull/555 New commit detected on ManageIQ/manageiq-content/ivanchuk: https://github.com/ManageIQ/manageiq-content/commit/959321e68f078a91315385acdd25a5d9aea5adb0 commit 959321e68f078a91315385acdd25a5d9aea5adb0 Author: tina <tfitzger> AuthorDate: Fri Aug 2 16:18:42 2019 -0400 Commit: tina <tfitzger> CommitDate: Fri Aug 2 16:18:42 2019 -0400 Merge pull request #555 from syncrou/wrap_all_values_in_quotes manageiq-core.manageiq-automate Wrap all values in quotes (cherry picked from commit f0bf90e63d9baa19c9392995b73b99cd0223f0cd) https://bugzilla.redhat.com/show_bug.cgi?id=1730311 content/ansible/roles/manageiq-core.manageiq-automate/library/manageiq_automate.py | 8 +- 1 file changed, 7 insertions(+), 1 deletion(-) Created attachment 1606057 [details]
Automate domain containing state machine to reproduce problem
Hi Satajit, The fix presented in https://github.com/ManageIQ/manageiq-content/pull/555 was a fix for the version of the module that ships with the appliance. The test you ran was against the galaxy version of the module: https://galaxy.ansible.com/syncrou/manageiq-automate This PR fixes the Galaxy version ( tested in the playbook above https://bugzilla.redhat.com/show_bug.cgi?id=1730311#c8 ) PR: https://github.com/syncrou/manageiq-automate/pull/8 Hi, sorry I might have confused things. It's also failing to retrieve the ae_next_state attribute on the CFME 5.11.0.19 build with the supplied manageiq-core.manageiq-automate role. Hi Peter, This case where ae_next_state is not showing up in the attributes list is an edge case. The original request of this BZ has been resolved to my knowledge. My suggestion is to create a new BZ for this edge case and allow this BZ to be finished per the original request. Please disregard comment 20, it was added in error. New commit detected on ManageIQ/manageiq-content/ivanchuk: https://github.com/ManageIQ/manageiq-content/commit/62108090eb401134c86ba9efa28795e5f710a374 commit 62108090eb401134c86ba9efa28795e5f710a374 Author: Madhu Kanoor <mkanoor> AuthorDate: Tue Sep 3 12:00:18 2019 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Tue Sep 3 12:00:18 2019 -0400 Merge pull request #571 from syncrou/allow_nulls_in_exist Allow for nulls in the exists method (cherry picked from commit 2c6c747a81a15cb7b9667644dcb4abff91d7a7c1) https://bugzilla.redhat.com/show_bug.cgi?id=1730311 content/ansible/roles/manageiq-core.manageiq-automate/library/manageiq_automate.py | 15 +- 1 file changed, 7 insertions(+), 8 deletions(-) As per comment 24 I don't see any attribute is missing. Verified Version: 5.11.0.23.20190904213640_d113674 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-2019:4199 |
Created attachment 1591032 [details] Playbook to reproduce the problem Description of problem: The manager-automate role's 'get_attribute' task fails to collect the values of the ae_state_max_retries, ae_retry_server_affinity, ae_next_state or ae_state_retries root attributes if the playbook is run from a state machine. The 'get_object_attribute_names' task does however list these as valid root attributes. The attached playbook illustrates the problem. Version-Release number of selected component (if applicable): 5.10.6 How reproducible: Every time Steps to Reproduce: 1. Add the attached spreadsheet to an Ansible repository, sync the repository with a CloudForms appliance running the embeddedd Ansible role 2. Create a playbook method from the playbook. Ensure that the method has a boolean input parameter of 'manageiq_validate_certs' with value 'False', that logging is set to 'Always', and TTL to 5. 3. Call the playbook method from a state in a state machine. Actual results: The output from the playbook's tasks are as follows: TASK [Get the list of root object attribute names (get_object_attribute_names)] *** ok: [localhost] TASK [debug] ******************************************************************* ok: [localhost] => { "msg": "Result:[u'ae_result', u'ae_state_max_retries', u'ae_state_started', u'ae_retry_server_affinity', u'message', u'ae_provider_category', u'user_id', u'miq_server', u'ae_state_step', u'namespace', u'ae_state', u'instance', u'object_name', u'miq_server_id', u'user', u'miq_group', u'ae_next_state', u'class', u'tenant', u'ae_state_retries', u'request', u'ae_status_state']" } ^^^ Here we can see that the four attributes are listed as existing. TASK [Get each of the root object's attributes (get_attribute)] **************** ok: [localhost] => (item=ae_result) failed: [localhost] (item=ae_state_max_retries) => {"changed": false, "item": "ae_state_max_retries", "msg": "Object root Attribute ae_state_max_retries does not exist"} ok: [localhost] => (item=ae_state_started) failed: [localhost] (item=ae_retry_server_affinity) => {"changed": false, "item": "ae_retry_server_affinity", "msg": "Object root Attribute ae_retry_server_affinity does not exist"} ok: [localhost] => (item=message) ok: [localhost] => (item=ae_provider_category) ok: [localhost] => (item=user_id) ok: [localhost] => (item=miq_server) ok: [localhost] => (item=ae_state_step) ok: [localhost] => (item=namespace) ok: [localhost] => (item=ae_state) ok: [localhost] => (item=instance) ok: [localhost] => (item=object_name) ok: [localhost] => (item=miq_server_id) ok: [localhost] => (item=user) ok: [localhost] => (item=miq_group) failed: [localhost] (item=ae_next_state) => {"changed": false, "item": "ae_next_state", "msg": "Object root Attribute ae_next_state does not exist"} ok: [localhost] => (item=class) ok: [localhost] => (item=tenant) failed: [localhost] (item=ae_state_retries) => {"changed": false, "item": "ae_state_retries", "msg": "Object root Attribute ae_state_retries does not exist"} ok: [localhost] => (item=request) ok: [localhost] => (item=ae_status_state) ...ignoring ^^^ Here we can see that all attributes except the four mentioned are returned successfully. Expected results: Any root attribute returned by the 'get_object_attribute_names' task should be retrievable by the 'get_attribute' task. Additional info: