Created attachment 1497694 [details] ERROR Description of problem: Starting Ansible Job from Cloudforms does not run successfully when there are spaces in VM name. CFME version: 5.9.2.4.20180501195858_35dc609 Ansible Tower: 3.2.5 with Ansible Engine 2.4.2.0 How reproducible: 100% Steps to Reproduce: 1. The design is described here: https://pemcg.gitbooks.io/mastering-automation-in-cloudforms-4-2-and-manage/content/running_an_ansible_tower_job_from_a_button/chapter.html 2. The Ansible Job is started via a button on a VMware VM. The job is transferred to the ansible tower. The job executes on ansible tower but it fails. The error message shows that spaces of the VM name lead to a wrong limit setting. Actual results: Refer to attached image: error.png Expected results: The job should work successfully even with spaces in the VM name. Additional info: - An error is triggered in CloudForms. Error occurs on ansible Tower. - This error occurs every time when running a job on a VM with spaces in its name.
Hi Imaan, In your reproducer environment, I noticed that your custom button is pointing to ConfigurationManagement instead of AutomationManagement as shown in the deprecation message below: [----] I, [2018-10-26T22:35:32.173281 #2963:c07114] INFO -- : Q-task_id([resource_action_34000000000066]) <AEMethod [/ManageIQ/ConfigurationManagement/AnsibleTower/Operations/StateMachines/Job/launch_ansible_job]> Starting [----] W, [2018-10-26T22:35:32.630109 #2963:bf8038] WARN -- : Q-task_id([resource_action_34000000000066]) <AEMethod launch_ansible_job> [DEPRECATION] This method will be deprecated. Please use similarly named method from AutomationManagement namespace. I created a tina_ansible_job_vmname domain and updated the launch_ansible_job Automate method to use the ip address instead of the name. Could you test it and let me know if it works properly? Let me know if you have any questions. Thanks, Tina
https://github.com/ManageIQ/manageiq-content/pull/458
Adding cfme-5.10 and 5.9.z flags to match changes made by bascar on 10/30.
This appears to be a more involved issue than originally anticipated. I'm going to setup a meeting to discuss possible solutions and will update the ticket with our findings. The PR in comment 4 contains more detailed information.
Hi Imaan, I'm happy to hear that the customer has implemented a work around. The issue has a wider scope than initially anticipated. I've discussed the issue with Madhu and Greg M, and plan to include a wider audience in the discussion, and will keep you updated on our progress. Thanks, Tina
Thanks, Tina for the update. Please update me if you need any help.
Hi John, There is no new information since my update in comment 10. Thanks, Tina
Hi Imaan, I'm sorry for delayed response. Tower has an inventory script that controls the Tower Cloudforms inventory. Our launch_ansible_job Automate method is responsible for setting the limit, using the vm name which matches how the Tower Cloudforms inventory is populated. Any changes to accommodate spaces in the vm name would first have to be done on the Tower Cloudforms inventory script, then the launch_ansible_job Automate method would have to be modified to match those script changes. Comment 9 indicates the customer has implemented these changes as a workaround. Thanks, Tina
This comment was flagged a spam, view the edit history to see the original text if required.