Bug 1572965 - Ansible Playbook Service - When required flag is set on a field in the service dialogue, launching from custom button fails
Summary: Ansible Playbook Service - When required flag is set on a field in the servic...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.3
Assignee: Tina Fitzgerald
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-29 09:17 UTC by Moran Goldboim
Modified: 2018-05-24 13:58 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-23 17:40:33 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)

Description Moran Goldboim 2018-04-29 09:17:30 UTC
Description of problem:
When required flag is set on a field in the service dialogue, launching from custom button fails  

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

How reproducible:
always

Steps to Reproduce:
1.setup a service dialogue with a required flag on a checkbox
2.setup a custom button to launch this service
3.

Actual results:
fails to launch

Expected results:


Additional info:
    [----] I, [2018-04-27T05:16:58.165455 #12460:35b114]  INFO -- : Q-task_id([resource_action_199]) <AEMethod [/ManageIQ/System/Request/order_ansible_playbook]> Starting
    [----] E, [2018-04-27T05:16:58.658813 #12460:34ab98] ERROR -- : Q-task_id([resource_action_199]) The following error occurred during instance method <provision_request> for AR object <#<ServiceTemplateAnsiblePlaybook id: 12, name: "RHV - Cluster Upgrade", description: "", guid: "30f14d8c-3ac1-472b-b003-415f66dc1830", type: "ServiceTemplateAnsiblePlaybook", service_template_id: nil, options: {:config_info=>{:provision=>{:repository_id=>"2", :playbook_id=>"18", :credential_id=>"7", :hosts=>"localhost", :verbosity=>"0", :log_output=>"on_error", :extra_vars=>{}, :execution_ttl=>"", :become_enabled=>false, :cloud_credential_id=>"10", :new_dialog_name=>"RHV - Cluster Upgrade", :fqname=>"/Service/Generic/StateMachines/GenericLifecycle/provision", :dialog_id=>8}, :retirement=>{:remove_resources=>"yes_without_playbook", :verbosity=>"0", :log_output=>"on_error", :fqname=>"/Service/Generic/StateMachines/GenericLifecycle/Retire_Basic_Resource"}}}, created_at: "2018-04-27 08:55:53", updated_at: "2018-04-27 08:55:53", display: true, evm_owner_id: nil, miq_group_id: 2, service_type: "atomic", prov_type: "generic_ansible_playbook", provision_cost: nil, service_template_catalog_id: 1, long_description: nil, tenant_id: 1, generic_subtype: nil>>
    [----] E, [2018-04-27T05:16:58.658954 #12460:34ab98] ERROR -- : Q-task_id([resource_action_199]) MiqAeServiceModelBase.ar_method raised: <RuntimeError>: <Warning!/Cluster Operation notification/Please confirm cluster upgrade operation to execute now is required>
    [----] E, [2018-04-27T05:16:58.659026 #12460:34ab98] ERROR -- : Q-task_id([resource_action_199]) /var/www/miq/vmdb/app/models/service_template.rb:385:in `provision_request'
    /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:313:in `public_send'
    /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:313:in `block in object_send'
    /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:332:in `ar_method'
    /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:342:in `ar_method'
    /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:311:in `object_send'
    /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_methods.rb:114:in `create_service_provision_request'
    /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb:165:in `execute'
    /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1624:in `perform_without_block'
    /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1584:in `perform'
    /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1657:in `block (2 levels) in main_loop'
    /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1653:in `loop'
    /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1653:in `block in main_loop'
    [----] E, [2018-04-27T05:16:58.661472 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) <AEMethod order_ansible_playbook> The following error occurred during method evaluation:
    [----] E, [2018-04-27T05:16:58.661993 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) <AEMethod order_ansible_playbook>   RuntimeError: Warning!/Cluster Operation notification/Please confirm cluster upgrade operation to execute now is required
    [----] E, [2018-04-27T05:16:58.662994 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) <AEMethod order_ansible_playbook>   (druby://127.0.0.1:38707) /var/www/miq/vmdb/app/models/service_template.rb:385:in `provision_request'
    (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:313:in `public_send'
    (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:313:in `block in object_send'
    (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:332:in `ar_method'
    (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:342:in `ar_method'
    (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:311:in `object_send'
    (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_methods.rb:114:in `create_service_provision_request'
    (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb:165:in `execute'
    (druby://127.0.0.1:38707) /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1624:in `perform_without_block'
    (druby://127.0.0.1:38707) /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1584:in `perform'
    (druby://127.0.0.1:38707) /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1657:in `block (2 levels) in main_loop'
    (druby://127.0.0.1:38707) /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1653:in `loop'
    (druby://127.0.0.1:38707) /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1653:in `block in main_loop'
    /ManageIQ/System/Request/order_ansible_playbook:19:in `main'
    [----] E, [2018-04-27T05:16:58.666670 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR: (druby://127.0.0.1:38707) /var/www/miq/vmdb/app/models/service_template.rb:385:in `provision_request': Warning!/Cluster Operation notification/Please confirm cluster upgrade operation to execute now is required (RuntimeError)
    [----] E, [2018-04-27T05:16:58.667134 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:313:in `public_send'
    [----] E, [2018-04-27T05:16:58.667567 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:313:in `block in object_send'
    [----] E, [2018-04-27T05:16:58.668086 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:332:in `ar_method'
    [----] E, [2018-04-27T05:16:58.668527 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:342:in `ar_method'
    e3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:342:in `ar_method'
    [----] E, [2018-04-27T05:16:58.668982 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:311:in `object_send'
    [----] E, [2018-04-27T05:16:58.669432 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_methods.rb:114:in `create_service_provision_request'
    [----] E, [2018-04-27T05:16:58.669877 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from (druby://127.0.0.1:38707) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-0c3ee3c99138/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb:165:in `execute'
    [----] E, [2018-04-27T05:16:58.670337 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from (druby://127.0.0.1:38707) /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1624:in `perform_without_block'
    [----] E, [2018-04-27T05:16:58.670760 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from (druby://127.0.0.1:38707) /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1584:in `perform'
    [----] E, [2018-04-27T05:16:58.671281 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from (druby://127.0.0.1:38707) /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1657:in `block (2 levels) in main_loop'
    [----] E, [2018-04-27T05:16:58.671699 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from (druby://127.0.0.1:38707) /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1653:in `loop'
    [----] E, [2018-04-27T05:16:58.672133 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from (druby://127.0.0.1:38707) /opt/rh/rh-ruby23/root/usr/share/ruby/drb/drb.rb:1653:in `block in main_loop'
    [----] E, [2018-04-27T05:16:58.672559 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from /ManageIQ/System/Request/order_ansible_playbook:19:in `main'
    [----] E, [2018-04-27T05:16:58.672995 #12460:991574] ERROR -- : Q-task_id([resource_action_199]) Method STDERR:         from /ManageIQ/System/Request/order_ansible_playbook:90:in `<main>'
    [----] I, [2018-04-27T05:16:58.694749 #12460:35b114]  INFO -- : Q-task_id([resource_action_199]) <AEMethod [/ManageIQ/System/Request/order_ansible_playbook]> Ending
    [----] E, [2018-04-27T05:16:58.695389 #12460:35b114] ERROR -- : Q-task_id([resource_action_199]) Aborting instantiation (unknown method return code) because [Method exited with rc=Unknown RC: [1]]
    [----] E, [2018-04-27T05:16:58.695548 #12460:35b114] ERROR -- : Q-task_id([resource_action_199]) Aborting instantiation (unknown method return code) because [Method exited with rc=Unknown RC: [1]]

Comment 3 Tina Fitzgerald 2018-05-01 19:15:26 UTC
This issue is specifically for Ansible Playbook services.

Comment 4 drew uhlmann 2018-05-07 14:23:49 UTC
This issue is also resolved by naming the checkbox in question "param_WHATEVER" because the prefix "param_" denotes information that is passed to the playbook. We're unsure of what the intent of this dialog is; we don't know for sure if there is a specific need for this checkbox to be passed to the playbook at all. Was this checkbox param supposed to be passed to the playbook?

Comment 5 Tina Fitzgerald 2018-05-14 17:34:23 UTC
Hi Moran,

Can you validate that your dialog works properly when the dialog field is named dialog_param_NAME?

Thanks,
Tina

Comment 6 Moran Goldboim 2018-05-22 21:01:56 UTC
(In reply to Tina Fitzgerald from comment #5)
> Hi Moran,
> 
> Can you validate that your dialog works properly when the dialog field is
> named dialog_param_NAME?
> 
> Thanks,
> Tina

I'm sorry, but currently i don't have a system to reproduce the issue.

Comment 7 Tina Fitzgerald 2018-05-23 17:40:33 UTC
Hi Moran,

I'm satisfied that the dialog field works properly when it is named with the dialog_param prefix.

I'm going to close this ticket, but please let me know if you have any questions. We can always open a new ticket if it's not working as expected.  

Thanks,
Tina


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