Bug 1081554
| Summary: | Cannot load metrics error on a resource with no enabled metrics | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | Filip Brychta <fbrychta> | ||||
| Component: | Core Server, Monitoring | Assignee: | Jirka Kremser <jkremser> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 4.11 | CC: | hrupp | ||||
| Target Milestone: | --- | ||||||
| Target Release: | RHQ 4.11 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-07-21 10:13:47 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: |
|
||||||
Bug 1078785 is similar The issue there is that the HQL query is executed even if no metrics are enabled/present on the resource(s). So it results in "...WHERE ms.definition.id IN () ..." nothing in the parentheses. Not sure, but it looks like a regression of this commit 98b52a8c85836b6b5dbd8f2996a7037f52a92637 I'll add some checks on the client GWT side not to perform the fetch if enabledScheduleDefinitionIds array is empty and also for the server side: not to perform the query if an empty array if ints was passed in as arg. ^ Renaming the BZ, because it has nothing to do with fresh RHQ installation. I was able to reproduce it even with couple of hours running instance, while, at the same time, it worked on a vanilla instance if there was some enabled metrics on the resource. branch: master link: https://github.com/rhq-project/rhq/commit/191e6c7ce time: 2014-03-28 17:01:31 +0100 commit: 191e6c7ced414bd7b5d2a138227ee4ae8d87d021 author: Jirka Kremser - jkremser message: [BZ 1081554] - Cannot load metrics error on a resource with no enabled metrics - Not performing the problematic DB query, when no metric on the resource is enabled. Also saving 2 (client-server)) round trips if the enabled metrics # equals to zero. *** Bug 1078785 has been marked as a duplicate of this bug. *** Verified on Version : 4.11.0-SNAPSHOT Build Number : bc47bf3 Bulk closing of RHQ 4.11 issues, now that RHQ 4.12 is out. If you find an issue with those, please open a new BZ, linking to the old one. |
Created attachment 879518 [details] server log Description of problem: Cannot load metrics error on fresh installation of RHQ is thrown when visiting Monitoring tab via GUI. Version-Release number of selected component (if applicable): Version : 4.11.0-SNAPSHOT Build Number : ce4e250 How reproducible: Always Steps to Reproduce: 1. have fresh installation of RHQ 2. navigate to some resource's Monitoring tab Actual results: Metrics are not displayed and following error is thrown Error Time : Thursday, March 27, 2014 3:38:03 PM UTC+1 Root Cause : org.hibernate.hql.internal.ast.QuerySyntaxException:unexpected end of subtree [SELECT ms FROM org.rhq.core.domain.measurement.MeasurementSchedule ms WHERE ms.definition.id IN () AND ms.resource.id IN (:resourceIds)] Expected results: No errors Additional info: See complete exception in attached server.log