[rhq] modules/core

Jay Shaughnessy jshaughn at fedoraproject.org
Wed Aug 29 19:40:59 UTC 2012


 modules/core/dbutils/pom.xml                                                    |    2 
 modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml                  |   23 +++++++++-
 modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java |    2 
 3 files changed, 24 insertions(+), 3 deletions(-)

New commits:
commit 35c152e87e280d8a5cd93353892da39067883819
Author: Jay Shaughnessy <jshaughn at redhat.com>
Date:   Wed Aug 29 15:39:00 2012 -0400

    [Bug 852561 - AlertCondition.name is null in database after JON 2.4 to 3.1 upgrade]
    From an RHQ perspective this should have affected upgrades to RHQ 4.4.  Add
    a db upgrade step to convert relevant alert condition rows to the new format.

diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index d4b5505..eee04da 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -17,7 +17,7 @@
     <description>Database schema setup, upgrade and other utilities</description>
 
     <properties>
-        <db.schema.version>2.122</db.schema.version>
+        <db.schema.version>2.123</db.schema.version>
         <rhq.ds.type-mapping>${rhq.test.ds.type-mapping}</rhq.ds.type-mapping>
         <rhq.ds.server-name>${rhq.test.ds.server-name}</rhq.ds.server-name>
         <rhq.ds.db-name>${rhq.test.ds.db-name}</rhq.ds.db-name>
diff --git a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
index 2cee9f4..94fa46f 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -4007,7 +4007,28 @@
               <schema-javaTask className="ContentSourceConfigurationObfuscationUpgradeTask" />
             </schemaSpec>
 
-             <schemaSpec version="2.122">
+<!-- RHQ 4.4, JON 3.1.0 RELEASE uses DB Schema 2.121 -->
+            
+            <schemaSpec version="2.122">
+                <statement desc="Updating DOWN Alert Conditions to new format">
+                    UPDATE RHQ_ALERT_CONDITION
+                       SET NAME = 'AVAIL_GOES_DOWN', OPTION_STATUS = NULL 
+                     WHERE TYPE = 'AVAILABILITY' 
+                       AND NAME IS NULL
+                       AND OPTION_STATUS = 'DOWN'
+                </statement>
+                <statement desc="Updating UP Alert Conditions to new format">
+                    UPDATE RHQ_ALERT_CONDITION
+                       SET NAME = 'AVAIL_GOES_UP', OPTION_STATUS = NULL 
+                     WHERE TYPE = 'AVAILABILITY'
+                       AND NAME IS NULL
+                       AND OPTION_STATUS = 'UP'
+                </statement>                
+            </schemaSpec>
+            
+<!-- JON 3.1.1 RELEASE uses DB Schema 2.122 -->            
+
+            <schemaSpec version="2.123">
                <schema-addColumn   table="RHQ_CONFIG_PROP_DEF" column="MIN_ENTRIES" columnType="INTEGER"/>
                <schema-addColumn   table="RHQ_CONFIG_PROP_DEF" column="MAX_ENTRIES" columnType="INTEGER"/>
             </schemaSpec>
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java
index 8a72244..0744199 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java
@@ -427,7 +427,7 @@ public class AlertCondition implements Serializable {
     /**
      * The name of the condition whose semantics are different based on this condition's category:
      * 
-     * AVAILABILITY: n/a (null)
+     * AVAILABILITY: The relevant Avail AlertConditionOperator name
      * THRESHOLD: the name of the metric (TODO: today its the display name, very bad for i18n purposes)
      * BASELINE: the name of the metric (TODO: today its the display name, very bad for i18n purposes)
      * CHANGE: the name of the metric (TODO: today its the display name, very bad for i18n purposes)




More information about the rhq-commits mailing list