Bug 1479570 - Internal Server Error when creating schedule for automate task
Internal Server Error when creating schedule for automate task
Status: CLOSED CURRENTRELEASE
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.8.0
All All
medium Severity medium
: GA
: 5.9.0
Assigned To: Drew Bomhof
Tasos Papaioannou
ui:schedule:automate
: TestOnly, ZStream
: 1479571 (view as bug list)
Depends On:
Blocks: 1481851
  Show dependency treegraph
 
Reported: 2017-08-08 16:29 EDT by Tasos Papaioannou
Modified: 2018-03-06 10:13 EST (History)
7 users (show)

See Also:
Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1481851 (view as bug list)
Environment:
Last Closed: 2018-03-06 10:13:39 EST
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 Tasos Papaioannou 2017-08-08 16:29:09 EDT
Description of problem:

If you select then unselect an Object Attribute Type when creating or editing an Automation Task schedule, an Internal Server Error pop-up window appears.

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

5.8.1.5

How reproducible:

100%

Steps to Reproduce:
1.) Create a schedule, selecting Automation Tasks under Action.
2.) Select a value from the dropdown list under Object Attribute Type.
3.) Undo the selection by selecting "<Choose>" from the dropdown.
4.) See pop-up window with Internal Server Error:

Status 500 Internal Server Error
Content-Type text/html; charset=utf-8
Data wrong constant name null [ops/fetch_target_ids]


Actual results:

Internal Server Error.

Expected results:

No Internal Server Error.

Additional info:

From production.log:

[----] F, [2017-08-08T15:46:29.376420 #3090:1740d78] FATAL -- : Error caught: [NameError] wrong constant name null
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/inflector/methods.rb:268:in `const_get'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/inflector/methods.rb:268:in `block in constantize'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/inflector/methods.rb:266:in `each'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/inflector/methods.rb:266:in `inject'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/inflector/methods.rb:266:in `constantize'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/core_ext/string/inflections.rb:66:in `constantize'
/var/www/miq/vmdb/lib/rbac/filterer.rb:499:in `to_class'
/var/www/miq/vmdb/lib/rbac/filterer.rb:499:in `to_class'
/var/www/miq/vmdb/lib/rbac/filterer.rb:192:in `search'
/var/www/miq/vmdb/lib/rbac/filterer.rb:97:in `search'
/var/www/miq/vmdb/lib/rbac.rb:3:in `search'
/var/www/miq/vmdb/lib/rbac/filterer.rb:262:in `filtered'
/var/www/miq/vmdb/lib/rbac/filterer.rb:101:in `filtered'
/var/www/miq/vmdb/lib/rbac.rb:11:in `filtered'
/var/www/miq/vmdb/app/controllers/ops_controller/settings/automate_schedules.rb:21:in `fetch_target_ids'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/abstract_controller/base.rb:188:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:126:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
[...]
/opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/runtime.rb:22:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/executor.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/sendfile.rb:111:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.0.1/lib/rails/engine.rb:522:in `call'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/configuration.rb:224:in `call'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:561:in `handle_request'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:406:in `process_client'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:271:in `block in run'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/thread_pool.rb:111:in `block in spawn_thread'
[...]
[----] I, [2017-08-08T15:52:27.051223 #3090:174187c]  INFO -- :   Rendered layouts/_footer.html.haml (0.2ms)
[----] I, [2017-08-08T15:52:27.051458 #3090:174187c]  INFO -- : Completed 500 Internal Server Error in 28ms (Views: 18.4ms | ActiveRecord: 0.0ms)
Comment 2 Greg McCullough 2017-08-08 17:01:35 EDT
Drew - Please review and see if we need to get someone from the UI team involved.
Comment 3 Greg McCullough 2017-08-10 10:13:33 EDT
*** Bug 1479571 has been marked as a duplicate of this bug. ***
Comment 5 CFME Bot 2017-08-15 04:03:35 EDT
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/1e222c6ec46f245081219362c3b87caf920e8e43

commit 1e222c6ec46f245081219362c3b87caf920e8e43
Author:     Drew Bomhof <dbomhof@redhat.com>
AuthorDate: Mon Aug 14 15:55:07 2017 -0400
Commit:     Drew Bomhof <dbomhof@redhat.com>
CommitDate: Mon Aug 14 15:55:07 2017 -0400

    Skip calling Rbac on a null or nil target_class
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1479570

 .../ops_controller/settings/automate_schedules.rb      | 11 ++++++-----
 .../ops_controller/settings/automate_schedules_spec.rb | 18 ++++++++++++++++++
 2 files changed, 24 insertions(+), 5 deletions(-)
Comment 7 Tasos Papaioannou 2017-10-10 10:33:05 EDT
Verified on 5.9.0.1.

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