V21.0.x - Surveillance view fails to load if a category has no devices and user is filtered by group / ACL

Norbert Steinhoff <[email protected]>
Newsgroups gmane.network.opennms.general
Message-ID <[email protected]>
Hi @all

i took me some time to figure this out on a large installation, but i never seen this behavior before i added a new surveillance view (copy of existing one with other column.

Heres how to reproduce:

create user user_a
create group customer_a
create surveillance-category customer-a-devices
create a Routerdevice with categories Routers and customer-a-devices assigned
create a Switchdevice with categories Switches and customer-a-devices assigend

create a surveillance-view „customer_a" with 2 rows Routers, Switches  and 1 column customer-a-devices
(web ACL is enabled in opennms.properties)

Log in as user_a
Open Status - Surveillance

The expected view customer_a is opened and i see Routers / Switches for that user. All fine.


When i now add a 3rd row to the view, lets say category Windows-Servers, but the customer_a has no devices in Windows-Servers, the surveillance view will fail to load with

"Possible causes could be that the database is not responding, the OpenNMS application has stopped or is not running, or there is an issue with the servlet container.
Please bring this message to the attention of the person responsible for maintaining OpenNMS for your organization, and have him or her check that OpenNMS, the external servlet container (if applicable), and the database are all running without errors.
To reveal details of the error encountered and instructions for reporting it, click here <>."


When i open this view as admin user, i see the row with a value „0 of 0"

Looks like the ACL kicks the category out, because the user has no such devices.

Is this expected ?


Isn't it better to show the row, but with a value of "0 of 0“ as it appears when logged in as admin ?


jetty-server.log

Caused by: org.springframework.orm.ObjectRetrievalFailureException: Unable to locate OnmsCategory named: Windows-Servers as specified in the surveillance view configuration file
        at org.opennms.features.vaadin.surveillanceviews.service.DefaultSurveillanceViewService$2.doInTransaction(DefaultSurveillanceViewService.java:233) ~[?:?]
        at org.opennms.features.vaadin.surveillanceviews.service.DefaultSurveillanceViewService$2.doInTransaction(DefaultSurveillanceViewService.java:224) ~[?:?]
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) ~[org.apache.servicemix.bundles.spring-tx-4.2.9.RELEASE_1.jar:?]
        at Proxy0f0b9387_06e3_4827_bfe5_b1691c9de511.execute(Unknown Source) ~[?:?]


Cheers
Norbert

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.