| Summary: | [CFME 5.7 RC1] When running an Ansible Tower job the :limit switch is not taking effect in Tower | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Peter McGowan <pmcgowan> | ||||||
| Component: | Providers | Assignee: | Brandon Dunne <bdunne> | ||||||
| Status: | CLOSED NOTABUG | QA Contact: | Pavol Kotvan <pakotvan> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | high | ||||||||
| Version: | 5.7.0 | CC: | cpelland, dajohnso, jfrey, jhardy, obarenbo, pmcgowan | ||||||
| Target Milestone: | GA | Keywords: | Regression | ||||||
| Target Release: | cfme-future | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | tower | ||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2016-11-30 18:50:15 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Attachments: |
|
||||||||
Created attachment 1224804 [details]
Tower screenshot when job submitted from CFME 5.7
Is the Job Template in Ansible Tower set to "Prompt on launch" for the limit? If not, Tower will ignore the limit that we pass along. I tested against my Ansible Tower v3 system and it works as expected. - Job Template without "prompt on launch" for the limit runs with whatever limit the Job Template is configured with by default. - Job Template with "prompt on launch" for the limit runs with whatever limit we send via API. I believe this change was introduced in Ansible Tower 3.0 for security reasons. Aah, no the "Prompt on launch" for the limit wasn't set (it was just set for the extra variables). If I set this then it all works as expected. Something seems to have changed between CFME 5.6 and 5.6 to require this setting, but maybe we just need to document this behavioural change in the release notes. We have a workaround in the ansible_tower_client gem where we change the limit on the Job Template, launch a Job, then revert the change to the Job Template. That is necessary for Ansible Tower v2 since launch doesn't support passing the limit, but that changed in Ansible Tower v3 and we no longer need that workaround, so it was made conditional. |
Created attachment 1224803 [details] Tower screenshot when job submitted from CFME 5.6 Description of problem: With CFME 5.7 RC1, if I submit a job to Ansible tower containing a limit value, the limit seems to be ignored by Tower. Submitting the exact same job with the same parameters from CFME 5.6 works fine. automation.log shows that launch_ansible_job has processed the limit switch correctly: [----] I, [2016-11-27T11:17:02.671648 #3103:d41d68] INFO -- : Q-task_id([resource_action_184]) <AEMethod launch_ansible_job> Job Arguments {:extra_vars=>{"package_name"=>"vim-enhanced"}, :limit=>"count-test001"} [----] I, [2016-11-27T11:17:04.473601 #3103:d41d68] INFO -- : Q-task_id([resource_action_184]) <AEMethod launch_ansible_job> Scheduled Job ID: 7 Ansible Job ID: 181 I would imagine that something has changed in the parameters made in the API call to Tower. Version-Release number of selected component (if applicable): CFME 5.7.0.11-rc1.20161115160629_46cf4f1 Ansible Tower 3.0.2 How reproducible: Every time Steps to Reproduce: 1. Add an Ansible provider, containing a simple job template 2. Create a button in CFME on a VM WebUI object to launch the Ansible job template 3. Observe in automate.log the correct limit switch being passed, with the name of the VM whose WebUI details were displayed when the button was triggered. Actual results: Observe the job being run in Tower against the entire inventory, not just the VM passed with the limit switch. Expected results: The job should be run with a limit switch in Tower. Additional info: This is also reproducible from ManageIQ master. Screenshots show the same job template being run against the same VM from identical buttons on CFME 5.6 and 5.7. The 5.6 screenshot shows a limit switch being applied, whereas in the 5.7 screenshot this is missing.