[rhq] Branch 'release/jon3.1.x' - modules/core

Jay Shaughnessy jshaughn at fedoraproject.org
Wed Aug 29 20:05:48 UTC 2012


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

New commits:
commit 5fa64f5e918cda73557bb1dfe7c6c23a648cc9be
Author: Jay Shaughnessy <jshaughn at redhat.com>
Date:   Wed Aug 29 15:59:37 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.
    
    Conflicts:
    
    	modules/core/dbutils/pom.xml
    	modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
    
    Cherry-pick of master 35c152e87e280d8a5cd93353892da39067883819

diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 9f6171f..6b2fe41 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.121</db.schema.version>
+        <db.schema.version>2.122</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 312da82..f189c3d 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -4006,6 +4006,26 @@
             <schemaSpec version="2.121">
               <schema-javaTask className="ContentSourceConfigurationObfuscationUpgradeTask" />
             </schemaSpec>
+
+<!-- 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>
+            
         </dbupgrade>
     </target>
 </project>
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 064400c..62165e4 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
@@ -421,7 +421,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