Bug 1642948 - Unexpected error encountered on provider details page
Summary: Unexpected error encountered on provider details page
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Milan Zázrivec
QA Contact: Ganesh Hubale
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-25 11:02 UTC by Vatsal Parekh
Modified: 2019-02-12 16:49 UTC (History)
18 users (show)

Fixed In Version: 5.10.0.25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-12 16:49:28 UTC
Category: ---
Cloudforms Team: KubeVirt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Vatsal Parekh 2018-10-25 11:02:43 UTC
Description of problem:
On Provider details page for OpenShift and KubeVirt(infra), clicking 'Refresh' button when the cookie has expired(on long session or appliance reboot) causes `Unexpected Error Exception`

traceback from production.log:
```
[----] I, [2018-10-25T06:26:11.946999 #12054:184217c]  INFO -- : Started GET "/favicon.ico" for 127.0.0.1 at 2018-10-25 06:26:11 -0400
[----] F, [2018-10-25T06:26:11.951788 #12054:184217c] FATAL -- :   
[----] F, [2018-10-25T06:26:11.951865 #12054:184217c] FATAL -- : ActionController::RoutingError (No route matches [GET] "/favicon.ico"):
[----] F, [2018-10-25T06:26:11.951907 #12054:184217c] FATAL -- :   
[----] F, [2018-10-25T06:26:11.951964 #12054:184217c] FATAL -- : actionpack (5.0.7) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call'
actionpack (5.0.7) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.0.7) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.0.7) lib/rails/rack/logger.rb:26:in `call'
actionpack (5.0.7) lib/action_dispatch/middleware/request_id.rb:24:in `call'
rack (2.0.5) lib/rack/method_override.rb:22:in `call'
rack (2.0.5) lib/rack/runtime.rb:22:in `call'
activesupport (5.0.7) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
actionpack (5.0.7) lib/action_dispatch/middleware/executor.rb:12:in `call'
rack (2.0.5) lib/rack/sendfile.rb:111:in `call'
railties (5.0.7) lib/rails/engine.rb:522:in `call'
puma (3.7.1) lib/puma/configuration.rb:232:in `call'
puma (3.7.1) lib/puma/server.rb:578:in `handle_request'
puma (3.7.1) lib/puma/server.rb:415:in `process_client'
puma (3.7.1) lib/puma/server.rb:275:in `block in run'
puma (3.7.1) lib/puma/thread_pool.rb:120:in `block in spawn_thread'
[----] I, [2018-10-25T06:26:16.721038 #12065:418f304]  INFO -- : Started POST "/api/providers/" for 127.0.0.1 at 2018-10-25 06:26:16 -0400
[----] I, [2018-10-25T06:26:16.726790 #12065:418f304]  INFO -- : Processing by Api::ProvidersController#create as JSON
```

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

How reproducible:


Steps to Reproduce:
1.Go to details provider page
2.Hit refresh button after the cookie has expired(appliance reboot or long wait)
3.

Actual results:
Shows exception

Expected results:
Should log-out and take to login again page

Additional info:

Comment 2 Vatsal Parekh 2018-10-25 11:12:10 UTC
Seeing that this is happening on infra providers as well, testing with VMWare and RHV

