client/rhel
by Milan Zazrivec
client/rhel/spacewalk-abrt/abrt.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 7ba8735f0658c3b586ed2e503e0ce627e472e66f
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Jan 16 17:49:17 2013 +0100
abrt: use DumpLocation from /etc/abrt/abrt.conf if set
diff --git a/client/rhel/spacewalk-abrt/abrt.py b/client/rhel/spacewalk-abrt/abrt.py
index a43419f..bb6a85e 100644
--- a/client/rhel/spacewalk-abrt/abrt.py
+++ b/client/rhel/spacewalk-abrt/abrt.py
@@ -1,10 +1,12 @@
import os
import sys
sys.path.append("/usr/share/rhn/")
+from up2date_client import config
__rhnexport__ = [ 'check' ]
-ABRT_DIR = '/var/spool/abrt'
+cf = config.ConfigFile('/etc/abrt/abrt.conf')
+ABRT_DIR = cf['DumpLocation'] or '/var/spool/abrt'
def check(version):
if not os.path.isdir(ABRT_DIR):
11 years, 4 months
java/code
by Jan Pazdziora
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 6 ++++++
java/code/webapp/WEB-INF/pages/keys/keys.jsp | 6 ++++++
2 files changed, 12 insertions(+)
New commits:
commit e5dbc1328ea97047d8f28177d94c292fff418428
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Jan 16 15:29:50 2013 +0100
For RHN-ORG-TRUSTED-SSL-CERT, inform that it will be copied over to new orgs.
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 814c1d9..4a24e27 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
@@ -9137,6 +9137,12 @@ Please note that some manual configuration of these scripts may still be require
<context context-type="sourcefile">/rhn/keys/CryptoKeysList.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="keys.jsp.default-ssl-key-copy">
+ <source>This key/cert will be copied over to newly created organizations.</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/keys/CryptoKeysList.do</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="toolbar.create.keys">
<source>create new stored key/cert</source>
<context-group name="ctx">
diff --git a/java/code/webapp/WEB-INF/pages/keys/keys.jsp b/java/code/webapp/WEB-INF/pages/keys/keys.jsp
index ca11b3a..0c4dbc8 100644
--- a/java/code/webapp/WEB-INF/pages/keys/keys.jsp
+++ b/java/code/webapp/WEB-INF/pages/keys/keys.jsp
@@ -37,6 +37,12 @@
styleclass="first-column"
sortattr="description">
<c:out value="<a href=\"/rhn/keys/CryptoKeyEdit.do?key_id=${current.id}\">${current.description}</a>" escapeXml="false" />
+ <rhn:require acl="user_role(satellite_admin)">
+ <c:if test="${current.description == 'RHN-ORG-TRUSTED-SSL-CERT' and current.label == 'SSL'}">
+ <c:out value="<br/>" escapeXml="false" />
+ <bean:message key="keys.jsp.default-ssl-key-copy"/>
+ </c:if>
+ </rhn:require>
</rl:column>
<!-- Type Column -->
11 years, 4 months
backend/server
by Milan Zazrivec
backend/server/handlers/xmlrpc/abrt.py | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
New commits:
commit 13efe868662c412f34c6d614308d7a26f14a0b2a
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Jan 16 15:46:46 2013 +0100
abrt: use insert + update rather than delete + insert
diff --git a/backend/server/handlers/xmlrpc/abrt.py b/backend/server/handlers/xmlrpc/abrt.py
index dc3eaea..dff0924 100644
--- a/backend/server/handlers/xmlrpc/abrt.py
+++ b/backend/server/handlers/xmlrpc/abrt.py
@@ -17,9 +17,13 @@ from spacewalk.server import rhnSQL
from spacewalk.common.rhnLog import log_debug
from spacewalk.server.rhnHandler import rhnHandler
-_query_delete_data = rhnSQL.Statement("""
-delete from rhnAbrtInfo where server_id = :server_id
-""")
+_query_update_data = rhnSQL.Statement("""
+update rhnAbrtInfo
+ set num_crashes = :num_crashes,
+ created = current_timestamp
+ where server_id = :server_id
+"""
+)
_query_store_data = rhnSQL.Statement("""
insert into rhnAbrtInfo(
@@ -45,12 +49,12 @@ class Abrt(rhnHandler):
log_debug(1, self.server_id, version, status, message, data)
if status == 0:
- h = rhnSQL.prepare(_query_delete_data)
- h.execute(server_id=self.server_id)
+ h = rhnSQL.prepare(_query_update_data)
+ r = h.execute(num_crashes=data['num_crashes'], server_id = self.server_id)
- h = rhnSQL.prepare(_query_store_data)
- h.execute(server_id=self.server_id,
- num_crashes=data['num_crashes'])
+ if r == 0:
+ h = rhnSQL.prepare(_query_store_data)
+ h.execute(server_id=self.server_id, num_crashes=data['num_crashes'])
rhnSQL.commit()
11 years, 4 months
java/code
by Jan Pazdziora
java/code/src/com/redhat/rhn/manager/org/CreateOrgCommand.java | 12 +---------
1 file changed, 2 insertions(+), 10 deletions(-)
New commits:
commit 4c159a150fe3a6b5153ee13b7a0b603d292b3be8
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Jan 16 14:29:29 2013 +0100
Copy RHN-ORG-TRUSTED-SSL-CERT if it exists, not a random SSL key.
diff --git a/java/code/src/com/redhat/rhn/manager/org/CreateOrgCommand.java b/java/code/src/com/redhat/rhn/manager/org/CreateOrgCommand.java
index 32d32f5..0b8b7b3 100644
--- a/java/code/src/com/redhat/rhn/manager/org/CreateOrgCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/org/CreateOrgCommand.java
@@ -147,16 +147,8 @@ public class CreateOrgCommand {
// Lookup the SSL crypto key for the default org and copy it to the new:
Org defaultOrg = OrgFactory.getSatelliteOrg();
- List<CryptoKey> defaultOrgKeys = KickstartFactory.lookupCryptoKeys(defaultOrg);
- CryptoKey ssl = null;
- // Search for the first key of type ssl:
- for (CryptoKey key : defaultOrgKeys) {
- if (key.getCryptoKeyType().equals(KickstartFactory.KEY_TYPE_SSL)) {
- ssl = key;
- break;
- }
- }
- if (ssl != null) {
+ CryptoKey ssl = KickstartFactory.lookupCryptoKey("RHN-ORG-TRUSTED-SSL-CERT", defaultOrg);
+ if (ssl != null && ssl.isSSL()) {
// TODO
log.debug("Found a SSL key for the default org to copy: " +
ssl.getId());
11 years, 4 months
2 commits - java/code
by Milan Zazrivec
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 2
java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp | 42 +++++-----
2 files changed, 23 insertions(+), 21 deletions(-)
New commits:
commit e702a8a9546fb04c59efad5365e4a1f99ec474e8
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Jan 16 14:24:02 2013 +0100
display abrt summary only if spacewalk-abrt is installed
spacewalk-abrt brings abrt.check capability.
diff --git a/java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp b/java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp
index b1fa53b..7e2233f 100644
--- a/java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp
@@ -353,26 +353,28 @@
</tr>
</table>
</div>
- <div style="width: 45%; float: left;">
- <h2><bean:message key="sdc.details.overview.crashes.application"/></h2>
- <table class="details">
- <c:choose>
- <c:when test="${system.crashes.created == null}">
- <bean:message key="sdc.details.overview.crashes.nodata"/>
- </c:when>
- <c:otherwise>
- <tr>
- <th><bean:message key="sdc.details.overview.crashes.lastreport"/></th>
- <td><fmt:formatDate value="${system.crashes.created}" type="both" dateStyle="short" timeStyle="long"/></td>
- </tr>
- <tr>
- <th><bean:message key="sdc.details.overview.crashes.crashcount"/></th>
- <td><c:out value="${system.crashes.crashCount}"/></td>
- </tr>
- </c:otherwise>
- </c:choose>
- </table>
- </div>
+ <rhn:require acl="client_capable(abrt.check);" mixins="com.redhat.rhn.common.security.acl.SystemAclHandler">
+ <div style="width: 45%; float: left;">
+ <h2><bean:message key="sdc.details.overview.crashes.application"/></h2>
+ <table class="details">
+ <c:choose>
+ <c:when test="${system.crashes.created == null}">
+ <bean:message key="sdc.details.overview.crashes.nodata"/>
+ </c:when>
+ <c:otherwise>
+ <tr>
+ <th><bean:message key="sdc.details.overview.crashes.lastreport"/></th>
+ <td><fmt:formatDate value="${system.crashes.created}" type="both" dateStyle="short" timeStyle="long"/></td>
+ </tr>
+ <tr>
+ <th><bean:message key="sdc.details.overview.crashes.crashcount"/></th>
+ <td><c:out value="${system.crashes.crashCount}"/></td>
+ </tr>
+ </c:otherwise>
+ </c:choose>
+ </table>
+ </div>
+ </rhn:require>
<div style="clear: left; width: 45%; float: left; line-height: 200%">
<h2><bean:message key="sdc.details.overview.subscribedchannels" arg0="/rhn/systems/details/SystemChannels.do?sid=${system.id}"/></h2>
commit 8fd47d59c86615653e6e52b3a4b089a0981560b9
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Jan 16 14:18:13 2013 +0100
abrt: correct webui message
No crash data available for the system doesn't imply spacewalk-abrt is not installed.
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 0d4cf8b..814c1d9 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
@@ -16241,7 +16241,7 @@ The Tree Path, Kickstart RPM, Base Channel, and Installer Generation should alwa
</context-group>
</trans-unit>
<trans-unit id="sdc.details.overview.crashes.nodata">
- <source>To get application crash data install spacewalk-abrt on this system.</source>
+ <source>No crash data has been reported for this system yet.</source>
<context-group name="ctx">
<context context-type="sourcefile">/systems/details/Overview.do</context>
</context-group>
11 years, 4 months
java/code
by Jan Pazdziora
java/code/src/com/redhat/rhn/domain/server/EntitlementServerGroup.java | 10 ----------
java/code/src/com/redhat/rhn/domain/server/ManagedServerGroup.java | 8 --------
2 files changed, 18 deletions(-)
New commits:
commit 263f8b3aa48600882c0444084931e806f069ae17
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Jan 16 10:35:15 2013 +0100
The isUserManaged does not seem to be used anywhere, removing.
diff --git a/java/code/src/com/redhat/rhn/domain/server/EntitlementServerGroup.java b/java/code/src/com/redhat/rhn/domain/server/EntitlementServerGroup.java
index 9cfd0ca..7fbef7d 100644
--- a/java/code/src/com/redhat/rhn/domain/server/EntitlementServerGroup.java
+++ b/java/code/src/com/redhat/rhn/domain/server/EntitlementServerGroup.java
@@ -27,16 +27,6 @@ public class EntitlementServerGroup extends ServerGroup {
private Long maxMembers;
/**
- * returns true if this group is user managed, false
- * otherwise.
- * @return true if this group is user managed, false
- * otherwise.
- */
- public boolean isUserManaged() {
- return false;
- }
-
- /**
* Getter for maxMembers
* @return Long to get
*/
diff --git a/java/code/src/com/redhat/rhn/domain/server/ManagedServerGroup.java b/java/code/src/com/redhat/rhn/domain/server/ManagedServerGroup.java
index f1e43d5..879de03 100644
--- a/java/code/src/com/redhat/rhn/domain/server/ManagedServerGroup.java
+++ b/java/code/src/com/redhat/rhn/domain/server/ManagedServerGroup.java
@@ -60,12 +60,4 @@ public class ManagedServerGroup extends ServerGroup {
protected void setAssociatedAdmins(Set newUsers) {
this.associatedAdmins = newUsers;
}
-
- /**
- * returns true if this is user managed, false otherwise.
- * @return true if this is user managed, false otherwise.
- */
- public boolean isUserManaged() {
- return true;
- }
}
11 years, 4 months
reporting/reports reporting/spacewalk-report
by Tomáš Kašpárek
reporting/reports/data/inactive-systems | 32 ++++++++++++++++++++++++++++++++
reporting/spacewalk-report | 6 +++++-
2 files changed, 37 insertions(+), 1 deletion(-)
New commits:
commit 2c7d095e512feae2da6b2324e85c77f9aabc4d2a
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Tue Jan 15 16:41:21 2013 +0100
703629 - spacewalk-report inactive-systems RFE
Report of currently inactive systems in spacewalk
I've used small hack to bypass the fact configuration is not stored in db
diff --git a/reporting/reports/data/inactive-systems b/reporting/reports/data/inactive-systems
new file mode 100644
index 0000000..2ed5d1c
--- /dev/null
+++ b/reporting/reports/data/inactive-systems
@@ -0,0 +1,32 @@
+
+synopsis:
+
+ Inactive system in spacewalk
+
+description:
+
+ List of all inactive systems in spacewalk
+
+columns:
+
+ system_id System id
+ system_name System name
+ organization_id Id of organization system belongs to
+ last_checkin Last check of the system
+
+sql:
+
+ select * from (
+ select rhnServer.id as system_id,
+ rhnServer.name as system_name,
+ rhnServer.org_id as organization_id,
+ rhnServerInfo.checkin as last_checkin
+ from rhnServer
+ join rhnServerInfo on rhnServer.id=rhnServerInfo.server_id
+ where rhnServerInfo.checkin < current_timestamp - numtodsinterval(
+ -- checkin_threshold_placeholder
+ * 86400, 'second')
+ ) X
+ -- where placeholer
+ order by system_id, organization_id
+
diff --git a/reporting/spacewalk-report b/reporting/spacewalk-report
index 333b443..636413a 100755
--- a/reporting/spacewalk-report
+++ b/reporting/spacewalk-report
@@ -38,7 +38,7 @@ import reports
try:
from spacewalk.server import rhnSQL
- from spacewalk.common.rhnConfig import initCFG
+ from spacewalk.common.rhnConfig import initCFG, RHNOptions
except KeyboardInterrupt:
systemExit(-1, "\nUser interrupted process.")
@@ -180,6 +180,10 @@ if __name__ == '__main__':
the_sql = report.sql
+ if report_name == "inactive-systems":
+ cfg = RHNOptions('web')
+ cfg.parse()
+ the_sql = the_sql.replace('-- checkin_threshold_placeholder', str(cfg.get('system_checkin_threshold')))
if the_sql_where:
the_sql = the_sql.replace('-- where placeholder', 'where %s' % ' and '.join(the_sql_where))
11 years, 4 months
reporting/reports
by Tomáš Kašpárek
reporting/reports/data/system-packages-installed | 38 +++++++++++++++++++++++
1 file changed, 38 insertions(+)
New commits:
commit 3c378cef47adb232d67a7f57502d2a4dd4eb17b4
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Tue Jan 15 14:24:47 2013 +0100
662773 - spacewalk-report system-packages-installed
Report of all installed packages on all systems across spacewalk
diff --git a/reporting/reports/data/system-packages-installed b/reporting/reports/data/system-packages-installed
new file mode 100644
index 0000000..9309185
--- /dev/null
+++ b/reporting/reports/data/system-packages-installed
@@ -0,0 +1,38 @@
+
+synopsis:
+
+ Packages installed on systems
+
+description:
+
+ List all packages for all systems across whole spacewalk
+
+columns:
+
+ system_id System id
+ org_id Id of organization system belongs to
+ package_name Name of the package
+ package_epoch Epoch of the package
+ package_version Version of the package
+ package_release Release of the package
+ package_arch Architecture of the package
+
+sql:
+
+ select * from (
+ select rhnServer.id as system_id,
+ rhnServer.org_id as org_id,
+ rhnPackageName.name as package_name,
+ rhnPackageEvr.epoch as package_epoch,
+ rhnPackageEvr.version as package_version,
+ rhnPackageEvr.release as package_release,
+ rhnPackageArch.label as package_arch
+ from rhnServer
+ join rhnServerPackage on rhnServer.id=rhnServerPackage.server_id
+ join rhnPackageName on rhnServerPackage.name_id=rhnPackageName.id
+ join rhnPackageEvr on rhnServerPackage.evr_id=rhnPackageEvr.id
+ join rhnPackageArch on rhnServerPackage.package_arch_id=rhnPackageArch.id
+ ) X
+ -- where placeholder
+ order by system_id, org_id, package_name, package_name
+
11 years, 4 months
reporting/reports
by Tomáš Kašpárek
reporting/reports/data/inventory | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 61a6386c8f1dbe1df782008b73130c0a0259f4f7
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Tue Jan 15 11:37:12 2013 +0100
745342 - additional column in spacewalk-report inventory
added column "is_virtualized" which displays information whether system is virtualized or not
also minor indentation fix (tabs vs. spaces)
diff --git a/reporting/reports/data/inventory b/reporting/reports/data/inventory
index 7d7687b..3862c8a 100755
--- a/reporting/reports/data/inventory
+++ b/reporting/reports/data/inventory
@@ -14,7 +14,7 @@ columns:
profile_name Profile name, as stored on server
hostname Hostname, as reported by the system
ip_address IPv4 address, as reported by the system
- ipv6_address IPv6 address, as reported by the system
+ ipv6_address IPv6 address, as reported by the system
registered_by User under which the system is registered
registration_time Registration time
last_checkin_time Last checkin time
@@ -28,6 +28,7 @@ columns:
organization Organization name
virtual_host:i System identifier of host, if system is a guest
architecture Architecture of the system
+ is_virtualized Information whether system is virtualized or not
hardware Hardware information
multival_columns:
@@ -45,7 +46,7 @@ sql:
registration_time, last_checkin_time, kernel_version,
packages_out_of_date, errata_out_of_date,
software_channel, configuration_channel,
- entitlements, system_group, organization, virtual_host, architecture, hardware
+ entitlements, system_group, organization, virtual_host, architecture, is_virtualized, hardware
from (
select rhnserver.id as server_id, rhnserver.name as profile_name,
rhnservernetwork.hostname, trim(rhnservernetwork.ipaddr) as ip_address,
@@ -74,6 +75,8 @@ sql:
(
select rhnserverarch.name from rhnserverarch where rhnserver.server_arch_id = rhnserverarch.id
) as architecture,
+ (case when (select rhnVirtualInstance.virtual_system_id from rhnVirtualInstance where rhnVirtualInstance.virtual_system_id=rhnserver.id) is null then 'No' else 'Yes' end
+) as is_virtualized,
get_hw_info_as_clob(rhnserver.id, '; ') as hardware
from rhnserver left outer join
(
11 years, 4 months
Changes to 'refs/tags/spacewalk-utils-1.9.10-1'
by Tomas Lestach
Tag 'spacewalk-utils-1.9.10-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2013-01-15 10:07 +0000
Tagging package [spacewalk-utils] version [1.9.10-1] in directory [utils/].
Changes since spacewalk-remote-utils-1.9.2-1:
Tomas Kasparek (2):
477631 - spacewalk-report RFE
removing unnecesarry whitespaces
Tomas Lestach (1):
Automatic commit of package [spacewalk-utils] release [1.9.10-1].
---
rel-eng/packages/spacewalk-utils | 2 -
reporting/reports/data/system-groups | 29 ++++++++++++++++++
reporting/reports/data/system-groups-keys | 33 ++++++++++++++++++++
reporting/reports/data/system-groups-systems | 32 ++++++++++++++++++++
reporting/reports/data/system-groups-users | 43 +++++++++++++++++++++++++++
utils/spacewalk-utils.spec | 9 +++++
6 files changed, 146 insertions(+), 2 deletions(-)
---
11 years, 4 months