Bug 1739247 - [v2v] Pre/post-migration playbook launch overrides Ansible Playbook service template credential
Summary: [v2v] Pre/post-migration playbook launch overrides Ansible Playbook service t...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.11.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: GA
: 5.11.0
Assignee: Fabien Dupont
QA Contact: Yadnyawalk Tale
Red Hat CloudForms Documentation
URL:
Whiteboard: v2v
Depends On:
Blocks: 1739487 1772641
TreeView+ depends on / blocked
 
Reported: 2019-08-08 20:25 UTC by Fabien Dupont
Modified: 2019-12-13 14:55 UTC (History)
5 users (show)

Fixed In Version: 5.11.0.21
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1772641 (view as bug list)
Environment:
Last Closed: 2019-12-13 14:55:23 UTC
Category: ---
Cloudforms Team: V2V
Target Upstream Version:
Embargoed:
mfeifer: mirror+


Attachments (Terms of Use)

Description Fabien Dupont 2019-08-08 20:25:17 UTC
Description of problem:

When configuring a Migration Plan with pre or post-migration playbook, the credential set on the Ansible Playbook service template is overriden by an empty string. This leads to not passing the credential to Ansible Runner and to failing the playbook execution.

How reproducible: 100%

Steps to Reproduce:
1. Create an Ansible Playbook service template with valid credential
2. Create a migration plan using the service template as pre-migration playbook
3. Start the migration plan

Actual results: The playbook fails with host unreachable

Expected results: The playbook succeeds

Additional info:

When watching the Ansible Runner execution, we can see that the file /tmp/ansible-runnner*/env/passwords is not created.

Comment 5 CFME Bot 2019-08-16 14:27:38 UTC
New commit detected on ManageIQ/manageiq-automation_engine/ivanchuk:

https://github.com/ManageIQ/manageiq-automation_engine/commit/c85a21aeae52c1c96bfffc0e103d8958e253ad57
commit c85a21aeae52c1c96bfffc0e103d8958e253ad57
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Tue Aug 13 09:20:24 2019 -0400
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Tue Aug 13 09:20:24 2019 -0400

    Merge pull request #348 from fdupont-redhat/override_equality_comparison_method

    Override equality comparison method for MiqAeServiceModelBase

    (cherry picked from commit 0c498633308578ba84bfb52328234db1ece7c659)

    https://bugzilla.redhat.com/show_bug.cgi?id=1739247

 lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb | 4 +
 1 file changed, 4 insertions(+)

Comment 6 CFME Bot 2019-08-16 14:31:58 UTC
New commit detected on ManageIQ/manageiq-content/ivanchuk:

https://github.com/ManageIQ/manageiq-content/commit/70c5f459f954f96277920fd073ea43901b303f80
commit 70c5f459f954f96277920fd073ea43901b303f80
Author:     tina <tfitzger>
AuthorDate: Tue Aug 13 13:18:34 2019 -0400
Commit:     tina <tfitzger>
CommitDate: Tue Aug 13 13:18:34 2019 -0400

    Merge pull request #559 from fdupont-redhat/v2v_fix_launch_ansible_playbook_credentials

    [Transformation][AnsiblePlaybook] Send service_template credential id as part of service dialog

    (cherry picked from commit a2fb8c8192327d7a60697fc829b28777f9aa7ca8)

    https://bugzilla.redhat.com/show_bug.cgi?id=1739247

 content/automate/ManageIQ/Transformation/Ansible.class/__methods__/launchplaybookasaservice.rb | 5 +-
 spec/content/automate/ManageIQ/Transformation/Ansible.class/__methods__/launchplaybookasaservice_spec.rb | 131 +
 2 files changed, 135 insertions(+), 1 deletion(-)

Comment 7 Yadnyawalk Tale 2019-08-28 15:06:30 UTC
Playbook worked so fixed in 5.11.0.21.

Comment 8 Fabien Dupont 2019-11-14 18:27:18 UTC
It would be great to backport it to CFME 5.10

Comment 9 Sudhir Mallamprabhakara 2019-11-14 19:14:16 UTC
ack for back port into 5.10.z.


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