Hi Gellert, Thanks for the update. Setting a needinfo, waiting for the customer to respond to question 3. Thanks, Tina
Hi Gellert, Checking to see if there is an update from the customer. Regards, Tina
We experience a problem with workspace initialization. Can I post a detailed description here? (cfme-5.9.4.7)
Patrik - I will setup a meeting to review this work with DrewB tomorrow.
David - That would explain the issue, the automate_workspace is only passed to the Automate Method Type Ansible Playbook, not to the catalog items. We will be working on changes to the module so it does not expect the workspace all the time.
Hey Drew, Greg, This is what the customer is coming back with: --- I'm using this playbook inside embedded as a method. Those are the debug variables. Base on: https://github.com/syncrou/manageiq-automate/blob/master/library/manageiq_automate.py This code will never work in line 71 because there is't variable manageiq_connection.automate_workspace. TASK [debug] ******************************************************************* ok: [localhost] => { "manageiq": { "X_MIQ_Group": "EvmGroup-super_administrator", "api_token": "a98e308f8b36fdcd115d4cb5ec99920d", "api_url": "https://10.99.16.254", "automate_workspace": "automate_workspaces/79c21887-576a-4943-bc32-5b350777e6bc", "group": "groups/99000000000002", "request_task": "requests/99000000000083/request_tasks/99000000000083", "user": "users/99000000000001" } } TASK [debug] ******************************************************************* ok: [localhost] => { "manageiq_connection": { "X_MIQ_Group": "EvmGroup-super_administrator", "token": "a98e308f8b36fdcd115d4cb5ec99920d", "url": "https://10.99.16.254" } ---
David, That is what we would expect to see passed from this code: https://github.com/ManageIQ/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_playbook_method.rb#L150-L151 The two keys are setup in extra_vars hash and populated from this code: https://github.com/ManageIQ/manageiq-automation_engine/blob/master/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_playbook_method.rb#L112-L128 This is done for backwards compatibility and the module merges the keys together in this action_plugin here: https://github.com/syncrou/manageiq-automate/blob/master/action_plugins/manageiq_automate.py#L60-L65 I would not expect their playbook to fail with the same AttributeError that was originally reported.
This BZ is resolved with https://github.com/ManageIQ/manageiq-content/pull/454. Which is already back-ported to Hammer for Bug 1626152 and labeled for Gaprindashvili. Note: The updated module will only report why it cannot run if the workspace url isn't passed. There is no way for the module to continue if it is run in the wrong context.
Can you please provide verification steps?
Billy - Based on comment #26 can you run this with the updated module in an invalid context (comment #17) so we can provide QE an idea of how the updated module will report the error condition. DrewB will be able to help you if needed.
Dmitry, You need a playbook that uses the workspace. I have a playbook in my repository that you can use: https://github.com/billfitzgerald0120/ansible_playbooks/blob/master/get_attributes.yml Verification steps: 1. Enable Embedded Ansible 2. Add Repository 3. Add a Catalog 4. Add a Catalog Item 5. Catalog Item Type -> Ansible Playbook 6. Name -> <your_name> 7. Display in Catalog -> yes 8. Select catalog -> <your_catalog> 9. Repository -> https://github.com/billfitzgerald0120/ansible_playbooks or your_repo 10. Playbook that uses the workspace -> get_attributes or your playbook 11. Machine Credential -> CFME Default Credential 12. Dialog - > Create a new one 13. Click -> Add 14. Order the Service 15. Service should fail, check evm.log for the following message: TASK [syncrou.manageiq-automate : Initialize the Workspace] ********************^M fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Required parameter 'automate_workspace' is not specified"}^M ^M Reproducer: 10.8.198.202 Billy
Verified in 5.10.0.22.20181030184024_26956a0.