Bug 1643467 - Starting Ansible Job from Cloudforms does not run successfully when there are spaces in VM name.
Summary: Starting Ansible Job from Cloudforms does not run successfully when there are...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Documentation
Version: 5.9.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.11.0
Assignee: Red Hat CloudForms Documentation
QA Contact: Nandini Chandra
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1622587
TreeView+ depends on / blocked
 
Reported: 2018-10-26 10:24 UTC by Imaan
Modified: 2023-03-24 14:19 UTC (History)
21 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-14 18:48:57 UTC
Category: ---
Cloudforms Team: Documentation
Target Upstream Version:
Embargoed:
mfeifer: mirror+


Attachments (Terms of Use)
ERROR (71.68 KB, image/png)
2018-10-26 10:24 UTC, Imaan
no flags Details

Description Imaan 2018-10-26 10:24:00 UTC
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.

Comment 3 Tina Fitzgerald 2018-10-26 18:27:11 UTC
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

Comment 5 Greg McCullough 2018-10-31 20:42:55 UTC
Adding cfme-5.10 and 5.9.z flags to match changes made by bascar on 10/30.

Comment 7 Tina Fitzgerald 2018-11-08 19:14:15 UTC
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.

Comment 10 Tina Fitzgerald 2018-11-20 20:00:43 UTC
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

Comment 11 Imaan 2018-11-21 08:35:35 UTC
Thanks, Tina for the update.

Please update me if you need any help.

Comment 13 Tina Fitzgerald 2018-11-27 19:56:44 UTC
Hi John,

There is no new information since my update in comment 10.

Thanks,
Tina

Comment 15 Tina Fitzgerald 2019-02-08 16:12:00 UTC
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

Comment 26 Jones5S 2022-12-27 05:41:50 UTC Comment hidden (spam)

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