Bug 1334202

Summary: Volume Configuration and Policy Option is Enabled on Cloud Volumes page even no volumes are selected
Product: Red Hat CloudForms Management Engine Reporter: Niyaz Akhtar Ansari <nansari>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED ERRATA QA Contact: Niyaz Akhtar Ansari <nansari>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.6.0CC: hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:error:configuration:Policy
Fixed In Version: 5.6.0.7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-29 16:00:26 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 Flags
screenshot
none
error
none
editTags
none
editTagsError none

Description Niyaz Akhtar Ansari 2016-05-09 07:24:21 UTC
Created attachment 1155161 [details]
screenshot

Description of problem:


Version-Release number of selected component (if applicable):
Version 5.6.0.5-beta2.4.20160503153816_1fb554f


How reproducible:
100%

Steps to Reproduce:
1.Add RHOS Provider
2.Navigate to Compute->Clouds->Volumes 
3.Click on Configuration(do not check the volumes from list view)
4.click on Attach/Detach/Edit/Delete and Click on Edit Tags
 


Actual results:
When clicked on Attach/Detach/Edit/Delete and Edit tags it throws an error. 

Expected results:
Configuration setting options Attach/Detach/Edit/Delete and policy should be enabled when a Cloud Volume is selected.  


Additional info:

