The code for executing bulk actions did not include a check to ensure a node is actually selected. The actions assumed that the list of nodes was not empty. The code generated an uncaught exception, resulting in a "Something went wrong" message when a DEBUG is disabled.
With this update, a check to verify if at least one node is selected is included or to display a helpful error message when no node is selected. As a result, trying to perform a bulk action with no nodes selected results in a helpful message telling you to select some nodes first.
openstack-tuskar-ui : Something went wrong ! when attempting to perform node-action without selecting node.
Environment:
------------
[root@localhost ~]# rpm -qa | grep tuskar
openstack-tuskar-ui-extras-0.0.3-1.el7ost.noarch
openstack-tuskar-ui-0.2.0-11.el7ost.noarch
python-tuskarclient-0.1.15-3.el7ost.noarch
openstack-tuskar-0.4.15-4.el7ost.noarch
Scenario:
---------
(1) Login to tuskar UI and discover nodes.
(2) Browse the nodes tab and attempt to perform any action *without selecting a host*
like activate-node/power-on-nodes/power-off-nodes
Results:
---------
Something went wrong!
An unexpected error has occurred. Try refreshing the page. If that doesn't help, contact your local administrator.
Home
Help
httpd access.log:
-------------------
[02/Mar/2015:12:22:35 -0500] "POST /dashboard/infrastructure/nodes/ HTTP/1.1" 500 1666 "http://10.8.0.52:8080/dashboard/infrastructure/nodes/" "Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"
expected results:
------------------
GUI informative error message.
Comment 3Radomir Dopieralski
2015-03-05 13:23:00 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/RHEA-2015:1549
openstack-tuskar-ui : Something went wrong ! when attempting to perform node-action without selecting node. Environment: ------------ [root@localhost ~]# rpm -qa | grep tuskar openstack-tuskar-ui-extras-0.0.3-1.el7ost.noarch openstack-tuskar-ui-0.2.0-11.el7ost.noarch python-tuskarclient-0.1.15-3.el7ost.noarch openstack-tuskar-0.4.15-4.el7ost.noarch Scenario: --------- (1) Login to tuskar UI and discover nodes. (2) Browse the nodes tab and attempt to perform any action *without selecting a host* like activate-node/power-on-nodes/power-off-nodes Results: --------- Something went wrong! An unexpected error has occurred. Try refreshing the page. If that doesn't help, contact your local administrator. Home Help httpd access.log: ------------------- [02/Mar/2015:12:22:35 -0500] "POST /dashboard/infrastructure/nodes/ HTTP/1.1" 500 1666 "http://10.8.0.52:8080/dashboard/infrastructure/nodes/" "Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0" expected results: ------------------ GUI informative error message.