Bug 590718 - Fail upgrade JON 2.3.1 to JON 2.4 with Roles & Users
Fail upgrade JON 2.3.1 to JON 2.4 with Roles & Users
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
3.0.0
All Linux
high Severity medium (vote)
: ---
: ---
Assigned To: Simeon Pinder
Corey Welton
:
Depends On:
Blocks: rhq_triage jon24-ldap
  Show dependency treegraph
 
Reported: 2010-05-10 10:37 EDT by Rajan Timaniya
Modified: 2010-08-12 12:48 EDT (History)
0 users

See Also:
Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-12 12:48:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
rhq-server-log4j log (312.81 KB, text/x-log)
2010-05-10 10:37 EDT, Rajan Timaniya
no flags Details
UI Error (62.45 KB, image/png)
2010-05-10 10:38 EDT, Rajan Timaniya
no flags Details
UI error stack trace (223.46 KB, image/png)
2010-05-10 10:39 EDT, Rajan Timaniya
no flags Details

  None (edit)
Description Rajan Timaniya 2010-05-10 10:37:51 EDT
Created attachment 412860 [details]
rhq-server-log4j log

Description of problem:
Fail upgrade JON 2.3.1 to JON 2.4 with Roles & Users.

Version-Release number of selected component (if applicable):
Verified on JON build #131 - Revision: 10615
http://hudson-qe.rhq.rdu.redhat.com:8080/job/jon/131/

How reproducible:
Always

Steps to Reproduce:
1) Install JON 2.3.1 on Oracle 10g / Postgres (8.4.2)
2) Create role - 'test_role'
3) Create user - 'test123' and assign 'test_role' to the user
4) Upgrade JON 2.3.2 to JON build #131
5) Log-in to JON build #131 and click on role 'test-role'

Note: There is bug for both database Oracle and Postgres.
  
Actual results:
JON gives error: 'table or view does not exist'

Expected results:
JON should be upgrade with all role and users without any error/exception.

Additional info:
Error on Postgres
2010-05-10 18:29:18,724 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 42P01
2010-05-10 18:29:18,724 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: relation "rhq_role_ldap_group" does not exist

Error on Oracle
2010-05-10 17:48:03,471 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 942, SQLState: 42000
2010-05-10 17:48:03,472 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-00942: table or view does not exist

2010-05-10 17:48:23,169 ERROR [org.hibernate.hql.PARSER] <AST>:0:0: unexpected AST node: query
2010-05-10 17:48:23,169 ERROR [org.hibernate.hql.PARSER] <AST>:0:0: unexpected AST node: query
2010-05-10 17:48:23,170 ERROR [org.rhq.enterprise.server.scheduler.jobs.SavedSearchResultCountRecalculationJob] Could not calculate result count for SavedSearch[name=Downed Platforms, pattern='down platform']
2010-05-10 17:48:23,177 ERROR [org.hibernate.hql.PARSER] <AST>:0:0: unexpected AST node: query
2010-05-10 17:48:23,178 ERROR [org.hibernate.hql.PARSER] <AST>:0:0: unexpected AST node: query
2010-05-10 17:48:23,179 ERROR [org.rhq.enterprise.server.scheduler.jobs.SavedSearchResultCountRecalculationJob] Could not calculate result count for SavedSearch[name=Downed Servers, pattern='down server']
2010-05-10 17:48:38,451 INFO  [org.rhq.enterprise.server.content.ContentManagerBean] Merging packages for resource ID [10660]. Package count [1]
2010-05-10 17:48:38,470 INFO  [org.rhq.enterprise.server.content.ContentManagerBean] Finished merging 1 packages in 19ms
2010-05-10 17:48:45,823 INFO  [org.rhq.enterprise.server.discovery.DiscoveryServerServiceImpl] Processed AV:[rajanlaptop.usersys.redhat.com][834][full] - need full=[false] in (758)ms
2010-05-10 17:49:08,457 INFO  [org.rhq.enterprise.server.content.ContentManagerBean] Merging packages for resource ID [10661]. Package count [1]
2010-05-10 17:49:08,479 INFO  [org.rhq.enterprise.server.content.ContentManagerBean] Finished merging 1 packages in 22ms
2010-05-10 17:49:23,165 ERROR [org.hibernate.hql.PARSER] <AST>:0:0: unexpected AST node: query
2010-05-10 17:49:23,165 ERROR [org.hibernate.hql.PARSER] <AST>:0:0: unexpected AST node: query
2010-05-10 17:49:23,167 ERROR [org.rhq.enterprise.server.scheduler.jobs.SavedSearchResultCountRecalculationJob] Could not calculate result count for SavedSearch[name=Downed Platforms, pattern='down platform']
2010-05-10 17:49:23,174 ERROR [org.hibernate.hql.PARSER] <AST>:0:0: unexpected AST node: query
2010-05-10 17:49:23,174 ERROR [org.hibernate.hql.PARSER] <AST>:0:0: unexpected AST node: query
2010-05-10 17:49:23,175 ERROR [org.rhq.enterprise.server.scheduler.jobs.SavedSearchResultCountRecalculationJob] Could not calculate result count for SavedSearch[name=Downed Servers, pattern='down server']
Comment 1 Rajan Timaniya 2010-05-10 10:38:42 EDT
Created attachment 412861 [details]
UI Error
Comment 2 Rajan Timaniya 2010-05-10 10:39:09 EDT
Created attachment 412862 [details]
UI error stack trace
Comment 3 Simeon Pinder 2010-05-13 17:39:41 EDT
I've reproduced this.  It can also be reproduced without creating any roles on a fresh upgrade by attempting to browse an available role.  

The dbupgrade sql was not complete and did not include some of the necessary tables used by ldap mappings.  Not sure how we missed this up to now or in our last dbupgrade discussion about this. 

Checked in missing upgrade logic.  Passes testing on my local postgres instance, but still needs oracle and further testing. 

Fixed in successful build of master >= 303 with:
commit abc4d3ebd679a9d8e17e1759caa8f5991c314b7a
Comment 4 Rajan Timaniya 2010-05-14 09:19:14 EDT
Verified on JON build #147
http://hudson-qe.rhq.rdu.redhat.com:8080/job/jon/147/

Steps:
1) Install JON 2.3.1 on Oracle 10g / Postgres (8.4.2)
2) Create role - 'Test_Role'
3) Create user - 'rajan' and assign 'Test_Role' to the user
4) Upgrade JON 2.3.2 to JON build #147
5) Log-in to JON build #147 and click on role 'test-role'

JON is working fine with role and users after upgrade JON 2.3.1 to JON 2.4 (JON build #147).
Comment 5 Corey Welton 2010-08-12 12:48:52 EDT
Mass-closure of verified bugs against JON.

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