java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/common/db/datasource/xml/SystemGroup_queries.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit b0b4c2d7e0a0bf55c50d996a35f05d4f6703d0c3
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Tue Nov 3 13:12:14 2009 -0500
531645 - fixing query with mistaken id reference
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/SystemGroup_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/SystemGroup_queries.xml
index 62c7868..03bc8d2 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/SystemGroup_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/SystemGroup_queries.xml
@@ -26,7 +26,7 @@
and exists (select 1 from rhnServerNeededErrataCache SNPC, rhnServerGroupMembers SGM
where snpc.errata_id = e.id
and snpc.server_id = sgm.server_id
- and sgm.server_group_id = 5)
+ and sgm.server_group_id = G.id)
and rownum = 1) AS SECURITY_ERRATA,
( select /*+first_rows*/ 1
FROM rhnErrata E
@@ -34,7 +34,7 @@
and exists (select 1 from rhnServerNeededErrataCache SNPC, rhnServerGroupMembers SGM
where snpc.errata_id = e.id
and snpc.server_id = sgm.server_id
- and sgm.server_group_id = 5)
+ and sgm.server_group_id = G.id)
and rownum = 1) AS BUG_ERRATA,
( select /*+first_rows*/ 1
FROM rhnErrata E
@@ -42,7 +42,7 @@
and exists (select 1 from rhnServerNeededErrataCache SNPC, rhnServerGroupMembers SGM
where snpc.errata_id = e.id
and snpc.server_id = sgm.server_id
- and sgm.server_group_id = 5)
+ and sgm.server_group_id = G.id)
and rownum = 1) AS ENHANCEMENT_ERRATA
FROM rhnServerGroup G, rhnUserManagedServerGroups UMSG
WHERE G.ORG_ID = :org_id
14 years, 5 months
web/modules
by Justin Sherrill
web/modules/sniglets/Sniglets/ChannelEditor.pm | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit d3b314be46280dcc5099f64f8fd51c50b3c592a6
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Tue Nov 3 11:29:35 2009 -0500
527881 - fixed issue where set was cleared when interacting with the channel merge page
diff --git a/web/modules/sniglets/Sniglets/ChannelEditor.pm b/web/modules/sniglets/Sniglets/ChannelEditor.pm
index 7e39817..922751d 100644
--- a/web/modules/sniglets/Sniglets/ChannelEditor.pm
+++ b/web/modules/sniglets/Sniglets/ChannelEditor.pm
@@ -880,10 +880,13 @@ sub channel_sync_prompt {
my %s = (target_channel => sprintf("<strong>%s</strong>", $target->label),
source_channel => sprintf("<strong>%s</strong>", $source->label));
- # Clear the packages for merge set to remove any old selections:
- my $set = RHN::Set->lookup(-label => 'packages_for_merge', -uid => $pxt->user->id);
- $set->empty;
- $set->commit;
+ #only clear if sync_type is not set, otherwise we clear the set on pagination
+ if (!$pxt->dirty_param("sync_type")) {
+ # Clear the packages for merge set to remove any old selections:
+ my $set = RHN::Set->lookup(-label => 'packages_for_merge', -uid => $pxt->user->id);
+ $set->empty;
+ $set->commit;
+ }
return PXT::Utils->perform_substitutions($params{__block__}, \%s);
}
14 years, 5 months
spacewalk/setup
by Michael Mraka
spacewalk/setup/bin/cobbler-setup | 4 +++-
spacewalk/setup/bin/spacewalk-setup | 6 ++++--
2 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 2ed45f50022c4b24f815d4df461223a58603fda7
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Nov 3 12:04:06 2009 +0100
make installer questions look more consistent
diff --git a/spacewalk/setup/bin/cobbler-setup b/spacewalk/setup/bin/cobbler-setup
index 0d7e3b2..e515288 100755
--- a/spacewalk/setup/bin/cobbler-setup
+++ b/spacewalk/setup/bin/cobbler-setup
@@ -38,10 +38,12 @@ def copy(src, dest):
def ask_yes_no(question, default_val = None):
if default_val and default_val.lower() == 'y':
default_val = 'y'
+ default_q = '[Y/n]'
else:
default_val = 'n'
+ default_q = '[y/N]'
- ans = raw_input(question + " (y/n, default = '%s')?" % default_val)
+ ans = raw_input(question + " " + default_q + "?")
if not ans:
return default_val == 'y'
diff --git a/spacewalk/setup/bin/spacewalk-setup b/spacewalk/setup/bin/spacewalk-setup
index 252a5e4..2891d80 100755
--- a/spacewalk/setup/bin/spacewalk-setup
+++ b/spacewalk/setup/bin/spacewalk-setup
@@ -222,9 +222,10 @@ sub remove_old_jvm {
Spacewalk::Setup::ask(
-noninteractive => $opts{"non-interactive"},
- -question => "Should setup remove these packages y/n",
+ -question => "Should setup remove these packages",
-test => sub { my $text = shift; return $text =~ /^[YyNn]/ },
-answer => \$answers->{"remove-old-jvm"},
+ -default => 'Y',
);
unless ( $answers->{"remove-old-jvm"} =~ /^[Yy]/ ) {
print Spacewalk::Setup::loc("** Skipping removal of old java packages.\n");
@@ -443,9 +444,10 @@ sub setup_ssl_vhost {
}
Spacewalk::Setup::ask(
-noninteractive => $opts{"non-interactive"},
- -question => "Should setup configure apache's default ssl server for you (saves original ssl.conf) y/n",
+ -question => "Should setup configure apache's default ssl server for you (saves original ssl.conf)",
-test => sub { my $text = shift; return $text =~ /^[YyNn]/ },
-answer => \$answers->{"ssl-config-sslvhost"},
+ -default => 'Y',
);
unless ( $answers->{"ssl-config-sslvhost"} =~ /^[Yy]/ ) {
print Spacewalk::Setup::loc("** Skipping SSL virtual host configuration.\n");
14 years, 5 months
7 commits - java/code java/conf schema/spacewalk
by Tomas Lestach
java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml | 15
java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml | 18 +
java/code/src/com/redhat/rhn/frontend/action/audit/AuditSearchAction.java | 1
java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/OverviewAction.java | 36 --
java/code/src/com/redhat/rhn/frontend/dto/SystemOverview.java | 13
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 164 +++++++---
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 7
java/code/src/com/redhat/rhn/manager/audit/AuditManager.java | 4
java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java | 21 +
java/code/src/com/redhat/rhn/manager/system/SystemManager.java | 12
java/code/src/com/redhat/rhn/taskomatic/task/CompareConfigFilesTask.java | 103 ++++++
java/code/webapp/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf | 17 -
java/conf/default/rhn_taskomatic.conf | 4
schema/spacewalk/oracle/views/rhnServerOverview.sql | 20 +
schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/151-rhnServerOverview.sql | 100 ++++++
15 files changed, 460 insertions(+), 75 deletions(-)
New commits:
commit a04235810ba4353e4e6dc171204908139d240227
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Tue Nov 3 11:27:59 2009 +0100
standart Red Hat header added to CompareConfigFilesTask.java
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/CompareConfigFilesTask.java b/java/code/src/com/redhat/rhn/taskomatic/task/CompareConfigFilesTask.java
index 9609238..bc0127b 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/CompareConfigFilesTask.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/CompareConfigFilesTask.java
@@ -1,4 +1,17 @@
-
+/**
+ * Copyright (c) 2009 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
package com.redhat.rhn.taskomatic.task;
import com.redhat.rhn.domain.action.Action;
commit 4a7715cac0e35f31bec4576a15e0becbc1e89b5b
Author: Joshua Roys <joshua.roys(a)gtri.gatech.edu>
Date: Fri Oct 9 11:28:02 2009 -0400
Show number of differing config files in overview
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
index 6a5979a..74d293d 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
@@ -1100,6 +1100,7 @@ ORDER BY S.ID
SELECT /*+ RULE */ SERVER_ID AS ID, OUTDATED_PACKAGES, SERVER_NAME, security_errata, bug_errata, enhancement_errata,
SERVER_ADMINS, GROUP_COUNT, NOTE_COUNT, MODIFIED, CHANNEL_LABELS, CHANNEL_ID, HISTORY_COUNT,
LAST_CHECKIN_DAYS_AGO, PENDING_UPDATES, OS, RELEASE, SERVER_ARCH_NAME, LAST_CHECKIN, LOCKED,
+ config_files_with_differences,
( SELECT DECODE(
MAX(DECODE(PS.state, 'OK', 1, 'PENDING', 2, 'UNKNOWN', 3, 'WARNING', 4, 'CRITICAL', 5)),
1, 'OK', 2, 'PENDING', 3, 'UNKNOWN', 4, 'WARNING', 5, 'CRITICAL') ST
@@ -1132,6 +1133,7 @@ select distinct sgm.server_id as ID, 1 as virtual_host
SELECT SERVER_ID AS ID, SECURITY_ERRATA, BUG_ERRATA, ENHANCEMENT_ERRATA, OUTDATED_PACKAGES, SERVER_NAME,
SERVER_ADMINS, GROUP_COUNT, NOTE_COUNT, MODIFIED, CHANNEL_LABELS, HISTORY_COUNT,
LAST_CHECKIN_DAYS_AGO, PENDING_UPDATES, OS, RELEASE, SERVER_ARCH_NAME, LAST_CHECKIN, LOCKED,
+ config_files_with_differences,
( SELECT DECODE(
MAX(DECODE(PS.state, 'OK', 1, 'PENDING', 2, 'UNKNOWN', 3, 'WARNING', 4, 'CRITICAL', 5)),
1, 'OK', 2, 'PENDING', 3, 'UNKNOWN', 4, 'WARNING', 5, 'CRITICAL') ST
@@ -1149,6 +1151,7 @@ ORDER BY SECURITY_ERRATA DESC, BUG_ERRATA DESC, ENHANCEMENT_ERRATA DESC
SERVER_ID as system_id, SECURITY_ERRATA, BUG_ERRATA, ENHANCEMENT_ERRATA, OUTDATED_PACKAGES, SERVER_NAME,
SERVER_ADMINS, GROUP_COUNT, NOTE_COUNT, OV.MODIFIED, CHANNEL_LABELS, CHANNEL_ID, HISTORY_COUNT,
LAST_CHECKIN_DAYS_AGO, PENDING_UPDATES, OS, RELEASE, SERVER_ARCH_NAME, LAST_CHECKIN, LOCKED,
+ config_files_with_differences,
( SELECT DECODE(
MAX(DECODE(PS.state, 'OK', 1, 'PENDING', 2, 'UNKNOWN', 3, 'WARNING', 4, 'CRITICAL', 5)),
1, 'OK', 2, 'PENDING', 3, 'UNKNOWN', 4, 'WARNING', 5, 'CRITICAL') ST
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/SystemOverview.java b/java/code/src/com/redhat/rhn/frontend/dto/SystemOverview.java
index ff7c41d..5a18f5c 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/SystemOverview.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/SystemOverview.java
@@ -39,6 +39,7 @@ public class SystemOverview extends BaseDto implements Serializable {
private Long bugErrata = 0L;
private Long enhancementErrata = 0L;
private Long outdatedPackages;
+ private Long configFilesWithDifferences;
private String serverName;
private Long serverAdmins;
private Long groupCount;
@@ -318,6 +319,18 @@ public class SystemOverview extends BaseDto implements Serializable {
this.outdatedPackages = outdatedPackagesIn;
}
/**
+ * @return Returns the configFilesWithDifferences.
+ */
+ public Long getConfigFilesWithDifferences() {
+ return configFilesWithDifferences;
+ }
+ /**
+ * @param configFilesWithDifferencesIn The configFilesWithDifferences to set.
+ */
+ public void setConfigFilesWithDifferences(Long configFilesWithDifferencesIn) {
+ this.configFilesWithDifferences = configFilesWithDifferencesIn;
+ }
+ /**
* @return Returns the pendingUpdates.
*/
public Long getPendingUpdates() {
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index 221f448..5a485c2 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -5292,6 +5292,13 @@ value for this entitlement, excluding the default organization's consumption.</s
</context-group>
</trans-unit>
+ <trans-unit id="systemlist.jsp.configfiles">
+<source>Configs</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/SystemList</context>
+ </context-group>
+ </trans-unit>
+
<trans-unit id="systemlist.jsp.packages">
<source>Packages</source>
<context-group name="ctx">
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf
index 6a48ef8..7110391 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf
@@ -85,7 +85,22 @@
</c:choose>
</rl:column>
</c:if>
-
+ <c:if test = "${empty noConfigFiles}">
+ <rl:column sortable="false"
+ bound="false"
+ headerkey="systemlist.jsp.configfiles"
+ styleclass="center"
+ headerclass="thin-column">
+ <c:choose>
+ <c:when test="${(current.configFilesWithDifferences) == 0}">
+ <c:out value="0" />
+ </c:when>
+ <c:otherwise>
+ <c:out value="<a href='/rhn/systems/details/configuration/Overview.do?sid=${current.id}'>${current.configFilesWithDifferences}</a>" escapeXml="false" />
+ </c:otherwise>
+ </c:choose>
+ </rl:column>
+ </c:if>
<!-- Name Channel Column -->
<rl:column sortable="true"
bound="false"
diff --git a/schema/spacewalk/oracle/views/rhnServerOverview.sql b/schema/spacewalk/oracle/views/rhnServerOverview.sql
index 274da86..cd9d51f 100644
--- a/schema/spacewalk/oracle/views/rhnServerOverview.sql
+++ b/schema/spacewalk/oracle/views/rhnServerOverview.sql
@@ -31,6 +31,7 @@ rhnServerOverview
bug_errata,
enhancement_errata,
outdated_packages,
+ config_files_with_differences,
last_checkin_days_ago,
last_checkin,
pending_updates,
@@ -77,7 +78,24 @@ select
where
snpc.server_id = S.id
and p.id = snpc.package_id
- ),
+ ),
+ ( select count(*)
+ from rhnActionConfigRevision ACR
+ INNER JOIN rhnActionConfigRevisionResult ACRR on ACR.id = ACRR.action_config_revision_id
+ where ACR.server_id = S.id
+ and ACR.action_id = (
+ select MAX(rA.id)
+ from rhnAction rA
+ INNER JOIN rhnServerAction rSA on rSA.action_id = rA.id
+ INNER JOIN rhnActionStatus rAS on rAS.id = rSA.status
+ INNER JOIN rhnActionType rAT on rAT.id = rA.action_type
+ where rSA.server_id = S.id
+ and rAS.name in ('Completed', 'Failed')
+ and rAT.label = 'configfiles.diff'
+ )
+ and ACR.failure_id is null
+ and ACRR.result is not null
+ ),
( select sysdate - checkin from rhnServerInfo where server_id = S.id ),
( select TO_CHAR(checkin, 'YYYY-MM-DD HH24:MI:SS') from rhnServerInfo where server_id = S.id ),
( select count(1)
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/151-rhnServerOverview.sql b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/151-rhnServerOverview.sql
new file mode 100644
index 0000000..068e6b5
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/151-rhnServerOverview.sql
@@ -0,0 +1,100 @@
+--
+-- Add in config_files_with_differences
+--
+
+create or replace view
+rhnServerOverview
+(
+ org_id,
+ server_id,
+ server_name,
+ note_count,
+ modified,
+ server_admins,
+ group_count,
+ channel_id,
+ channel_labels,
+ history_count,
+ security_errata,
+ bug_errata,
+ enhancement_errata,
+ outdated_packages,
+ config_files_with_differences,
+ last_checkin_days_ago,
+ last_checkin,
+ pending_updates,
+ os,
+ release,
+ server_arch_name,
+ locked
+)
+as
+select
+ s.org_id, s.id, s.name, 0, s.modified,
+ ( select count(user_id) from rhnUserServerPerms ap
+ where server_id = s.id ),
+ ( select count(server_group_id) from rhnVisibleServerGroupMembers
+ where server_id = s.id ),
+ ( select C.id
+ from rhnChannel C,
+ rhnServerChannel SC
+ where SC.server_id = S.id
+ and SC.channel_id = C.id
+ and C.parent_channel IS NULL),
+ NVL(( select C.name
+ from rhnChannel C,
+ rhnServerChannel SC
+ where SC.server_id = S.id
+ and SC.channel_id = C.id
+ and C.parent_channel IS NULL), '(none)'),
+ ( select count(id) from rhnServerHistory
+ where
+ server_id = S.id),
+ ( select count(*) from rhnServerErrataTypeView setv
+ where
+ setv.server_id = s.id
+ and setv.errata_type = 'Security Advisory'),
+ ( select count(*) from rhnServerErrataTypeView setv
+ where
+ setv.server_id = s.id
+ and setv.errata_type = 'Bug Fix Advisory'),
+ ( select count(*) from rhnServerErrataTypeView setv
+ where
+ setv.server_id = s.id
+ and setv.errata_type = 'Product Enhancement Advisory'),
+ ( select count(distinct p.name_id) from rhnPackage p, rhnServerNeededPackageCache snpc
+ where
+ snpc.server_id = S.id
+ and p.id = snpc.package_id
+ ),
+ ( select count(*)
+ from rhnActionConfigRevision ACR
+ INNER JOIN rhnActionConfigRevisionResult ACRR on ACR.id = ACRR.action_config_revision_id
+ where ACR.server_id = S.id
+ and ACR.action_id = (
+ select MAX(rA.id)
+ from rhnAction rA
+ INNER JOIN rhnServerAction rSA on rSA.action_id = rA.id
+ INNER JOIN rhnActionStatus rAS on rAS.id = rSA.status
+ INNER JOIN rhnActionType rAT on rAT.id = rA.action_type
+ where rSA.server_id = S.id
+ and rAS.name in ('Completed', 'Failed')
+ and rAT.label = 'configfiles.diff'
+ )
+ and ACR.failure_id is null
+ and ACRR.result is not null
+ ),
+ ( select sysdate - checkin from rhnServerInfo where server_id = S.id ),
+ ( select TO_CHAR(checkin, 'YYYY-MM-DD HH24:MI:SS') from rhnServerInfo where server_id = S.id ),
+ ( select count(1)
+ from rhnServerAction
+ where server_id = S.id
+ and status in (0, 1)),
+ os,
+ release,
+ ( select name from rhnServerArch where id = s.server_arch_id),
+ NVL((select 1 from rhnServerLock SL WHERE SL.server_id = S.id), 0)
+from
+ rhnServer S
+/
+
commit 7d1fb1cbca9215fd6f742f9449ad68b42388d5a7
Author: Joshua Roys <joshua.roys(a)gtri.gatech.edu>
Date: Thu Oct 8 10:06:39 2009 -0400
Set CompareConfigFilesTask to run at 11pm
diff --git a/java/conf/default/rhn_taskomatic.conf b/java/conf/default/rhn_taskomatic.conf
index 6fe0b3c..fea70a6 100644
--- a/java/conf/default/rhn_taskomatic.conf
+++ b/java/conf/default/rhn_taskomatic.conf
@@ -22,7 +22,8 @@ com.redhat.rhn.taskomatic.task.ErrataCacheTask,\
com.redhat.rhn.taskomatic.task.CobblerSyncTask,\
com.redhat.rhn.taskomatic.task.ChannelRepodata,\
com.redhat.rhn.taskomatic.task.KickstartFileSyncTask,\
-com.redhat.rhn.taskomatic.task.RepoSyncTask
+com.redhat.rhn.taskomatic.task.RepoSyncTask,\
+com.redhat.rhn.taskomatic.task.CompareConfigFilesTask
# additional tasks
taskomatic.tasks =
@@ -70,6 +71,7 @@ taskomatic.com.redhat.rhn.taskomatic.task.CleanCurrentAlerts.schedule = 0 35 4 ?
# Once a day at 11:00 PM
taskomatic.com.redhat.rhn.taskomatic.task.SummaryPopulation.schedule = 0 0 23 ? * *
+taskomatic.com.redhat.rhn.taskomatic.task.CompareConfigFilesTask.schedule = 0 0 23 ? * *
# Once a day at 5:00:00 AM
taskomatic.com.redhat.rhn.taskomatic.task.DailySummary.schedule = 0 0 5 ? * *
commit 5c993c5784f4e521002f5be36be3e84dca3833cd
Author: Joshua Roys <joshua.roys(a)gtri.gatech.edu>
Date: Thu Oct 8 09:36:04 2009 -0400
Add task to schedule config file comparisons
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
index 0bcd46b..6a5979a 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
@@ -422,6 +422,18 @@ ORDER BY UPPER(NVL(S.name, '(none)')), S.id
<elaborator name="is_virtual_host" />
</mode>
+<mode name="all_systems" class="com.redhat.rhn.frontend.dto.SystemOverview">
+ <query>
+ SELECT DISTINCT S.id,
+ S.name AS SERVER_NAME,
+ (SELECT 1
+ FROM rhnServerFeaturesView SFV
+ WHERE SFV.server_id = S.id
+ AND SFV.label = 'ftr_system_grouping') AS selectable
+ FROM rhnServer S
+ </query>
+ <elaborator name="system_overview" />
+</mode>
<mode name="most_critical_systems" class="com.redhat.rhn.frontend.dto.SystemOverview">
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml
index bc769f1..e964f2f 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml
@@ -1265,6 +1265,24 @@ ORDER BY CFN.path
<elaborator name="file_name_elab" />
</mode>
+<mode name="automated_file_names_for_system" class="com.redhat.rhn.frontend.dto.ConfigFileNameDto">
+ <query params="sid">
+SELECT DISTINCT CFN.id, CFN.path
+ FROM rhnConfigFileName CFN, rhnServerConfigChannel SCC,
+ rhnConfigFile CF, rhnUserServerPerms USP,
+ rhnConfigChannel CC, rhnConfigChannelType CCT
+ WHERE SCC.server_id = :sid
+ AND USP.server_id = SCC.server_id
+ AND SCC.config_channel_id = CF.config_channel_id
+ AND SCC.config_channel_id = CC.id
+ AND CC.confchan_type_id = CCT.id
+ AND CCT.label != 'server_import'
+ AND CF.config_file_name_id = CFN.id
+ORDER BY CFN.path
+ </query>
+ <elaborator name="file_name_elab" />
+</mode>
+
<mode name="file_names_for_system" class="com.redhat.rhn.frontend.dto.ConfigFileNameDto">
<query params="sid, user_id">
SELECT DISTINCT CFN.id, CFN.path
diff --git a/java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java b/java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java
index 4d7a5cf..b7c487e 100644
--- a/java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java
+++ b/java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java
@@ -517,8 +517,25 @@ public class ConfigurationManager extends BaseManager {
DataResult dr = makeDataResult(params, elabParams, pc, m);
return dr;
}
-
-
+
+ /**
+ * Lists the file names to which the given server is subscribed
+ * Finds the deployable revisions for each file name.
+ * @param server The server to which these files must be relevant
+ * @return A list of config file names in DTO format.
+ */
+ public DataResult <ConfigFileNameDto> listAllFileNamesForSystem(Server server) {
+ SelectMode m = ModeFactory.getMode("config_queries",
+ "automated_file_names_for_system");
+ Map params = new HashMap();
+ Map elabParams = new HashMap();
+ params.put("sid", server.getId());
+ elabParams.put("sid", server.getId());
+ DataResult dr = makeDataResult(params, elabParams, null, m);
+ dr.elaborate();
+ return dr;
+ }
+
/**
* Lists the file names to which the given server is subscribed
* Finds the deployable revisions for each file name.
diff --git a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
index b393eee..6e1221c 100644
--- a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
+++ b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
@@ -288,7 +288,17 @@ public class SystemManager extends BaseManager {
return makeDataResult(params, elabParams, pc, m);
}
-
+ /**
+ * Returns a list of all systems
+ * @return list of SystemOverviews
+ */
+ public static DataResult<SystemOverview> listAllSystems() {
+ SelectMode m = ModeFactory.getMode("System_queries", "all_systems");
+ DataResult dr = makeDataResult(new HashMap(), new HashMap(), null, m);
+ dr.elaborate();
+ return dr;
+ }
+
/**
* Returns list of all systems that are visible to user
* but not in the given server group.
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/CompareConfigFilesTask.java b/java/code/src/com/redhat/rhn/taskomatic/task/CompareConfigFilesTask.java
new file mode 100644
index 0000000..9609238
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/CompareConfigFilesTask.java
@@ -0,0 +1,90 @@
+
+package com.redhat.rhn.taskomatic.task;
+
+import com.redhat.rhn.domain.action.Action;
+import com.redhat.rhn.domain.action.ActionFactory;
+import com.redhat.rhn.domain.action.config.ConfigAction;
+import com.redhat.rhn.domain.config.ConfigFile;
+import com.redhat.rhn.domain.config.ConfigRevision;
+import com.redhat.rhn.domain.config.ConfigurationFactory;
+import com.redhat.rhn.domain.server.Server;
+import com.redhat.rhn.domain.server.ServerFactory;
+import com.redhat.rhn.frontend.dto.ConfigFileNameDto;
+import com.redhat.rhn.frontend.dto.SystemOverview;
+import com.redhat.rhn.manager.configuration.ConfigurationManager;
+import com.redhat.rhn.manager.system.SystemManager;
+
+import org.apache.log4j.Logger;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+
+/**
+ * Compare Config Files
+ * Schedules a comparison of config files on all systems
+ *
+ * @version $Rev$
+ */
+public class CompareConfigFilesTask implements Job {
+
+ /**
+ * Used to log stats in the RHNDAEMONSTATE table
+ */
+ public static final String DISPLAY_NAME = "compare_config_files";
+
+ private static Logger log = Logger.getLogger(CompareConfigFilesTask.class);
+
+ /**
+ * Default constructor
+ */
+ public CompareConfigFilesTask() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void execute(JobExecutionContext context)
+ throws JobExecutionException {
+
+ log.info("running config compare");
+
+ ConfigurationManager cm = ConfigurationManager.getInstance();
+
+ for (SystemOverview sys : SystemManager.listAllSystems()) {
+ Action act = ActionFactory.createAction(ActionFactory.TYPE_CONFIGFILES_DIFF);
+ ConfigAction cfact = (ConfigAction) act;
+ Server server = ServerFactory.lookupById(sys.getId());
+
+ if (server.isInactive()) {
+ continue;
+ }
+
+ // set up needed fields for the action
+ act.setName(act.getActionType().getName());
+ act.setOrg(server.getOrg());
+
+ // add the server to the action
+ ActionFactory.addServerToAction(server, act);
+
+ // add file revisions to the action
+ for (ConfigFileNameDto cfn : cm.listAllFileNamesForSystem(server)) {
+ Long cfid = cfn.getConfigFileId();
+ ConfigFile cf = ConfigurationFactory.lookupConfigFileById(cfid);
+ ConfigRevision crev = cf.getLatestConfigRevision();
+
+ ActionFactory.addConfigRevisionToAction(crev, server, cfact);
+ }
+
+ if (act.getServerActions().size() < 1) {
+ continue;
+ }
+ if (cfact.getConfigRevisionActions().size() < 1) {
+ continue;
+ }
+
+ ActionFactory.save(act);
+ }
+ }
+}
+
+// vim: ts=4:expandtab
commit 275fe193b49ac4b1f27ebeaf7ce557ee8208f72c
Author: Joshua Roys <joshua.roys(a)gtri.gatech.edu>
Date: Fri Oct 9 09:31:04 2009 -0400
Fix two more fd leaks
diff --git a/java/code/src/com/redhat/rhn/frontend/action/audit/AuditSearchAction.java b/java/code/src/com/redhat/rhn/frontend/action/audit/AuditSearchAction.java
index 074aab9..61b51c4 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/audit/AuditSearchAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/audit/AuditSearchAction.java
@@ -134,6 +134,7 @@ public class AuditSearchAction extends RhnAction {
brdr.readLine(); // Argument is required for -m
str = brdr.readLine(); // Valid message types are: ...
str = str.substring(str.indexOf(':') + 2);
+ brdr.close();
}
catch (IOException ioex) {
log.warn("failed to get ausearch types", ioex);
diff --git a/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java b/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
index a94706d..82b154c 100644
--- a/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
+++ b/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
@@ -445,6 +445,8 @@ public class AuditManager /* extends BaseManager */ {
}
}
+ brdr.close();
+
return events;
}
}
commit d2a4d27d9a38b75e8e7491cd3de1115e9e6126f9
Author: Joshua Roys <joshua.roys(a)gtri.gatech.edu>
Date: Thu Oct 8 15:29:44 2009 -0400
Plug fd leak
This is possibly disastrous if you have a lot of audit files.
diff --git a/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java b/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
index 9e11d01..a94706d 100644
--- a/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
+++ b/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
@@ -386,6 +386,8 @@ public class AuditManager /* extends BaseManager */ {
}
}
+ brdr.close();
+
return new AuditReviewDto(machine, new Date(start), new Date(end),
reviewedBy, reviewedOn);
}
commit b1a280727f236143c08efda60ade5d9cadc9af24
Author: Joshua Roys <joshua.roys(a)gtri.gatech.edu>
Date: Fri Sep 18 14:40:49 2009 -0400
Fix system comparison file/dir/symlink counts
diff --git a/java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/OverviewAction.java b/java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/OverviewAction.java
index 9403841..2c08ef9 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/OverviewAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/OverviewAction.java
@@ -275,30 +275,21 @@ public class OverviewAction extends RhnAction {
ConfigFileCount differing,
String url) {
- int filesSuffix = getSuffix(total.getFiles() + total.getSymlinks());
+ int filesSuffix = getSuffix(total.getFiles());
int dirsSuffix = getSuffix(total.getDirectories());
+ int symlinksSuffix = getSuffix(total.getSymlinks());
String messageKey = DIFF_ACTION_MESSAGE_PREFIX +
- filesSuffix + "_dirs_" + dirsSuffix;
+ filesSuffix + "_dirs_" + dirsSuffix + "_symlinks_" + symlinksSuffix;
List params = new ArrayList();
// setup the params
- if (filesSuffix == PLURAL) {
- params.add(String.valueOf(successful.getFiles() + successful.getSymlinks()));
- params.add(String.valueOf(total.getFiles() + total.getSymlinks()));
- }
- else if (filesSuffix == SINGULAR) {
- params.add(String.valueOf(successful.getFiles() + successful.getSymlinks()));
- }
-
- if (dirsSuffix == PLURAL) {
- params.add(String.valueOf(successful.getDirectories()));
- params.add(String.valueOf(total.getDirectories()));
- }
- else if (dirsSuffix == SINGULAR) {
- params.add(String.valueOf(successful.getDirectories()));
- }
-
+ params.add(String.valueOf(successful.getFiles()));
+ params.add(String.valueOf(total.getFiles()));
+ params.add(String.valueOf(successful.getDirectories()));
+ params.add(String.valueOf(total.getDirectories()));
+ params.add(String.valueOf(successful.getSymlinks()));
+ params.add(String.valueOf(total.getSymlinks()));
params.add(url);
LocalizationService service = LocalizationService.getInstance();
@@ -306,9 +297,10 @@ public class OverviewAction extends RhnAction {
request.setAttribute(DIFF_ACTION_MESSAGE,
service.getMessage(messageKey));
}
- request.setAttribute(DIFF_ACTION_MESSAGE,
- service.getMessage(messageKey,
- params.toArray()));
+ else {
+ request.setAttribute(DIFF_ACTION_MESSAGE,
+ service.getMessage(messageKey, params.toArray()));
+ }
if (successful.getFiles() + successful.getSymlinks() > 0) {
String diffActionKey;
@@ -327,7 +319,7 @@ public class OverviewAction extends RhnAction {
else {
Object [] keyParams = new Object[] {
String.valueOf(differing.getFiles() + differing.getSymlinks()),
- String.valueOf(successful.getFiles() + successful.getSymlinks())
+ String.valueOf(successful.getFiles() + successful.getSymlinks())
};
request.setAttribute(DIFF_DETAILS_MESSAGE,
service.getMessage(diffActionKey, keyParams));
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
index 99028dd..fc5d8d0 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
@@ -7108,57 +7108,127 @@ Follow this url to see the full list of inactive systems:
<trans-unit id="sdc.config.diff.noaction">
<source>No system comparisons completed. [<a href="{0}">Schedule System Comparison</a>]</source>
</trans-unit>
- <trans-unit id="sdc.config.diff.files_0_dirs_0">
- <source>No files or directories were selected for comparison. [<a href="{0}"> View Details</a>]</source>
- </trans-unit>
- <trans-unit id="sdc.config.diff.files_1_dirs_0">
-<source>{0} of 1 file on the system was successfully compared with @@PRODUCT_NAME@@-Managed files and directories. [<a href="{1}"> View Details</a>]</source>
- </trans-unit>
-
-
- <trans-unit id="sdc.config.diff.files_2_dirs_0">
- <source>{0} of {1} files on the system were successfully compared with @@PRODUCT_NAME@@-Managed files and directories. [<a href="{2}"> View Details</a>]</source>
- </trans-unit>
-
+ <trans-unit id="sdc.config.diff.files_0_dirs_0_symlinks_0">
+ <source>No files, directories or symlinks were selected for comparison. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
- <trans-unit id="sdc.config.diff.files_0_dirs_1">
-<source>{0} of 1 directory on the system was successfully compared with @@PRODUCT_NAME@@-Managed files and directories. [<a href="{1}"> View Details</a>]</source>
- </trans-unit>
-
-
- <trans-unit id="sdc.config.diff.files_0_dirs_2">
- <source>{0} of {1} directories on the system were successfully compared with @@PRODUCT_NAME@@-Managed files and directories. [<a href="{2}"> View Details</a>]</source>
- </trans-unit>
+ <trans-unit id="sdc.config.diff.files_0_dirs_0_symlinks_1">
+ <source>{4} of 1 symlink on the system was successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
- <trans-unit id="sdc.config.diff.files_1_dirs_1">
-<source>{0} of 1 file and {1} of 1 directory on the system was successfully compared with @@PRODUCT_NAME@@-Managed files and directories. [<a href="{2}"> View Details</a>]</source>
- </trans-unit>
-
-
- <trans-unit id="sdc.config.diff.files_1_dirs_2">
- <source>{0} of 1 file and {1} of {2} directories on the system were successfully compared with @@PRODUCT_NAME@@-Managed files and directories. [<a href="{3}"> View Details</a>]</source>
- </trans-unit>
-
- <trans-unit id="sdc.config.diff.files_2_dirs_1">
- <source>{0} of {1} files and {2} of 1 directory on the system were successfully compared with @@PRODUCT_NAME@@-Managed files and directories. [<a href="{3}"> View Details</a>]</source>
- </trans-unit>
-
- <trans-unit id="sdc.config.diff.files_2_dirs_2">
- <source>{0} of {1} files and {2} of 1 directory on the system were successfully compared with @@PRODUCT_NAME@@-Managed files and directories. [<a href="{3}"> View Details</a>]</source>
- </trans-unit>
-
- <trans-unit id="sdc.config.differing.files_0">
- <source>No existing files in the existing system differed from the @@PRODUCT_NAME@@-Managed files.</source>
+ <trans-unit id="sdc.config.diff.files_0_dirs_0_symlinks_2">
+ <source>{4} of {5} symlinks on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_0_dirs_1_symlinks_0">
+ <source>{2} of 1 directory on the system was successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_0_dirs_1_symlinks_1">
+ <source>{2} of 1 directory and {4} of 1 symlink on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_0_dirs_1_symlinks_2">
+ <source>{2} of 1 directory and {4} of {5} symlinks on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_0_dirs_2_symlinks_0">
+ <source>{2} of {3} directories on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_0_dirs_2_symlinks_1">
+ <source>{2} of {3} directories and {4} of 1 symlink on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_0_dirs_2_symlinks_2">
+ <source>{2} of {3} directories and {4} of {5} symlinks on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_1_dirs_0_symlinks_0">
+ <source>{0} of 1 file on the system was successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_1_dirs_0_symlinks_1">
+ <source>{0} of 1 file and {4} of 1 symlink on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_1_dirs_0_symlinks_2">
+ <source>{0} of 1 file and {4} of {5} symlinks on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_1_dirs_1_symlinks_0">
+ <source>{0} of 1 file and {2} of 1 directory on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_1_dirs_1_symlinks_1">
+ <source>{0} of 1 file and {2} of 1 directory and {4} of 1 symlink on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_1_dirs_1_symlinks_2">
+ <source>{0} of 1 file and {2} of 1 directory and {4} of {5} symlinks on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_1_dirs_2_symlinks_0">
+ <source>{0} of 1 file and {2} of {3} directories on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_1_dirs_2_symlinks_1">
+ <source>{0} of 1 file and {2} of {3} directories and {4} of 1 symlink on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_1_dirs_2_symlinks_2">
+ <source>{0} of 1 file and {2} of {3} directories and {4} of {5} symlinks on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_2_dirs_0_symlinks_0">
+ <source>{0} of {1} files on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_2_dirs_0_symlinks_1">
+ <source>{0} of {1} files and {4} of 1 symlink on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_2_dirs_0_symlinks_2">
+ <source>{0} of {1} files and {4} of {5} symlinks on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_2_dirs_1_symlinks_0">
+ <source>{0} of {1} files and {2} of 1 directory on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_2_dirs_1_symlinks_1">
+ <source>{0} of {1} files and {2} of 1 directory and {4} of 1 symlink on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_2_dirs_1_symlinks_2">
+ <source>{0} of {1} files and {2} of 1 directory and {4} of {5} symlinks on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_2_dirs_2_symlinks_0">
+ <source>{0} of {1} files and {2} of {3} directories on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_2_dirs_2_symlinks_1">
+ <source>{0} of {1} files and {2} of {3} directories and {4} of 1 symlink on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.diff.files_2_dirs_2_symlinks_2">
+ <source>{0} of {1} files and {2} of {3} directories and {4} of {5} symlinks on the system were successfully compared with @@PRODUCT_NAME@@-Managed files. [<a href="{6}">View Details</a>]</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.differing.files_0">
+ <source>No existing files in the existing system differed from the @@PRODUCT_NAME@@-Managed files.</source>
</trans-unit>
-
- <trans-unit id="sdc.config.differing.files_1">
- <source>1 of 1 file on the system differed from the @@PRODUCT_NAME@@-Managed files</source>
- </trans-unit>
- <trans-unit id="sdc.config.differing.files_2">
- <source>{0} of {1} files on the system differed from the @@PRODUCT_NAME@@-Managed files.</source>
- </trans-unit>
- </group>
+
+ <trans-unit id="sdc.config.differing.files_1">
+ <source>1 of 1 file on the system differed from the @@PRODUCT_NAME@@-Managed files</source>
+ </trans-unit>
+
+ <trans-unit id="sdc.config.differing.files_2">
+ <source>{0} of {1} files on the system differed from the @@PRODUCT_NAME@@-Managed files.</source>
+ </trans-unit>
+ </group>
<group>
<context-group name="sdc_actions_time_messages">
14 years, 5 months
2 commits - java/code schema/spacewalk
by Justin Sherrill
java/code/webapp/WEB-INF/pages/channel/erratalist.jsp | 2 -
schema/spacewalk/gendrop.sql | 24 ++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
New commits:
commit e864d17977d1c97fdd874d7dd93c2e01cd516031
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Nov 2 12:59:44 2009 -0500
508771 - fixing incorrect sort on channel errata list page
diff --git a/java/code/webapp/WEB-INF/pages/channel/erratalist.jsp b/java/code/webapp/WEB-INF/pages/channel/erratalist.jsp
index 4fb0025..d896161 100644
--- a/java/code/webapp/WEB-INF/pages/channel/erratalist.jsp
+++ b/java/code/webapp/WEB-INF/pages/channel/erratalist.jsp
@@ -75,7 +75,7 @@
bound="false"
headerkey="erratalist.jsp.updated"
styleclass="last-column"
- sortattr="updateDate"
+ sortattr="updateDateObj"
defaultsort="desc"
>
${current.updateDate}
commit b52323b2badf9d344a485841c1095acfe694652d
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Fri Oct 30 18:23:33 2009 -0400
adding gendrop back to master branch, it was removed during postgres merge
diff --git a/schema/spacewalk/gendrop.sql b/schema/spacewalk/gendrop.sql
new file mode 100644
index 0000000..8d96df3
--- /dev/null
+++ b/schema/spacewalk/gendrop.sql
@@ -0,0 +1,24 @@
+-- Generate all drop staements for the current schema
+--
+-- $Id$
+
+set pagesize 10000
+
+select 'whenever sqlerror exit failure' from dual
+union
+select
+ 'drop ' || lower(object_type) || ' ' || lower(object_name) || ';' DROP_STATEMENT
+from
+ user_objects
+where
+ lower(object_type) not in ('table', 'index', 'trigger', 'lob')
+UNION
+select
+ 'drop ' || lower(object_type) || ' ' || lower(object_name) || ' cascade constraints;'
+ DROP_STATEMENT
+from
+ user_objects
+where
+ lower(object_type) = 'table'
+ and object_name not like '%$%'
+/
14 years, 5 months
client/tools
by Milan Zazrivec
client/tools/rhn-virtualization/virtualization/support.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit db00ecd0fddb14f03fd8c0ffa249a467ac10c67f
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Nov 2 15:22:32 2009 +0100
529688 - correctly detect Xen host
diff --git a/client/tools/rhn-virtualization/virtualization/support.py b/client/tools/rhn-virtualization/virtualization/support.py
index de34740..a32b5d5 100755
--- a/client/tools/rhn-virtualization/virtualization/support.py
+++ b/client/tools/rhn-virtualization/virtualization/support.py
@@ -93,7 +93,7 @@ def refresh():
else:
domains = poller.poll_hypervisor()
- if not len(domains) and not libvirt.open(None).getType():
+ if not len(domains) and libvirt.open(None).getType() == 'Xen':
# On a KVM/QEMU host, libvirt reports no domain entry for host itself.
# On a Xen host, either there were no domains or xend might not be
# running. Don't proceed further.
14 years, 5 months
Changes to 'refs/tags/rhnmd-5.3.3-1'
by Miroslav Suchý
Tag 'rhnmd-5.3.3-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2009-11-02 13:04 +0000
Tagging package [rhnmd] version [5.3.3-1] in directory [monitoring/rhnmd/].
Changes since spacewalk-backend-0.7.11-1:
Justin Sherrill (1):
531091 - fixing issue that would result in odd hibernate errors due to hibernate objects being used across hibernate sessions
Milan Zazrivec (2):
532429 - refresh virt. state after successful guest kickstart
import virtualization module in kickstart_guest section
Miroslav Suchý (3):
532145 - define local variable ipaddr before it is used
make rhnmd package noarch
Automatic commit of package [rhnmd] release [5.3.3-1].
---
client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py | 1
client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py | 4 +
java/code/src/com/redhat/rhn/common/messaging/ActionExecutor.java | 1
java/code/src/com/redhat/rhn/frontend/events/AbstractDatabaseAction.java | 29 ++++++----
java/code/src/com/redhat/rhn/frontend/events/CloneErrataAction.java | 1
java/code/src/com/redhat/rhn/frontend/events/CloneErrataEvent.java | 16 +++--
java/code/src/com/redhat/rhn/frontend/events/SsmUpgradePackagesAction.java | 2
monitoring/rhnmd/rhnmd-init | 2
monitoring/rhnmd/rhnmd-wrap | 9 ---
monitoring/rhnmd/rhnmd.spec | 13 ++--
monitoring/rhnmd/rhnmdwrap.c | 12 ----
rel-eng/packages/rhnmd | 2
12 files changed, 45 insertions(+), 47 deletions(-)
---
14 years, 5 months
2 commits - monitoring/rhnmd rel-eng/packages
by Miroslav Suchý
monitoring/rhnmd/rhnmd-init | 2 +-
monitoring/rhnmd/rhnmd-wrap | 9 ---------
monitoring/rhnmd/rhnmd.spec | 13 +++++++------
monitoring/rhnmd/rhnmdwrap.c | 12 ------------
rel-eng/packages/rhnmd | 2 +-
5 files changed, 9 insertions(+), 29 deletions(-)
New commits:
commit 823dc7e7e864138261362eb11d866e07f6b50c1a
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Nov 2 14:04:08 2009 +0100
Automatic commit of package [rhnmd] release [5.3.3-1].
diff --git a/monitoring/rhnmd/rhnmd.spec b/monitoring/rhnmd/rhnmd.spec
index 97fd94d..c436c16 100644
--- a/monitoring/rhnmd/rhnmd.spec
+++ b/monitoring/rhnmd/rhnmd.spec
@@ -5,7 +5,7 @@ Summary: Red Hat Network Monitoring Daemon
Name: rhnmd
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 5.3.2
+Version: 5.3.3
Release: 1%{?dist}
License: GPLv2
BuildArch: noarch
@@ -84,6 +84,9 @@ if [ $1 = 0 ]; then
fi
%changelog
+* Mon Nov 2 2009 Miroslav Suchý <msuchy(a)redhat.com> 5.3.3-1
+- make rhnmd package noarch
+
* Fri Apr 10 2009 Miroslav Suchý <msuchy(a)redhat.com> 5.3.2-1
- 494538 - remove the dependecy of rhnmd on nocpulse-common
diff --git a/rel-eng/packages/rhnmd b/rel-eng/packages/rhnmd
index efe259b..c623cf1 100644
--- a/rel-eng/packages/rhnmd
+++ b/rel-eng/packages/rhnmd
@@ -1 +1 @@
-5.3.2-1 monitoring/rhnmd/
+5.3.3-1 monitoring/rhnmd/
commit 79743f3c86f662ab662675b90e54d0d55b25f96b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Nov 2 13:57:49 2009 +0100
make rhnmd package noarch
That stuff with wrapper has been created becouse in RHEL2 was not
possible to start sshd as normal user. RHEL2 is no longer supported,
so we can remove this hack.
Since there is no binary, making package noarch.
diff --git a/monitoring/rhnmd/rhnmd-init b/monitoring/rhnmd/rhnmd-init
index 98651eb..f68b539 100644
--- a/monitoring/rhnmd/rhnmd-init
+++ b/monitoring/rhnmd/rhnmd-init
@@ -27,7 +27,7 @@ prog="rhnmd"
# Some functions to make the below more readable
SU="/sbin/runuser -s /bin/bash - nocpulse -c"
-SSHD="/usr/sbin/rhnmd-wrap"
+SSHD="/usr/sbin/rhnmd"
do_restart_sanity_check()
{
diff --git a/monitoring/rhnmd/rhnmd-wrap b/monitoring/rhnmd/rhnmd-wrap
deleted file mode 100644
index 2bb096b..0000000
--- a/monitoring/rhnmd/rhnmd-wrap
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-if [ -r /usr/lib64/librhnmdwrap.so ]
-then
- LD_PRELOAD_64=/usr/lib64/librhnmdwrap.so exec /usr/sbin/rhnmd $*
-else
- LD_PRELOAD_32=/usr/lib/librhnmdwrap.so exec /usr/sbin/rhnmd $*
-fi
-
diff --git a/monitoring/rhnmd/rhnmd.spec b/monitoring/rhnmd/rhnmd.spec
index 3390a90..97fd94d 100644
--- a/monitoring/rhnmd/rhnmd.spec
+++ b/monitoring/rhnmd/rhnmd.spec
@@ -8,10 +8,11 @@ Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.ta
Version: 5.3.2
Release: 1%{?dist}
License: GPLv2
+BuildArch: noarch
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: openssh-server openssh
-BuildRequires: pam-devel gcc
+BuildRequires: pam-devel
%description
rhnmd enables secure ssh-based communication between the monitoring
@@ -21,7 +22,7 @@ scout and the monitored host.
%setup -q
%build
-gcc %{optflags} -Wall -shared rhnmdwrap.c -o librhnmdwrap.so -fPIC
+#nothing to do
%install
rm -rf $RPM_BUILD_ROOT
@@ -37,9 +38,7 @@ ln -sf sshd $RPM_BUILD_ROOT%{_usr}/sbin/rhnmd
install -m 0755 rhnmd-init $RPM_BUILD_ROOT%{_initrddir}/rhnmd
install -m 0644 rhnmd_config $RPM_BUILD_ROOT%{_sysconfdir}/%{np_name}/rhnmd_config
install -m 0600 authorized_keys $RPM_BUILD_ROOT%{_var}/lib/%{np_name}/.ssh/authorized_keys
-install -m 0755 rhnmd-wrap $RPM_BUILD_ROOT%{_usr}/sbin/rhnmd-wrap
install -m 0644 rhnmd-pam_config $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/rhnmd
-install -m 0755 librhnmdwrap.so $RPM_BUILD_ROOT%{_libdir}/librhnmdwrap.so
%pre
if [ $1 -eq 1 ] ; then
@@ -74,7 +73,6 @@ rm -rf $RPM_BUILD_ROOT
%dir %attr(700, %{np_name},%{np_name}) %{_var}/lib/%{np_name}/.ssh
%config(noreplace) %attr(-, %{np_name},%{np_name}) %{_var}/lib/%{np_name}/.ssh/authorized_keys
%{_usr}/sbin/*
-%{_libdir}/librhnmdwrap.so
%config(noreplace) %{_sysconfdir}/%{np_name}/*
%{_initrddir}/rhnmd
%doc LICENSE
diff --git a/monitoring/rhnmd/rhnmdwrap.c b/monitoring/rhnmd/rhnmdwrap.c
deleted file mode 100644
index bbf9af1..0000000
--- a/monitoring/rhnmd/rhnmdwrap.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <sys/types.h>
-#include <unistd.h>
-#include <grp.h>
-#include <security/pam_appl.h>
-
-/* This hack is needed to get around a Red Hat patch that disallows
-non-root users to run the sshd binary. */
-
-int setgroups(size_t size, const gid_t *list)
-{
- return 0;
-}
14 years, 5 months
client/tools
by Milan Zazrivec
client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 9a623166afa437d4f82d81c4607d3e8fabf0c8a1
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Nov 2 13:49:21 2009 +0100
import virtualization module in kickstart_guest section
Importing modules from rhn-virtualization package at the top level
would not work in situations where rhn-virtualization is not required
(systems without virtualization entitlement).
diff --git a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
index 8878aa3..0215b60 100644
--- a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
+++ b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
@@ -27,7 +27,6 @@ import os.path
import tempfile
import xmlrpclib
import pprint
-import virtualization.support
from koan.app import Koan
SHADOW = "/tmp/ks-tree-shadow"
@@ -192,6 +191,7 @@ def initiate_guest(kickstart_host, cobbler_system_name, virt_type, name, mem_kb,
k.run()
# refresh current virtualization state on the server
+ import virtualization.support
virtualization.support.refresh()
except Exception, e:
(xa, xb, tb) = sys.exc_info()
14 years, 5 months
client/tools
by Milan Zazrivec
client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit e0a8df05ff5751660f145dcd6d0b8729293d9012
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Mon Nov 2 13:24:29 2009 +0100
532429 - refresh virt. state after successful guest kickstart
diff --git a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
index edcb7d6..8878aa3 100644
--- a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
+++ b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
@@ -27,6 +27,7 @@ import os.path
import tempfile
import xmlrpclib
import pprint
+import virtualization.support
from koan.app import Koan
SHADOW = "/tmp/ks-tree-shadow"
@@ -189,6 +190,9 @@ def initiate_guest(kickstart_host, cobbler_system_name, virt_type, name, mem_kb,
k.add_reinstall_entry = None
k.kopts_override = None
k.run()
+
+ # refresh current virtualization state on the server
+ virtualization.support.refresh()
except Exception, e:
(xa, xb, tb) = sys.exc_info()
if hasattr(e,"from_koan") and len(str(e)) > 1:
14 years, 5 months