Bug 1504231

Summary: Ansible Tower: Value entered in "Limit" option while ordering Tower Service is Ignored during execution
Product: Red Hat CloudForms Management Engine Reporter: Kedar Kulkarni <kkulkarn>
Component: DocumentationAssignee: Red Hat CloudForms Documentation <cloudforms-docs>
Status: CLOSED WONTFIX QA Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.9.0CC: dvoss, hhudgeon, hkataria, jhardy, kkulkarn, lcouzens, mkanoor, mpovolny, obarenbo, pakotvan, smallamp, tfitzger, wfitzger
Target Milestone: GAFlags: kkulkarn: automate_bug-
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-19 15:46:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Ansible Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshot
none
Enable Prompt on Launch
none
Prompt on launch items needed
none
Ansible Tower and Embedded Comparison none

Description Kedar Kulkarni 2017-10-19 18:30:18 UTC
Created attachment 1340883 [details]
Screenshot

Description of problem:
When you order an Ansible Tower Service, no matter what you write in "Limit" Field, Ansible Tower executes the job against entire inventory. That means value from "Limit" field is not passed correctly to the tower while job is invoked.

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

How reproducible:
100%

Steps to Reproduce:
1.Add Ansible Tower provider
2.Create a Dialog from Tower Job Template
3.Use this Dialog to create a service of type "Ansible Tower" 
4. Order the service, provide IP address/pattern to match VM from your Inventory ( refer screenshot ) 
5. Submit the job

Actual results:
Job executes against the entire Inventory

Expected results:
Job should filter out inventory based on "Limit" and execute against selected VMs only.

Additional info:
Assigning "high" severity because a customer using this functionality could believe "Limit" field would work, and he will end up executing the play against entire inventory which could result in disaster for their environment.

Comment 2 Kedar Kulkarni 2017-10-19 18:55:44 UTC
This bug also affects SSUI, should I open a separate BZ for that ?

Comment 3 Dan Clarizio 2017-10-20 21:37:15 UTC
Kedar, I would say no to opening another issue until we find out if this is a back end issue that affects both UIs.  I'm sending this to the automate team to find that out.

Comment 8 mkanoor 2017-11-15 23:08:10 UTC
Can you enable the Prompt on Launch for your job templates on the tower.

Comment 9 mkanoor 2017-11-15 23:09:36 UTC
Created attachment 1353093 [details]
Enable Prompt on Launch

Comment 10 William Fitzgerald 2017-11-15 23:10:31 UTC
Created attachment 1353095 [details]
Prompt on launch items needed

Comment 12 William Fitzgerald 2017-11-16 00:55:50 UTC
Kedar,

Changed dialog back to just limit.

Enabled prompt on launch for limit and extra vars and this fixed this in environment.
See job 832.

Let me know if you have any questions.

Can we close this?

Thanks

Billy

Comment 13 Kedar Kulkarni 2017-11-16 14:14:42 UTC
Hey Billy,

So the problem was "Marking Limit Field Required in the Tower Template" so that value sent through CFME is accepted by tower for Limit, is that correct? 

If so, do we have any documentation where we can mention this? Because end-user may also miss this checkbox in the tower job template and we may see another bug opened by customers. 

Can we reassign this to Documentation team or Dan, so Dan can assign it to Documentation team?

Please let me know thanks.

Comment 14 William Fitzgerald 2017-11-16 17:32:08 UTC
We need to make sure that we document that the "prompt on launch" boxes must be checked for limit and extra vars when using External Ansible Tower.  
See Prompt on launch Screenshot.

Thanks

Billy

Comment 15 William Fitzgerald 2017-11-16 17:54:52 UTC
Created attachment 1353640 [details]
Ansible Tower and Embedded Comparison

Hopefully this will help with the documentation.