Bug 1564168

Summary: [RFE] Embedded Ansible Options not updatable
Product: Red Hat CloudForms Management Engine Reporter: Cyril Coupel <ccoupel>
Component: AutomateAssignee: Lucy Fu <lufu>
Status: CLOSED NOTABUG QA Contact: Dmitry Misharov <dmisharo>
Severity: urgent Docs Contact:
Priority: medium    
Version: 5.9.0CC: bilwei, ccoupel, cpelland, dmisharo, gmccullo, mkanoor, niroy, obarenbo, tfitzger
Target Milestone: GAKeywords: FutureFeature
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-15 12:51:41 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:
Embargoed:
Attachments:
Description Flags
preprocess options none

Description Cyril Coupel 2018-04-05 14:20:43 UTC
Description of problem:
during provisionning or via the rails console, it is not possible to change the values of the options of the embedded ansible service (the get/set_option is not implemented).

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

How reproducible:
all time

Steps to Reproduce:
1. create a service base on an embedded ansible catalog item
2. via the console: svc=$evm.vmdb(:service).find_by_name("test")
3. svc.options[:config_info][:retirement][:hosts]="1.2.3.4"

4. svc2=$evm.vmdb(:service).find_by_name("test")
5. svc2[.options[:config_info][:retirement][:hosts] is not the defined value but the default one

6. svc.set_dialog_option("dialog_hosts",svc.get_dialog_option("dialog_hosts")
7. svc2=$evm.vmdb(:service).find_by_name("test")
8. svc2[.options[:config_info][:retirement][:hosts] is the defined value

Actual results:


Expected results:


Additional info:

Comment 2 Dave Johnson 2018-04-05 14:44:38 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set the severity to Low.

Comment 3 Cyril Coupel 2018-04-05 16:12:43 UTC
the work around given form point 6 to 8 are not working via the automation.

Comment 4 Greg McCullough 2018-04-12 14:26:01 UTC
Cyril - Does step 6 work during the provisioning of the service?  Are you really reporting here that they do not work during retirement?

Comment 5 Cyril Coupel 2018-04-13 16:04:19 UTC
Greg, Yes I confirm that, during the provisionning I can set the host list and the params vars as expected.
The problem is, when we start the retirement of the service, the values of the hosts and params are set to the default from the catalog item and not from the values used during the provisionning, without the ability to change them.

Comment 9 Bill Wei 2018-06-05 17:55:26 UTC
Created attachment 1447964 [details]
preprocess options

The purpose of the RFE is to be able to change some of the options for retirement. The correct way to do this is through the preprocess step. You can point the pre4 step in automate to a user script following the default example as shown in attachment.

The options hash can accept the following keywords

:credential_id => <VMDB machine credential id>
:hosts => <a comma delimited string of hosts>
:extra_vars => <a hash of variables>

Comment 10 Bill Wei 2018-06-05 17:57:17 UTC
Please close this BZ if above instruction solves your problem.