Production Log:
[----] I, [2016-05-09T02:25:43.040461 #3193:6ecfd0]  INFO -- : Started POST "/cloud_volume/button?pressed=cloud_volume_attach" for 127.0.0.1 at 2016-05-09 02:25:43 -0400
[----] I, [2016-05-09T02:25:43.043895 #3193:6ecfd0]  INFO -- : Processing by CloudVolumeController#button as JS
[----] I, [2016-05-09T02:25:43.044091 #3193:6ecfd0]  INFO -- :   Parameters: {"pressed"=>"cloud_volume_attach"}
[----] I, [2016-05-09T02:25:43.261623 #3193:6ecfd0]  INFO -- : Completed 200 OK in 217ms (Views: 1.5ms | ActiveRecord: 0.0ms)
[----] I, [2016-05-09T02:25:43.517258 #3193:6ec9b8]  INFO -- : Started GET "/cloud_volume/attach" for 127.0.0.1 at 2016-05-09 02:25:43 -0400
[----] I, [2016-05-09T02:25:43.519045 #3193:6ec9b8]  INFO -- : Processing by CloudVolumeController#attach as HTML
[----] F, [2016-05-09T02:25:43.729444 #3193:6ec9b8] FATAL -- : Error caught: [RuntimeError] Invalid input
/var/www/miq/vmdb/app/controllers/application_controller.rb:2305:in `find_by_id_filtered'
/var/www/miq/vmdb/app/controllers/cloud_volume_controller.rb:140:in `attach'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/abstract_controller/base.rb:181:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/callbacks.rb:126:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/callbacks.rb:126:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/callbacks.rb:455:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/callbacks.rb:455:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_controller/metal/rescue.rb:31:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/notifications.rb:164:in `instrument'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/abstract_controller/base.rb:126:in `process'
/opt/rh/cfme-gemset/gems/actionview-5.0.0.beta4/lib/action_view/rendering.rb:30:in `process'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_controller/metal.rb:190:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_controller/metal.rb:262:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/routing/route_set.rb:32:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/journey/router.rb:39:in `block in serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/journey/router.rb:26:in `each'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/journey/router.rb:26:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/routing/route_set.rb:725:in `call'
/opt/rh/cfme-gemset/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/opt/rh/cfme-gemset/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/opt/rh/cfme-gemset/gems/omniauth-1.3.1/lib/omniauth/builder.rb:63:in `call'
/opt/rh/cfme-gemset/gems/secure_headers-3.0.3/lib/secure_headers/middleware.rb:10:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.alpha/lib/rack/etag.rb:25:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.alpha/lib/rack/conditional_get.rb:25:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.alpha/lib/rack/head.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.alpha/lib/rack/session/abstract/id.rb:220:in `context'
/opt/rh/cfme-gemset/gems/rack-2.0.0.alpha/lib/rack/session/abstract/id.rb:214:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/middleware/cookies.rb:613:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/callbacks.rb:97:in `__run_callbacks__'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/middleware/callbacks.rb:36:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.0.beta4/lib/rails/rack/logger.rb:36:in `call_app'
/opt/rh/cfme-gemset/gems/railties-5.0.0.beta4/lib/rails/rack/logger.rb:26:in `call'
/opt/rh/cfme-gemset/gems/request_store-1.3.1/lib/request_store/middleware.rb:9:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/middleware/request_id.rb:24:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.alpha/lib/rack/method_override.rb:22:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.alpha/lib/rack/runtime.rb:22:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-83a8682c1d10/activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.beta4/lib/action_dispatch/middleware/executor.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.alpha/lib/rack/sendfile.rb:111:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.0.beta4/lib/rails/engine.rb:522:in `call'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/configuration.rb:224:in `call'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:561:in `handle_request'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:406:in `process_client'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:271:in `block in run'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/thread_pool.rb:111:in `call'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/thread_pool.rb:111:in `block in spawn_thread'
/opt/rh/cfme-gemset/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
/opt/rh/cfme-gemset/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
[----] I, [2016-05-09T02:25:43.732423 #3193:6ec9b8]  INFO -- :   Rendering layouts/exception.html.haml within layouts/application
[----] I, [2016-05-09T02:25:43.733408 #3193:6ec9b8]  INFO -- :   Rendered layouts/_exception_contents.html.haml (0.4ms)
[----] I, [2016-05-09T02:25:43.733679 #3193:6ec9b8]  INFO -- :   Rendered layouts/exception.html.haml within layouts/application (1.0ms)
[----] I, [2016-05-09T02:25:43.734277 #3193:6ec9b8]  INFO -- :   Rendered layouts/_doctype.html.haml (0.1ms)
[----] I, [2016-05-09T02:25:43.736463 #3193:6ec9b8]  INFO -- :   Rendered stylesheets/_template50.html.haml (0.1ms)
[----] I, [2016-05-09T02:25:43.741352 #3193:6ec9b8]  INFO -- :   Rendered layouts/_i18n_js.html.haml (3.4ms)
[----] I, [2016-05-09T02:25:43.749318 #3193:6ec9b8]  INFO -- :   Rendered layouts/_user_options.html.haml (6.7ms)
[----] I, [2016-05-09T02:25:43.749693 #3193:6ec9b8]  INFO -- :   Rendered layouts/_spinner.html.haml (0.1ms)
[----] I, [2016-05-09T02:25:43.749967 #3193:6ec9b8]  INFO -- :   Rendered layouts/_lightbox_panel.html.haml (0.1ms)
[----] I, [2016-05-09T02:25:43.750084 #3193:6ec9b8]  INFO -- :   Rendered layouts/_header.html.haml (8.1ms)
[----] I, [2016-05-09T02:25:43.764396 #3193:6ec9b8]  INFO -- :   Rendered layouts/_vertical_navbar.html.haml (13.9ms)
[----] I, [2016-05-09T02:25:43.764880 #3193:6ec9b8]  INFO -- :   Rendered layouts/_breadcrumbs.html.haml (0.1ms)
[----] I, [2016-05-09T02:25:43.765064 #3193:6ec9b8]  INFO -- :   Rendered layouts/_content.html.haml (14.8ms)
[----] I, [2016-05-09T02:25:43.765423 #3193:6ec9b8]  INFO -- :   Rendered layouts/_adv_search.html.haml (0.1ms)
[----] I, [2016-05-09T02:25:43.765546 #3193:6ec9b8]  INFO -- :   Rendered layouts/_footer.html.haml (0.3ms)
[----] I, [2016-05-09T02:25:43.766019 #3193:6ec9b8]  INFO -- : Completed 500 Internal Server Error in 247ms (Views: 35.2ms | ActiveRecord: 0.0ms)
[----] I, [2016-05-09T02:25:46.502031 #3193:6ec1c0]  INFO -- : Started POST "/dashboard/window_sizes?width=2100&height=1178" for 127.0.0.1 at 2016-05-09 02:25:46 -0400
[----] I, [2016-05-09T02:25:46.504543 #3193:6ec1c0]  INFO -- : Processing by DashboardController#window_sizes as JS
[----] I, [2016-05-09T02:25:46.504678 #3193:6ec1c0]  INFO -- :   Parameters: {"width"=>"2100", "height"=>"1178"}
[----] I, [2016-05-09T02:25:46.510794 #3193:6ec1c0]  INFO -- : Completed 200 OK in 6ms (ActiveRecord: 0.0ms)

Comment 1 Niyaz Akhtar Ansari 2016-05-09 07:29:18 UTC
Created attachment 1155162 [details]
error

Comment 2 Harpreet Kataria 2016-05-09 19:39:53 UTC
https://github.com/ManageIQ/manageiq/pull/8556

Comment 3 CFME Bot 2016-05-09 21:45:48 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/11c84e252bed97b2d1fc24df4995f99386282ebc

commit 11c84e252bed97b2d1fc24df4995f99386282ebc
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon May 9 15:36:54 2016 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon May 9 15:36:54 2016 -0400

    Changed value of :enabled for toolbar button from string to boolean
    
    Value of :enabled attribute in toolbars buttons should be a boolean, having it as string was causing buttons to be enabled all the time. Buttons should only be enabled when an item in the list view is selected to perform an action.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1334202

 app/helpers/application_helper/toolbar/cloud_volumes_center.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comment 6 Niyaz Akhtar Ansari 2016-05-12 11:00:33 UTC
Created attachment 1156633 [details]
editTags

Build: 5.6.0.6-beta2.5

The Bug is Still reproducible in Policy Tab. 

Configuration Tab issues has been Fixed but Policy Tab bug is reproducible. 
When clicked on Edit Tags From Policy Tab it trows an error.
please check screenshots. 

Steps:
1.Add RHOS Provider
2.Navigate to Compute->Clouds->Volumes 
3.Click on Policy(do not check the volumes from list view)
4.Click on Edit Tags

Comment 7 Niyaz Akhtar Ansari 2016-05-12 11:02:42 UTC
Created attachment 1156636 [details]
editTagsError

Comment 8 Harpreet Kataria 2016-05-12 13:55:13 UTC
https://github.com/ManageIQ/manageiq/pull/8649

Comment 9 CFME Bot 2016-05-13 17:30:47 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/68557a1005ac0c5c410c7ffb5d9f4fdcb5aafae3

commit 68557a1005ac0c5c410c7ffb5d9f4fdcb5aafae3
Author:     Harpreet Kataria <hkataria>
AuthorDate: Thu May 12 09:46:09 2016 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Fri May 13 09:27:07 2016 -0400

    Changed value of :enabled for toolbar button from string to boolean
    
    Value of :enabled attribute in toolbars buttons should be a boolean, having it as string was causing buttons to be enabled all the time. Buttons should only be enabled when an item in the list view is selected to perform an action.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1334202

 .../toolbar/cloud_volumes_center.rb                | 40 +++++++++++-----------
 1 file changed, 20 insertions(+), 20 deletions(-)

Comment 11 Niyaz Akhtar Ansari 2016-05-18 06:45:44 UTC
Configuration setting options and Policy Tab has been fixed.Everything is working successfully.

Verified in 5.6.0.7-beta2.6.20160516171555_b1be31f

Comment 13 errata-xmlrpc 2016-06-29 16:00:26 UTC
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