java/code/src/com/redhat/rhn/frontend/strings/template/StringResource_en_US.xml
| 46 ++++++----
java/code/src/com/redhat/rhn/taskomatic/task/SatelliteCertificateCheck.java
| 22 +++-
schema/spacewalk/common/data/rhnTaskoBunch.sql
| 3
schema/spacewalk/oracle/data/rhnTaskoTemplate.sql
| 7 -
schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/020-rhnTaskoBunch_data.sql
| 3
schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/022-rhnTaskoTemplate_data.sql
| 7 -
6 files changed, 48 insertions(+), 40 deletions(-)
New commits:
commit 32f2dfd5ce49c4ba49cc3bddf45d9507bfaafc4a
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Sep 30 17:45:07 2010 +0200
638893 - removing duplicate cert-check-bunch
diff --git a/schema/spacewalk/common/data/rhnTaskoBunch.sql
b/schema/spacewalk/common/data/rhnTaskoBunch.sql
index 025fe91..4338063 100644
--- a/schema/spacewalk/common/data/rhnTaskoBunch.sql
+++ b/schema/spacewalk/common/data/rhnTaskoBunch.sql
@@ -46,9 +46,6 @@ INSERT INTO rhnTaskoBunch (id, name, description, org_bunch)
VALUES (rhn_tasko_bunch_id_seq.nextval, 'session-cleanup-bunch',
'Deletes expired rows from the PXTSessions table to keep it from growing too
large', '');
INSERT INTO rhnTaskoBunch (id, name, description, org_bunch)
- VALUES (rhn_tasko_bunch_id_seq.nextval, 'cert-check-bunch',
'Satellite certificate check', '');
-
-INSERT INTO rhnTaskoBunch (id, name, description, org_bunch)
VALUES (rhn_tasko_bunch_id_seq.nextval, 'sandbox-cleanup-bunch',
'Clean up sandbox', '');
INSERT INTO rhnTaskoBunch (id, name, description, org_bunch)
diff --git a/schema/spacewalk/oracle/data/rhnTaskoTemplate.sql
b/schema/spacewalk/oracle/data/rhnTaskoTemplate.sql
index 4253a1a..310d746 100644
--- a/schema/spacewalk/oracle/data/rhnTaskoTemplate.sql
+++ b/schema/spacewalk/oracle/data/rhnTaskoTemplate.sql
@@ -79,13 +79,6 @@ INSERT INTO rhnTaskoTemplate (id, bunch_id, task_id, ordering,
start_if)
INSERT INTO rhnTaskoTemplate (id, bunch_id, task_id, ordering, start_if)
VALUES (rhn_tasko_template_id_seq.nextval,
- (SELECT id FROM rhnTaskoBunch WHERE
name='cert-check-bunch'),
- (SELECT id FROM rhnTaskoTask WHERE
name='sat-cert-check'),
- 0,
- '');
-
-INSERT INTO rhnTaskoTemplate (id, bunch_id, task_id, ordering, start_if)
- VALUES (rhn_tasko_template_id_seq.nextval,
(SELECT id FROM rhnTaskoBunch WHERE
name='sandbox-cleanup-bunch'),
(SELECT id FROM rhnTaskoTask WHERE
name='sandbox-cleanup'),
0,
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/020-rhnTaskoBunch_data.sql
b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/020-rhnTaskoBunch_data.sql
index cfb244f..b4dbc1d 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/020-rhnTaskoBunch_data.sql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/020-rhnTaskoBunch_data.sql
@@ -46,9 +46,6 @@ INSERT INTO rhnTaskoBunch (id, name, description, org_bunch)
VALUES (rhn_tasko_bunch_id_seq.nextval, 'session-cleanup-bunch',
'Deletes expired rows from the PXTSessions table to keep it from growing too
large', '');
INSERT INTO rhnTaskoBunch (id, name, description, org_bunch)
- VALUES (rhn_tasko_bunch_id_seq.nextval, 'cert-check-bunch',
'Satellite certificate check', '');
-
-INSERT INTO rhnTaskoBunch (id, name, description, org_bunch)
VALUES (rhn_tasko_bunch_id_seq.nextval, 'sandbox-cleanup-bunch',
'Clean up sandbox', '');
INSERT INTO rhnTaskoBunch (id, name, description, org_bunch)
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/022-rhnTaskoTemplate_data.sql
b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/022-rhnTaskoTemplate_data.sql
index 0082d64..7f6f93b 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/022-rhnTaskoTemplate_data.sql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/022-rhnTaskoTemplate_data.sql
@@ -79,13 +79,6 @@ INSERT INTO rhnTaskoTemplate (id, bunch_id, task_id, ordering,
start_if)
INSERT INTO rhnTaskoTemplate (id, bunch_id, task_id, ordering, start_if)
VALUES (rhn_tasko_template_id_seq.nextval,
- (SELECT id FROM rhnTaskoBunch WHERE
name='cert-check-bunch'),
- (SELECT id FROM rhnTaskoTask WHERE
name='sat-cert-check'),
- 0,
- '');
-
-INSERT INTO rhnTaskoTemplate (id, bunch_id, task_id, ordering, start_if)
- VALUES (rhn_tasko_template_id_seq.nextval,
(SELECT id FROM rhnTaskoBunch WHERE
name='sandbox-cleanup-bunch'),
(SELECT id FROM rhnTaskoTask WHERE
name='sandbox-cleanup'),
0,
commit 9bb02727bdf76339ad45fbaf00932b0bd50867e4
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Sep 30 17:13:33 2010 +0200
distinguish spacewalk and satellite email body, when certificate expires
diff --git
a/java/code/src/com/redhat/rhn/frontend/strings/template/StringResource_en_US.xml
b/java/code/src/com/redhat/rhn/frontend/strings/template/StringResource_en_US.xml
index 6e7d2dc..8d01d6c 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/template/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/template/StringResource_en_US.xml
@@ -547,7 +547,7 @@ Thank you for using @@PRODUCT_NAME@@.
</trans-unit>
<trans-unit id="email.satellitecert.graceperiod.subject">
-<source>Red Hat @@PRODUCT_NAME@@ Server Certificate expiration
warning</source>
+<source>@@PRODUCT_NAME@@ Certificate expiration warning</source>
<context-group name="ctx">
<context context-type="sourcefile">Taskomatic:
@@PRODUCT_NAME@@CertificateCheck</context>
</context-group>
@@ -558,14 +558,8 @@ Thank you for using @@PRODUCT_NAME@@.
Dear @@PRODUCT_NAME@@ User,
This email is being sent to you to inform you that your @@PRODUCT_NAME@@ Certificate
-has expired on your local satellite {0}. After {1} day(s) the systems
-management services provided by your @@PRODUCT_NAME@@ Server will become inaccessible.
-Please contact your regional Red Hat Customer Service Representative for information
-on how to renew your @@PRODUCT_NAME@@ Certificate.
-
-Thank you for using @@PRODUCT_NAME@@.
---the @@PRODUCT_NAME@@ Team
-</source>
+has expired on your {0} server. After {1} day(s) the systems
+management services provided by your @@PRODUCT_NAME@@ Server will become
inaccessible.</source>
<context-group name="ctx">
<context context-type="sourcefile">Taskomatic:
@@PRODUCT_NAME@@CertificateCheck</context>
<context context-type="paramnotes">
@@ -576,20 +570,28 @@ Thank you for using @@PRODUCT_NAME@@.
</trans-unit>
<trans-unit id="email.satellitecert.expired.subject">
-<source>Red Hat satellite certificate expiration notice</source>
+<source>@@PRODUCT_NAME@@ Certificate expiration notice</source>
<context-group name="ctx">
<context context-type="sourcefile">Taskomatic:
@@PRODUCT_NAME@@CertificateCheck</context>
</context-group>
</trans-unit>
- <trans-unit id="email.satellitecert.expired.body">
+ <trans-unit id="email.satellitecert.spwbodyend">
<source>
-Dear @@PRODUCT_NAME@@ User,
-This email is being sent to you to inform you that your @@PRODUCT_NAME@@ Certificate
-has expired on your local satellite {0}. The system management services will be
inaccessible
-until your certificate is renewed. Please contact your regional Red Hat
-Customer Service Representative for information on how to renew your @@PRODUCT_NAME@@
Certificate.
+
+Thank you for using @@PRODUCT_NAME@@.
+--the @@PRODUCT_NAME@@ Team
+</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">Taskomatic:
@@PRODUCT_NAME@@CertificateCheck</context>
+ </context-group>
+ </trans-unit>
+
+ <trans-unit id="email.satellitecert.satbodyend">
+<source>
+Please contact your regional Red Hat Customer Service Representative for information
+on how to renew your @@PRODUCT_NAME@@ Certificate.
Thank you for using @@PRODUCT_NAME@@.
@@ -597,6 +599,18 @@ Thank you for using @@PRODUCT_NAME@@.
</source>
<context-group name="ctx">
<context context-type="sourcefile">Taskomatic:
@@PRODUCT_NAME@@CertificateCheck</context>
+ </context-group>
+ </trans-unit>
+
+ <trans-unit id="email.satellitecert.expired.body">
+<source>
+Dear @@PRODUCT_NAME@@ User,
+
+This email is being sent to you to inform you that your @@PRODUCT_NAME@@ Certificate
+has expired on your {0} server. The system management services will be inaccessible
+until your certificate is renewed.</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">Taskomatic:
@@PRODUCT_NAME@@CertificateCheck</context>
<context context-type="paramnotes">{0} - Hostname of the
@@PRODUCT_NAME@@ Whose Cert has Expired:
highwind.devel.redhat.com </context>
</context-group>
</trans-unit>
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/SatelliteCertificateCheck.java
b/java/code/src/com/redhat/rhn/taskomatic/task/SatelliteCertificateCheck.java
index 7dae87e..41db20a 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/SatelliteCertificateCheck.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/SatelliteCertificateCheck.java
@@ -43,9 +43,16 @@ public class SatelliteCertificateCheck extends RhnJavaJob {
CertificateManager man = CertificateManager.getInstance();
if (man.isSatelliteCertExpired()) {
- sendMessage(ls.getMessage("email.satellitecert.expired.subject"),
- ls.getMessage("email.satellitecert.expired.body",
- ConfigDefaults.get().getHostname()));
+ String body = ls.getMessage("email.satellitecert.expired.body",
+ ConfigDefaults.get().getHostname());
+ if (ConfigDefaults.get().isSpacewalk()) {
+ body += ls.getMessage("email.satellitecert.spwbodyend");
+ }
+ else {
+ body += ls.getMessage("email.satellitecert.satbodyend");
+ }
+ sendMessage(ls.getMessage("email.satellitecert.expired.subject"),
+ body);
}
else if (man.isSatelliteCertInGracePeriod()) {
long daysUntilExpiration = (man.getGracePeriodEndDate().getTime() -
@@ -55,8 +62,15 @@ public class SatelliteCertificateCheck extends RhnJavaJob {
Object[] args = new String[2];
args[0] = ConfigDefaults.get().getHostname();
args[1] = new Long(daysUntilExpiration).toString();
+ String body = ls.getMessage("email.satellitecert.graceperiod.body",
args);
+ if (ConfigDefaults.get().isSpacewalk()) {
+ body += ls.getMessage("email.satellitecert.spwbodyend");
+ }
+ else {
+ body += ls.getMessage("email.satellitecert.satbodyend");
+ }
sendMessage(ls.getMessage("email.satellitecert.graceperiod.subject"),
- ls.getMessage("email.satellitecert.graceperiod.body",
args));
+ body);
}
}