Bug 1563867
Summary: | [RFE] Need safer way to control which hosts are used for running an Ansible Job Template from CloudForms. | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Jeffrey Cutter <jcutter> | ||||
Component: | Automate | Assignee: | Alexander Zagaynov <azagayno> | ||||
Status: | CLOSED ERRATA | QA Contact: | Nandini Chandra <nachandr> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 5.9.0 | CC: | akarol, azagayno, bilwei, brant.evans, cruffalo, dmisharo, gekis, mkanoor, obarenbo, pmcgowan, simaishi, smallamp, tfitzger | ||||
Target Milestone: | GA | Keywords: | FutureFeature | ||||
Target Release: | 5.10.0 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | 5.10.0.15 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2019-02-07 23:01:30 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
Jeffrey Cutter
2018-04-04 23:56:27 UTC
I'd like to add that there seems to be quite a few easy ways to mess up and get yourself in a situation where the limit value is not getting passed all the way through. In my case it was missing the proper service bundle entry point in the ROLE online training. Running a playbook in an environment against the entire inventory instead of a limited group of hosts is a particularly startling way to be reminded you've set it up wrong. To clarify, by having the wrong entry-point you are running into an issue because I dialog field is not being passed down to sub-service provision, is that correct? I see two distinct problems here: 1. A limit value is passed but the JobTemplate will ignore it because "Prompt on Launch" is not checked. We should be able to easily validate this right before launching the the JobTemplate in the ansible_tower_client_gem. 2) An empty limit value is specified when a value was expected. This is a configuration error and there is no way for us to auto-detect when limit is required. In this case it seems we would need an additional parameter that we track internally to prevent a JobTemplate for running without a limit. It would be on the admin to properly mark the JobTemplates that require it. For #2, without back-end code changes you could prevent this by creating a tag for this purpose and adding logic to the automate method to validate before running. Setting High priority per bascar. As I think I understand your use case now and as described in comment #3 I am asking that you open a separate BZ on the issue you are raising. As described above it is the same end result but completely different paths to recreate and ultimately different solutions to resolve. I would like to keep this issue for solving item #1. Created attachment 1476405 [details] Uninformative last message field PR: https://github.com/ansible/ansible_tower_client_ruby/pull/119 However, as you can see on the picture, user will not be able to see error reason. PR merged Reproducer steps: 1)In an external Ansible tower,create a job template with an inventory containing more than one host. Make sure the PROMPT ON LAUNCH check box for limit is not checked. 2)In CFME, add the Tower as a provider and create a catalog item based on the job template and apply limit to one of the hosts in the inventory. Without the fix, the limit option is ignored, the playbook runs on all hosts in the inventory. With the fix, the service ordering fails with this error message: 'PROMPT ON LAUNCH' is required for the following fields: limit Here's the error message logged to automation.log: ter: nil, tenant_id: 1, ancestry: nil, initiator: "user">> [----] E, [2019-01-29T14:21:20.894134 #60406:b5dfec0] ERROR -- : Q-task_id([r7_service_template_provision_task_9]) MiqAeServiceModelBase.ar_method raised: <MiqException::MiqOrchestrationProvisionError>: <'PROMPT ON LAUNCH' is required for the following fields: limit> Verified in 5.10.0.32 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:0212 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days |