```
[----] I, [2018-10-25T07:03:37.484112 #2330:1a3d9cc]  INFO -- : Started POST "/ems_infra/button/1?pressed=refresh_server_summary" for 127.0.0.1 at 2018-10-25 07:03:37 -0400
[----] I, [2018-10-25T07:03:38.429687 #2330:1a3d9cc]  INFO -- : Processing by EmsInfraController#button as JS
[----] I, [2018-10-25T07:03:38.429851 #2330:1a3d9cc]  INFO -- :   Parameters: {"pressed"=>"refresh_server_summary", "id"=>"1"}
[----] I, [2018-10-25T07:03:38.431046 #2330:1a3d9cc]  INFO -- : Fork detected, re-connecting child process...
[----] W, [2018-10-25T07:03:38.444936 #2330:1a3d9cc]  WARN -- : Can't verify CSRF token authenticity.
[----] F, [2018-10-25T07:03:38.445549 #2330:1a3d9cc] FATAL -- : Error caught: [ActionController::InvalidAuthenticityToken] ActionController::InvalidAuthenticityToken
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_controller/metal/request_forgery_protection.rb:195:in `handle_unverified_request'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_controller/metal/request_forgery_protection.rb:223:in `handle_unverified_request'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_controller/metal/request_forgery_protection.rb:218:in `verify_authenticity_token'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:382:in `block in make_lambda'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:150:in `block (2 levels) in halting_and_conditional'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/abstract_controller/callbacks.rb:12:in `block (2 levels) in <module:Callbacks>'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:151:in `block in halting_and_conditional'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:454:in `block in call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:454:in `each'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:454:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_controller/metal/rescue.rb:20:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/notifications.rb:164:in `instrument'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
/opt/rh/cfme-gemset/gems/activerecord-5.0.7/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/abstract_controller/base.rb:126:in `process'
/opt/rh/cfme-gemset/gems/actionview-5.0.7/lib/action_view/rendering.rb:30:in `process'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_controller/metal.rb:190:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_controller/metal.rb:262:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/routing/route_set.rb:32:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/journey/router.rb:39:in `block in serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/journey/router.rb:26:in `each'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/journey/router.rb:26:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/routing/route_set.rb:727:in `call'
/opt/rh/cfme-gemset/bundler/gems/cfme-graphql-5751b531db81/lib/manageiq/graphql/rest_api_proxy.rb:18:in `call'
/opt/rh/cfme-gemset/gems/secure_headers-3.0.3/lib/secure_headers/middleware.rb:10:in `call'
/var/www/miq/vmdb/lib/request_started_on_middleware.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.5/lib/rack/etag.rb:25:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.5/lib/rack/conditional_get.rb:38:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.5/lib/rack/head.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:232:in `context'
/opt/rh/cfme-gemset/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:226:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/middleware/cookies.rb:613:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:97:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/middleware/callbacks.rb:36:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.7/lib/rails/rack/logger.rb:36:in `call_app'
/opt/rh/cfme-gemset/gems/railties-5.0.7/lib/rails/rack/logger.rb:26:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/middleware/request_id.rb:24:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.5/lib/rack/method_override.rb:22:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.5/lib/rack/runtime.rb:22:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_dispatch/middleware/executor.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.5/lib/rack/sendfile.rb:111:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.7/lib/rails/engine.rb:522:in `call'
/usr/share/gems/gems/puma-3.7.1/lib/puma/configuration.rb:232:in `call'
/usr/share/gems/gems/puma-3.7.1/lib/puma/server.rb:578:in `handle_request'
/usr/share/gems/gems/puma-3.7.1/lib/puma/server.rb:415:in `process_client'
/usr/share/gems/gems/puma-3.7.1/lib/puma/server.rb:275:in `block in run'
/usr/share/gems/gems/puma-3.7.1/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
[----] I, [2018-10-25T07:03:38.484070 #2330:1a3d9cc]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-75b755f67a94/app/views/layouts/_exception_contents.html.haml (26.7ms)
[----] I, [2018-10-25T07:03:38.485231 #2330:1a3d9cc]  INFO -- : Completed 200 OK in 55ms (Views: 38.6ms | ActiveRecord: 0.0ms)
```

Comment 3 Vatsal Parekh 2018-10-25 11:15:51 UTC
This is coming on all the providers page, so will not be a kubevirt specific issue

Comment 5 Piotr Kliczewski 2018-10-29 12:31:44 UTC
Adam it doesn't seems to be Kubevirt related. Please take a look.

Comment 6 Adam Grare 2018-10-29 12:40:15 UTC
Looks like a UI failure, sending over to DanC

Comment 8 Vatsal Parekh 2018-11-01 08:03:11 UTC
This is happening on 5.10.0.22 as well

Comment 12 Milan Zázrivec 2018-11-07 15:50:11 UTC
The only way I can reproduce this problem is:

1. I navigate to an infra provider summary screen
2. While on the summary screen, I delete all cookies my browser has set for
   the CFME appliance
3. I hit refresh button

Reproduced with 5.10.0.22.20181030184024_26956a0

Is that what you're doing here?

Comment 14 CFME Bot 2018-11-12 16:08:30 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/6e1f59c19d804d66d0fa98ca32f5ba7f484aba46
commit 6e1f59c19d804d66d0fa98ca32f5ba7f484aba46
Author:     Milan Zazrivec <mzazrivec>
AuthorDate: Fri Nov  9 10:12:46 2018 -0500
Commit:     Milan Zazrivec <mzazrivec>
CommitDate: Fri Nov  9 10:12:46 2018 -0500

    Reset session on failed CSRF token verification

    https://bugzilla.redhat.com/show_bug.cgi?id=1642948

 app/controllers/application_controller.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 15 CFME Bot 2018-11-12 22:41:36 UTC
New commit detected on ManageIQ/manageiq-ui-classic/hammer:

https://github.com/ManageIQ/manageiq-ui-classic/commit/f6cec839f59ffaefe4512d4963dc481aa15af7ae
commit f6cec839f59ffaefe4512d4963dc481aa15af7ae
Author:     Martin Povolny <mpovolny>
AuthorDate: Mon Nov 12 09:58:40 2018 -0500
Commit:     Martin Povolny <mpovolny>
CommitDate: Mon Nov 12 09:58:40 2018 -0500

    Merge pull request #4901 from mzazrivec/reset_session_on_failed_csrf_verification

    Reset session on failed CSRF token verification

    (cherry picked from commit 3cc54630a252433ac8ab0a920dc352038c06bcd6)

    https://bugzilla.redhat.com/show_bug.cgi?id=1642948

 app/controllers/application_controller.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 16 Vatsal Parekh 2018-11-13 06:29:30 UTC
(In reply to Milan Zázrivec from comment #12)
> The only way I can reproduce this problem is:
> 
> 1. I navigate to an infra provider summary screen
> 2. While on the summary screen, I delete all cookies my browser has set for
>    the CFME appliance
> 3. I hit refresh button
> 
> Reproduced with 5.10.0.22.20181030184024_26956a0
> 
> Is that what you're doing here?

Yes, only change is I was rebooting the appliance to clear the cookies


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