Bug 1004449 - Storage node not properly created during upgrade
Storage node not properly created during upgrade
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
4.9
Unspecified Unspecified
unspecified Severity urgent (vote)
: ---
: RHQ 4.9
Assigned To: John Sanda
Armine Hovsepyan
:
Depends On:
Blocks: 951619 1004431
  Show dependency treegraph
 
Reported: 2013-09-04 12:21 EDT by John Sanda
Modified: 2015-09-02 20:01 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-24 15:09:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sanda 2013-09-04 12:21:15 EDT
Description of problem:
During 4.9 development the maintenance_pending column was added to the rhq_storage_nodes table, and the maintenancePending field added to StorageNode.java. The field is a primitive boolean. During an upgrade from versions prior to 4.8, a storage node is created with a null value in the maintenance_pending column. This causing the following exception at server start up,

12:06:52,917 INFO  [org.rhq.enterprise.server.storage.StorageClientManagerBean] (pool-9-thread-1) Initializing storage client subsystem
12:06:52,934 ERROR [org.jboss.as.ejb3] (pool-9-thread-1) javax.ejb.EJBTransactionRolledbackException: org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of org.rhq.core.domain.cloud.StorageNode.maintenancePending
12:06:52,935 ERROR [org.jboss.as.ejb3.invocation] (pool-9-thread-1) JBAS014134: EJB Invocation failed on component StorageNodeManagerBean for method public abstract java.util.List org.rhq.enterprise.server.cloud.StorageNodeManagerLocal.getStorageNodes(): javax.ejb.EJBTransactionRolledbackException: org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of org.rhq.core.domain.cloud.StorageNode.maintenancePending


Two things need to be done. First, a not-null constraint needs to be added to the dbupgrade script. Secondly, the server installer code that creates the storage node entity needs to set the maintenance_pending column.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 John Sanda 2013-09-04 15:33:07 EDT
The changes to dbupgrade and to the server installer have been made. I tested this on a 4.7 upgrade.

master commit hash: 8f4561e803
Comment 2 Armine Hovsepyan 2013-09-05 07:29:42 EDT
verified -no PropertyAccessException visible anmore - leading to server upgrade (even though not started correctly --  see #1004731)
Comment 3 Heiko W. Rupp 2013-09-24 15:09:19 EDT
Bulk closing of RHQ 4.9 verified items

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