Bug 1296122 - Running a Control Action of "Invoke a Custom Automation" results in the error "MiqAeServiceModelBase.ar_method raised: <RuntimeError>: <user_id not specified in Automation request>"
Running a Control Action of "Invoke a Custom Automation" results in the error...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.5.0
Unspecified Unspecified
high Severity high
: GA
: 5.6.0
Assigned To: Lucy Fu
Nandini Chandra
:
Depends On:
Blocks: 1296581
  Show dependency treegraph
 
Reported: 2016-01-06 06:52 EST by Peter McGowan
Modified: 2016-06-29 11:25 EDT (History)
8 users (show)

See Also:
Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1296581 (view as bug list)
Environment:
Last Closed: 2016-06-29 11:25:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter McGowan 2016-01-06 06:52:17 EST
Description of problem:
Running a Control Policy that contains an action type of "Invoke a Custom Automation" always fails, with the error "user_id not specified in Automation request"

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

How reproducible:
Every Time

Steps to Reproduce:
1. Create a Control Action to "Invoke a Custom Automation". I used Call_Instance as the request, and specified namespace, class and instance parameters to my method.
2. Add this to a policy, with the VM Power On event as the trigger. Assign the Policy to a Profile, and assign the Profile to a cluster.
3. Power On a VM

Actual results:
[----] E, [2016-01-06T11:47:20.939647 #3101:833998] ERROR -- : MiqAeServiceModelBase.ar_method raised: <RuntimeError>: <user_id not specified in Automation request>
[----] E, [2016-01-06T11:47:20.939936 #3101:833998] ERROR -- : /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_engine.rb:326:in `ae_user_object'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_engine.rb:77:in `deliver'
/var/www/miq/vmdb/app/models/miq_action.rb:893:in `action_custom_automation'
/var/www/miq/vmdb/app/models/miq_action.rb:191:in `invoke'
/var/www/miq/vmdb/app/models/miq_action.rb:154:in `block (2 levels) in invoke_actions'
/var/www/miq/vmdb/app/models/miq_action.rb:143:in `each'
/var/www/miq/vmdb/app/models/miq_action.rb:143:in `block in invoke_actions'
/var/www/miq/vmdb/app/models/miq_action.rb:139:in `each'
/var/www/miq/vmdb/app/models/miq_action.rb:139:in `invoke_actions'
/var/www/miq/vmdb/app/models/miq_policy.rb:240:in `enforce_policy'
/var/www/miq/vmdb/app/models/miq_event.rb:57:in `process_evm_event'
/var/www/miq/vmdb/lib/miq_automation_engine/service_models/miq_ae_service_miq_event.rb:4:in `block in process_evm_event'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:261:in `ar_method'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:271:in `ar_method'
/var/www/miq/vmdb/lib/miq_automation_engine/service_models/miq_ae_service_miq_event.rb:4:in `process_evm_event'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_builtin_method.rb:103:in `miq_event_enforce_policy'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_method.rb:34:in `invoke_builtin'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_method.rb:66:in `invoke'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:447:in `invoke_method'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:362:in `block in process_method_raw'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:11:in `realtime_store'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:30:in `realtime_block'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:355:in `process_method_raw'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:368:in `process_method'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:309:in `block in process_filtered_fields'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:304:in `each'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:304:in `process_filtered_fields'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:300:in `process_fields'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_workspace.rb:151:in `instantiate'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:570:in `process_relationship_raw'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:348:in `process_relationship'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:309:in `block in process_filtered_fields'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:304:in `each'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:304:in `process_filtered_fields'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:300:in `process_fields'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_workspace.rb:151:in `instantiate'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:570:in `process_relationship_raw'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:348:in `process_relationship'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:309:in `block in process_filtered_fields'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:304:in `each'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:304:in `process_filtered_fields'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_object.rb:300:in `process_fields'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_workspace.rb:151:in `instantiate'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_workspace.rb:65:in `instantiate'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_engine.rb:320:in `resolve_automation_object'
/var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_engine.rb:116:in `deliver'
/var/www/miq/vmdb/app/models/miq_queue.rb:345:in `block in deliver'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:89:in `block in timeout'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:34:in `block in catch'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:34:in `catch'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:34:in `catch'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:104:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:341:in `deliver'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:106:in `deliver_queue_message'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:134:in `deliver_message'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:151:in `block in do_work'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:145:in `loop'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:145:in `do_work'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:334:in `block in do_work_loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:331:in `loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:331:in `do_work_loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:153:in `run'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:128:in `start'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:29:in `start_worker'
/var/www/miq/vmdb/lib/workers/bin/worker.rb:2:in `<top (required)>'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/commands/runner.rb:60:in `load'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/commands/runner.rb:60:in `<top (required)>'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:123:in `require'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:90:in `runner'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
/opt/rh/cfme-gemset/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
/var/www/miq/vmdb/bin/rails:4:in `require'
/var/www/miq/vmdb/bin/rails:4:in `<main>'
[----] I, [2016-01-06T11:47:20.940352 #3101:833998]  INFO -- : Aborting instantiation because [user_id not specified in Automation request]
[----] I, [2016-01-06T11:47:20.940668 #3101:833998]  INFO -- : Aborting instantiation because [user_id not specified in Automation request]
[----] I, [2016-01-06T11:47:20.940814 #3101:833998]  INFO -- : Aborting instantiation because [user_id not specified in Automation request]

Expected results:
The script should run

Additional info:
Comment 3 CFME Bot 2016-01-11 13:50:54 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/43574a51c2b08a8c13e965c82f4305585270a3c7

commit 43574a51c2b08a8c13e965c82f4305585270a3c7
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Wed Jan 6 17:45:16 2016 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Jan 11 11:23:34 2016 -0500

    user_id, miq_group_id and tenant_id are required in Automation request.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1296122

 app/models/miq_action.rb       | 21 +++++++++++++++++++++
 spec/models/miq_action_spec.rb |  8 +++++++-
 2 files changed, 28 insertions(+), 1 deletion(-)
Comment 4 CFME Bot 2016-01-11 20:27:29 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=f944a4c4ec88ce122845a1fed9439e2aec0b664f

commit f944a4c4ec88ce122845a1fed9439e2aec0b664f
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Wed Jan 6 17:45:16 2016 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Jan 11 14:02:43 2016 -0500

    user_id, miq_group_id and tenant_id are required in Automation request.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1296122

 app/models/miq_action.rb       | 21 +++++++++++++++++++++
 spec/models/miq_action_spec.rb |  8 +++++++-
 2 files changed, 28 insertions(+), 1 deletion(-)
Comment 5 Nandini Chandra 2016-04-26 18:06:51 EDT
Verified in 5.6.0.4.
Comment 7 errata-xmlrpc 2016-06-29 11:25:28 EDT
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/RHBA-2016:1348

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