Bug 1548562

Summary: [Embedded Ansible] Ansible Service does not pick up credentials from Service Dialog instead uses default credentials
Product: Red Hat CloudForms Management Engine Reporter: Kedar Kulkarni <kkulkarn>
Component: AutomateAssignee: Drew Bomhof <dbomhof>
Status: CLOSED CURRENTRELEASE QA Contact: Kedar Kulkarni <kkulkarn>
Severity: high Docs Contact:
Priority: high    
Version: 5.9.0CC: cpelland, dmetzger, eclarizi, ekin.meroglu, gmccullo, hkataria, lavenel, mkanoor, mpovolny, obarenbo, pakotvan, simaishi, tfitzger
Target Milestone: GAKeywords: Regression, TestOnly, ZStream
Target Release: 5.10.0Flags: kkulkarn: automate_bug+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ansible_embed
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1553484 (view as bug list) Environment:
Last Closed: 2019-02-11 14:07:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1553484    

Description Kedar Kulkarni 2018-02-23 20:56:06 UTC
Description of problem:
Ansible Service does not pick up credentials from Service Dialog instead uses default credentials which were set at the time of Service Catalog Item created. This problem is persistent in both OPS UI and Service UI. 

Version-Release number of selected component (if applicable):
5.9.0.22

How reproducible:
100%

Steps to Reproduce:
1.Enable Embedded Ansible Role
2.Add Ansible Playbooks Repository 
3.Add Credentials (let's say machine credentials)
4.Create a service catalog and catalog item for the ansible playbook 
5.Choose CFME Default Credentials or Machine credentials at the time of catalog item creation 
6.Try to order the service and choose the credentials from the dropdown which were not default for that service catalog item per step 5

Actual results:
Service will be ordered with the default credentials set as per step 5 in the reproduction steps and the credentials you selected at the time of ordering the service will be ignored

Expected results:
Credentials you selected should be used to order the service and override default creds

Additional info:
Adding regression keyword since this bug appears in 5.9 but this feature worked up until 5.8.3.4

Comment 3 Kedar Kulkarni 2018-02-23 21:35:35 UTC
On 5.9.0.21 - It was also same, for OPS UI. And for Service UI, credentials dropdown was shown differently, with credential IDs and not with names and empty entries, and it would fail no matter what you chose. 

On 5.9.0.20- Feature worked correctly. It would use credentials selected in the dialog correctly to order service.

Comment 4 Greg McCullough 2018-02-26 16:28:18 UTC
Drew - Please sync up with Erik on this issue.  There are other dialog issues in this same area.

Comment 5 eclarizi 2018-02-26 23:48:25 UTC
This is resolved by https://github.com/ManageIQ/ui-components/pull/258, which currently has two supporting PRs out to be backported:
classic ui: https://github.com/ManageIQ/manageiq-ui-classic/pull/3451
service ui: https://github.com/ManageIQ/manageiq-ui-service/pull/1389

Comment 6 Drew Bomhof 2018-03-06 16:38:18 UTC
*** Bug 1550179 has been marked as a duplicate of this bug. ***

Comment 8 Kedar Kulkarni 2018-07-02 18:15:52 UTC
on 5.10.0.2 I observed that ansible services take correct credentials into account. Problem mentioned in the comment 1 does not persist anymore.