monitoring/spacewalk-monitoring
by Tomáš Kašpárek
monitoring/spacewalk-monitoring/spacewalk-monitoring.spec | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 2f958915abb14cf7842b7af27e80a57271338443
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Wed Jul 3 18:43:19 2013 +0200
make monitoring build-able on F19
diff --git a/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec b/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
index 4fbae51..b516267 100644
--- a/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
+++ b/monitoring/spacewalk-monitoring/spacewalk-monitoring.spec
@@ -49,9 +49,13 @@ Requires: tsdb
Requires: spacewalk-monitoring-selinux
%if 0%{?fedora}
+%if 0%{?fedora} > 18
+BuildRequires: systemd
+%else
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
+%endif
%else
Requires(post): chkconfig
Requires(preun): chkconfig
10 years, 10 months
java/code
by Grant Gainey
java/code/src/com/redhat/rhn/domain/iss/IssFactory.java | 21 ++
java/code/src/com/redhat/rhn/domain/iss/IssMaster.hbm.xml | 10 +
java/code/src/com/redhat/rhn/domain/iss/IssMaster.java | 61 ++++++
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/IssMasterSerializer.java | 4
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/IssMasterSerializerTest.java | 6
java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/MasterHandler.java | 66 +++++++
java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java | 93 ++++++++++
7 files changed, 261 insertions(+)
New commits:
commit d10a65cfb42188e43a929a2f1b0287a1dc58388e
Author: Grant Gainey <ggainey(a)redhat.com>
Date: Wed Jul 3 12:04:07 2013 -0400
977878 - Support for is_current and ca_cert, DTO/Serializer/Handler
diff --git a/java/code/src/com/redhat/rhn/domain/iss/IssFactory.java b/java/code/src/com/redhat/rhn/domain/iss/IssFactory.java
index d9ffd40..66eeeeb 100644
--- a/java/code/src/com/redhat/rhn/domain/iss/IssFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/iss/IssFactory.java
@@ -119,6 +119,27 @@ public class IssFactory extends HibernateFactory {
}
/**
+ * Return current default master for this slave
+ * @return master where master.isDefaultMaster() == true, null else
+ */
+ public static IssMaster getCurrentMaster() {
+ Map params = new HashMap();
+ return (IssMaster) singleton.lookupObjectByNamedQuery(
+ "IssMaster.lookupDefaultMaster", params);
+ }
+
+ /**
+ * Unset whatever the 'current' master is, no matter who holds it currently
+ */
+ public static void unsetCurrentMaster() {
+ IssMaster m = getCurrentMaster();
+ if (m != null) {
+ m.unsetAsDefault();
+ save(m);
+ }
+ }
+
+ /**
* IssMasterOrg helpers
*/
diff --git a/java/code/src/com/redhat/rhn/domain/iss/IssMaster.hbm.xml b/java/code/src/com/redhat/rhn/domain/iss/IssMaster.hbm.xml
index aa616e7..b433301 100644
--- a/java/code/src/com/redhat/rhn/domain/iss/IssMaster.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/iss/IssMaster.hbm.xml
@@ -13,6 +13,8 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
</id>
<property name="label" column="LABEL" type="string" length="256" />
+ <property name="isCurrentMaster" column="IS_CURRENT_MASTER" type="string" length="1" />
+ <property name="caCert" column="CA_CERT" type="string" length="1024" />
<set name="masterOrgs"
inverse="true"
@@ -35,4 +37,12 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<![CDATA[from com.redhat.rhn.domain.iss.IssMaster as m order by m.label]]>
</query>
+ <query name="IssMaster.lookupDefaultMaster">
+ <![CDATA[from com.redhat.rhn.domain.iss.IssMaster where isCurrentMaster = 'Y']]>
+ </query>
+
+ <query name="IssMaster.unsetCurrent">
+ <![CDATA[update com.redhat.rhn.domain.iss.IssMaster set isCurrentMaster = 'N' where isCurrentMaster = 'Y']]>
+ </query>
+
</hibernate-mapping>
diff --git a/java/code/src/com/redhat/rhn/domain/iss/IssMaster.java b/java/code/src/com/redhat/rhn/domain/iss/IssMaster.java
index 7eab4cd..06ca8e6 100644
--- a/java/code/src/com/redhat/rhn/domain/iss/IssMaster.java
+++ b/java/code/src/com/redhat/rhn/domain/iss/IssMaster.java
@@ -32,6 +32,8 @@ public class IssMaster extends BaseDto {
private Long id;
private String label;
+ private String isCurrentMaster = "N";
+ private String caCert;
private Set<IssMasterOrg> masterOrgs = new HashSet<IssMasterOrg>();
/**
@@ -67,6 +69,65 @@ public class IssMaster extends BaseDto {
}
/**
+ * Get filename of CA Certificate for this master
+ * @return filename
+ */
+ public String getCaCert() {
+ return caCert;
+ }
+
+ /**
+ * Set filename of the CA Cert for this master
+ * @param caCertIn path to the CA cert for this master
+ */
+ public void setCaCert(String caCertIn) {
+ this.caCert = caCertIn;
+ }
+
+ /**
+ * Is this master the current-default for the Slave we're on?
+ * @return 'Y' is we're the default, 'N' else
+ */
+ protected String getIsCurrentMaster() {
+ return isCurrentMaster;
+ }
+
+ /**
+ * Set this master as default, or not
+ * NOTE: FOR HIBERNATE ONLY, use #makeDefaultMaster() instead
+ * @param isCurrentIn - 'Y' if this is the default, 'N' else
+ */
+ protected void setIsCurrentMaster(String isCurrentIn) {
+ this.isCurrentMaster = isCurrentIn;
+ }
+
+ /**
+ * Make this master the default for this slave's satellite-sync operations
+ */
+ public void makeDefaultMaster() {
+ IssFactory.unsetCurrentMaster();
+ this.setIsCurrentMaster("Y");
+ }
+
+ /**
+ * Make sure this master is NOT the default for satellite-sync
+ * NOTE: Preferred is to make someone else the default -but sometimes, you
+ * just don't want a default...
+ */
+ public void unsetAsDefault() {
+ this.setIsCurrentMaster("N");
+ }
+
+ /**
+ * Is this master the default for this slave's satellite-sync?
+ * @return true if this is the master satellite-sync will use in the absence of
+ * other info
+ */
+ public boolean isDefaultMaster() {
+ return "Y".equals(this.getIsCurrentMaster());
+ }
+
+ /**
* Get Orgs this master has let us know about
* @return list of orgs Master has told us about
*/
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/IssMasterSerializer.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/IssMasterSerializer.java
index 754233f..84d4b43 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/IssMasterSerializer.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/IssMasterSerializer.java
@@ -32,6 +32,8 @@ import com.redhat.rhn.frontend.xmlrpc.serializer.util.SerializerHelper;
* #struct("IssMaster info")
* #prop("int", "id")
* #prop("string", "label")
+ * #prop("string", "caCert")
+ * #prop("boolean", "isCurrentMaster")
* #struct_end()
*/
public class IssMasterSerializer implements XmlRpcCustomSerializer {
@@ -53,6 +55,8 @@ public class IssMasterSerializer implements XmlRpcCustomSerializer {
IssMaster master = (IssMaster) obj;
helper.add("id", master.getId());
helper.add("label", master.getLabel());
+ helper.add("caCert", master.getCaCert());
+ helper.add("isCurrentMaster", master.isDefaultMaster());
helper.writeTo(writer);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/IssMasterSerializerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/IssMasterSerializerTest.java
index 490bfda..4fb647a 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/IssMasterSerializerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/IssMasterSerializerTest.java
@@ -48,6 +48,10 @@ public class IssMasterSerializerTest extends MockObjectTestCase {
assertTrue(result.contains(">" + master.getId() + "<"));
assertTrue(result.contains("name>label</name"));
assertTrue(result.contains(">" + master.getLabel() + "<"));
+ assertTrue(result.contains("name>isCurrentMaster</name"));
+ assertTrue(result.contains(">" + (master.isDefaultMaster() ? "1" : "0") + "<"));
+ assertTrue(result.contains("name>caCert</name"));
+ assertTrue(result.contains(">" + (master.getCaCert()) + "<"));
}
public void testMasterOrgSerialize() throws XmlRpcException, IOException {
@@ -71,6 +75,8 @@ public class IssMasterSerializerTest extends MockObjectTestCase {
IssMaster master = new IssMaster();
master.setLabel("testMaster" + TestUtils.randomString());
+ master.makeDefaultMaster();
+ master.setCaCert("/tmp/FOO-CA-CERT");
Set<IssMasterOrg> orgs = new HashSet<IssMasterOrg>();
for (String orgName : masterOrgNames) {
IssMasterOrg anOrg = new IssMasterOrg();
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/MasterHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/MasterHandler.java
index 2b77372..42ebae5 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/MasterHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/MasterHandler.java
@@ -124,6 +124,72 @@ public class MasterHandler extends BaseHandler {
}
/**
+ * Make the specified Master the default for this Slave's satellite-sync
+ * @param sessionKey User's session key.
+ * @param masterId Id of the Master to be the default
+ * @return 1 on success, exception otherwise
+ *
+ * @xmlrpc.doc Make the specified Master the default for this Slave's satellite-sync
+ * @xmlrpc.param #param("string", "sessionKey")
+ * @xmlrpc.param #param_desc("int", "id", "Id of the Master to make the default")
+ * @xmlrpc.returntype #return_int_success()
+ */
+ public int makeDefault(String sessionKey, Integer masterId) {
+ IssMaster master = getMaster(sessionKey, masterId);
+ master.makeDefaultMaster();
+ return 1;
+ }
+
+ /**
+ * Return the current default-master for this slave
+ * @param sessionKey User's session key
+ * @return current default master, null if there isn't one
+ *
+ * @xmlrpc.doc Return the current default-master for this slave
+ * @xmlrpc.param #param("string", "sessionKey")
+ * @xmlrpc.returntype $IssMasterSerializer
+ */
+ public IssMaster getDefaultMaster(String sessionKey) {
+ ensureSatAdmin(getLoggedInUser(sessionKey));
+ return IssFactory.getCurrentMaster();
+ }
+
+ /**
+ * Make this slave have no default Master for satellite-sync
+ * @param sessionKey User's session key.
+ * @return 1 on success, exception otherwise
+ *
+ * @xmlrpc.doc Make this slave have no default Master for satellite-sync
+ * @xmlrpc.param #param("string", "sessionKey")
+ * @xmlrpc.returntype #return_int_success()
+ */
+ public int unsetDefaultMaster(String sessionKey) {
+ ensureSatAdmin(getLoggedInUser(sessionKey));
+ IssFactory.unsetCurrentMaster();
+ return 1;
+ }
+
+ /**
+ * Set the CA-CERT filename for specified Master on this Slave
+ * @param sessionKey User's session key.
+ * @param masterId Id of the Master we're affecting
+ * @param caCertFilename path to this Master's CA Cert on this Slave
+ * @return 1 on success, exception otherwise
+ *
+ * @xmlrpc.doc Make the specified Master the default for this Slave's satellite-sync
+ * @xmlrpc.param #param("string", "sessionKey")
+ * @xmlrpc.param #param_desc("int", "id", "Id of the Master to affect")
+ * @xmlrpc.param #param_desc("string", "caCertFilename",
+ * "path to specified Master's CA cert")
+ * @xmlrpc.returntype #return_int_success()
+ */
+ public int setCaCert(String sessionKey, Integer masterId, String caCertFilename) {
+ IssMaster master = getMaster(sessionKey, masterId);
+ master.setCaCert(caCertFilename);
+ return 1;
+ }
+
+ /**
* Find a Master by specifying its ID
* @param sessionKey User's session key.
* @param masterId Id of the Master to look for
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
index 0aa78c7..9396eba 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
@@ -87,6 +87,99 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
}
}
+ public void testCaCert() {
+ IssMaster master = handler.create(adminKey, masterName);
+ Integer mstrId = master.getId().intValue();
+
+ // Make sure that non-sat-admin users cannot access
+ try {
+ int rc = handler.setCaCert(regularKey, mstrId, "/tmp/foo");
+ fail();
+ }
+ catch (PermissionCheckFailureException e) {
+ //success
+ }
+
+ // Make sure satellite-admin can
+ try {
+ int rc = handler.setCaCert(adminKey, mstrId, "/tmp/foo");
+ IssMaster gotMaster = handler.getMaster(adminKey, mstrId);
+ assertEquals("/tmp/foo", gotMaster.getCaCert());
+ }
+ catch (PermissionCheckFailureException e) {
+ fail();
+ }
+ }
+
+ public void testMasterDefault() {
+ String masterName1 = "testMaster" + TestUtils.randomString();
+ String masterName2 = "testMaster" + TestUtils.randomString();
+ String masterName3 = "testMaster" + TestUtils.randomString();
+
+ IssMaster master1 = handler.create(adminKey, masterName1);
+ IssMaster master2 = handler.create(adminKey, masterName2);
+ IssMaster master3 = handler.create(adminKey, masterName3);
+
+ // Make sure that non-sat-admin users cannot do any of the
+ // master-default APIs
+ try {
+ IssMaster retMaster = handler.getDefaultMaster(regularKey);
+ fail();
+ }
+ catch (PermissionCheckFailureException e) {
+ // success
+ }
+ try {
+ int rc = handler.makeDefault(regularKey, master1.getId().intValue());
+ fail();
+ }
+ catch (PermissionCheckFailureException e) {
+ // success
+ }
+
+ try {
+ int rc = handler.unsetDefaultMaster(regularKey);
+ fail();
+ }
+ catch (PermissionCheckFailureException e) {
+ // success
+ }
+
+ // Make sure satellite-admin can
+ try {
+ IssMaster retMaster = handler.getDefaultMaster(adminKey);
+ assertNull(retMaster);
+
+ int rc = handler.makeDefault(adminKey, master1.getId().intValue());
+ assertEquals(1, rc);
+ retMaster = handler.getDefaultMaster(adminKey);
+ assertNotNull(retMaster);
+ assertTrue(retMaster.getId().equals(master1.getId()));
+
+ rc = handler.makeDefault(adminKey, master3.getId().intValue());
+ assertEquals(1, rc);
+ retMaster = handler.getDefaultMaster(adminKey);
+ assertNotNull(retMaster);
+ assertTrue(retMaster.getId().equals(master3.getId()));
+
+ retMaster = handler.getMaster(adminKey, master1.getId().intValue());
+ assertNotNull(retMaster);
+ assertFalse(retMaster.isDefaultMaster());
+
+ rc = handler.unsetDefaultMaster(adminKey);
+ assertEquals(1, rc);
+ retMaster = handler.getMaster(adminKey, master3.getId().intValue());
+ assertNotNull(retMaster);
+ assertFalse(retMaster.isDefaultMaster());
+
+ retMaster = handler.getDefaultMaster(adminKey);
+ assertNull(retMaster);
+ }
+ catch (PermissionCheckFailureException e) {
+ fail();
+ }
+ }
+
public void testDelete() {
IssMaster master = handler.create(adminKey, masterName);
Long mstrId = master.getId();
10 years, 10 months
Changes to 'refs/tags/spacewalk-schema-1.10.61-1'
by StephenHerr
Tag 'spacewalk-schema-1.10.61-1' created by Stephen Herr <sherr(a)redhat.com> at 2013-07-03 14:01 +0000
Tagging package [spacewalk-schema] version [1.10.61-1] in directory [schema/spacewalk/].
Changes since spacewalk-schema-1.10.60-1:
Stephen Herr (2):
977878 - ca cert path field was not long enough
Automatic commit of package [spacewalk-schema] release [1.10.61-1].
---
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/common/tables/rhnISSMaster.sql | 2 +-
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.oracle | 2 +-
schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.postgresql | 2 +-
5 files changed, 8 insertions(+), 5 deletions(-)
---
10 years, 10 months
2 commits - rel-eng/packages schema/spacewalk
by StephenHerr
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/common/tables/rhnISSMaster.sql | 2 +-
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.oracle | 2 +-
schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.postgresql | 2 +-
5 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 465aeccc38edc4aa727af80fef63a658c85badfb
Author: Stephen Herr <sherr(a)redhat.com>
Date: Wed Jul 3 10:01:15 2013 -0400
Automatic commit of package [spacewalk-schema] release [1.10.61-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 5a6e0ff..3fe42d0 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.10.60-1 schema/spacewalk/
+1.10.61-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index dd3def7..affa745 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -4,7 +4,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 1.10.60
+Version: 1.10.61
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -71,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Wed Jul 03 2013 Stephen Herr <sherr(a)redhat.com> 1.10.61-1
+- 977878 - ca cert path field was not long enough
+
* Wed Jul 03 2013 Stephen Herr <sherr(a)redhat.com> 1.10.60-1
- 977878 - rhnISSMaster index needs to be different for oracle
commit fb7e32847df91726897146fadb487502042a9890
Author: Stephen Herr <sherr(a)redhat.com>
Date: Wed Jul 3 10:01:10 2013 -0400
977878 - ca cert path field was not long enough
diff --git a/schema/spacewalk/common/tables/rhnISSMaster.sql b/schema/spacewalk/common/tables/rhnISSMaster.sql
index c662baf..d16d715 100644
--- a/schema/spacewalk/common/tables/rhnISSMaster.sql
+++ b/schema/spacewalk/common/tables/rhnISSMaster.sql
@@ -3,7 +3,7 @@ create table rhnIssMaster (
label varchar2(256) not null constraint rhn_iss_master_label_uq unique,
created timestamp with local time zone default (current_timestamp) not null,
is_current_master char(1) default 'N' not null constraint rhn_issm_master_yn check (is_current_master in ('Y', 'N')),
- ca_cert varchar2(256)
+ ca_cert varchar2(1024)
);
create sequence rhn_issmaster_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.oracle
index f940906..1b2860f 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.oracle
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.oracle
@@ -1,7 +1,7 @@
alter table rhnISSMaster add is_current_master char(1) default 'N' not null
constraint rhn_issm_master_yn check (is_current_master in ('Y', 'N'));
-alter table rhnISSMaster add ca_cert varchar2(256);
+alter table rhnISSMaster add ca_cert varchar2(1024);
create unique index rhn_issm_only_one_default on rhnISSMaster (
case when is_current_master = 'Y' then is_current_master end);
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.postgresql
index 9b3dbfe..2fa0fa1 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.postgresql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.postgresql
@@ -1,7 +1,7 @@
alter table rhnISSMaster add is_current_master char(1) default 'N' not null
constraint rhn_issm_master_yn check (is_current_master in ('Y', 'N'));
-alter table rhnISSMaster add ca_cert varchar(256);
+alter table rhnISSMaster add ca_cert varchar(1024);
create unique index rhn_issm_only_one_default on rhnISSMaster
(is_current_master) where is_current_master = 'Y';
10 years, 10 months
Changes to 'refs/tags/spacewalk-schema-1.10.60-1'
by StephenHerr
Tag 'spacewalk-schema-1.10.60-1' created by Stephen Herr <sherr(a)redhat.com> at 2013-07-03 13:26 +0000
Tagging package [spacewalk-schema] version [1.10.60-1] in directory [schema/spacewalk/].
Changes since spacewalk-schema-1.10.59-1:
Stephen Herr (2):
977878 - rhnISSMaster index needs to be different for oracle
Automatic commit of package [spacewalk-schema] release [1.10.60-1].
---
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/common/tables/rhnISSMaster.sql | 4 +++-
schema/spacewalk/oracle/tables/rhnISSMaster_index.sql | 4 ++++
schema/spacewalk/postgres/tables/rhnISSMaster_index.sql | 4 ++++
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql | 6 ------
schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.oracle | 7 +++++++
schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.postgresql | 7 +++++++
8 files changed, 30 insertions(+), 9 deletions(-)
---
10 years, 10 months
2 commits - rel-eng/packages schema/spacewalk
by StephenHerr
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/common/tables/rhnISSMaster.sql | 4 +++-
schema/spacewalk/oracle/tables/rhnISSMaster_index.sql | 4 ++++
schema/spacewalk/postgres/tables/rhnISSMaster_index.sql | 4 ++++
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql | 6 ------
schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.oracle | 7 +++++++
schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.postgresql | 7 +++++++
8 files changed, 30 insertions(+), 9 deletions(-)
New commits:
commit 27b6a57b7858fec26cb21d87c6b0a29c2b8ce371
Author: Stephen Herr <sherr(a)redhat.com>
Date: Wed Jul 3 09:26:21 2013 -0400
Automatic commit of package [spacewalk-schema] release [1.10.60-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 86ac00f..5a6e0ff 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.10.59-1 schema/spacewalk/
+1.10.60-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index 53a07a9..dd3def7 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -4,7 +4,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 1.10.59
+Version: 1.10.60
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -71,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Wed Jul 03 2013 Stephen Herr <sherr(a)redhat.com> 1.10.60-1
+- 977878 - rhnISSMaster index needs to be different for oracle
+
* Wed Jul 03 2013 Milan Zazrivec <mzazrivec(a)redhat.com> 1.10.59-1
- Drop where from unique index creation
commit 45353d38d943c42d2725b7d76b59ed2abe9936e9
Author: Stephen Herr <sherr(a)redhat.com>
Date: Wed Jul 3 09:21:22 2013 -0400
977878 - rhnISSMaster index needs to be different for oracle
diff --git a/schema/spacewalk/common/tables/rhnISSMaster.sql b/schema/spacewalk/common/tables/rhnISSMaster.sql
index a78e034..c662baf 100644
--- a/schema/spacewalk/common/tables/rhnISSMaster.sql
+++ b/schema/spacewalk/common/tables/rhnISSMaster.sql
@@ -8,4 +8,6 @@ create table rhnIssMaster (
create sequence rhn_issmaster_seq;
-create unique index rhn_issm_only_one_default on rhnISSMaster (is_current_master);
+-- functional indexes for this table can be found at:
+-- oracle: oracle/tables/rhnISSMaster_index.sql
+-- postgres: postgres/tables/rhnISSMaster_index.sql
diff --git a/schema/spacewalk/oracle/tables/rhnISSMaster_index.sql b/schema/spacewalk/oracle/tables/rhnISSMaster_index.sql
new file mode 100644
index 0000000..1c006b6
--- /dev/null
+++ b/schema/spacewalk/oracle/tables/rhnISSMaster_index.sql
@@ -0,0 +1,4 @@
+-- functional index for rhnISSMaster
+
+create unique index rhn_issm_only_one_default on rhnISSMaster (
+ case when is_current_master = 'Y' then is_current_master end);
diff --git a/schema/spacewalk/postgres/tables/rhnISSMaster_index.sql b/schema/spacewalk/postgres/tables/rhnISSMaster_index.sql
new file mode 100644
index 0000000..a0b9bd6
--- /dev/null
+++ b/schema/spacewalk/postgres/tables/rhnISSMaster_index.sql
@@ -0,0 +1,4 @@
+-- functional index for rhnISSMaster
+
+create unique index rhn_issm_only_one_default on rhnISSMaster
+ (is_current_master) where is_current_master = 'Y';
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql
deleted file mode 100644
index a9a97c0..0000000
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table rhnISSMaster add is_current_master char(1) default 'N' not null
- constraint rhn_issm_master_yn check (is_current_master in ('Y', 'N'));
-
-alter table rhnISSMaster add ca_cert varchar2(256);
-
-create unique index rhn_issm_only_one_default on rhnISSMaster (is_current_master);
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.oracle
new file mode 100644
index 0000000..f940906
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.oracle
@@ -0,0 +1,7 @@
+alter table rhnISSMaster add is_current_master char(1) default 'N' not null
+ constraint rhn_issm_master_yn check (is_current_master in ('Y', 'N'));
+
+alter table rhnISSMaster add ca_cert varchar2(256);
+
+create unique index rhn_issm_only_one_default on rhnISSMaster (
+ case when is_current_master = 'Y' then is_current_master end);
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.postgresql
new file mode 100644
index 0000000..9b3dbfe
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql.postgresql
@@ -0,0 +1,7 @@
+alter table rhnISSMaster add is_current_master char(1) default 'N' not null
+ constraint rhn_issm_master_yn check (is_current_master in ('Y', 'N'));
+
+alter table rhnISSMaster add ca_cert varchar(256);
+
+create unique index rhn_issm_only_one_default on rhnISSMaster
+ (is_current_master) where is_current_master = 'Y';
10 years, 10 months
Changes to 'refs/tags/spacewalk-schema-1.10.59-1'
by Milan Zazrivec
Tag 'spacewalk-schema-1.10.59-1' created by Milan Zazrivec <mzazrivec(a)redhat.com> at 2013-07-03 11:53 +0000
Tagging package [spacewalk-schema] version [1.10.59-1] in directory [schema/spacewalk/].
Changes since spacewalk-java-1.10.112-1:
Milan Zazrivec (2):
Drop where from unique index creation
Automatic commit of package [spacewalk-schema] release [1.10.59-1].
---
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/common/tables/rhnISSMaster.sql | 2 +-
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql | 2 +-
4 files changed, 7 insertions(+), 4 deletions(-)
---
10 years, 10 months
rel-eng/packages schema/spacewalk
by Milan Zazrivec
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit abd2afea562ec75f3f5ff5d9d285398df4335116
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Jul 3 13:53:16 2013 +0200
Automatic commit of package [spacewalk-schema] release [1.10.59-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 283b7d7..86ac00f 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.10.58-1 schema/spacewalk/
+1.10.59-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index 5492ea1..53a07a9 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -4,7 +4,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 1.10.58
+Version: 1.10.59
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -71,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Wed Jul 03 2013 Milan Zazrivec <mzazrivec(a)redhat.com> 1.10.59-1
+- Drop where from unique index creation
+
* Tue Jul 02 2013 Stephen Herr <sherr(a)redhat.com> 1.10.58-1
- 977878 - move iss parent / ca_cert configs into database
10 years, 10 months
schema/spacewalk
by Milan Zazrivec
schema/spacewalk/common/tables/rhnISSMaster.sql | 2 +-
schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 8ac37bd912a8009a80064f59dd6bb3aa9232394c
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Jul 3 13:23:17 2013 +0200
Drop where from unique index creation
Not supported in Oracle.
diff --git a/schema/spacewalk/common/tables/rhnISSMaster.sql b/schema/spacewalk/common/tables/rhnISSMaster.sql
index 7cf906c..a78e034 100644
--- a/schema/spacewalk/common/tables/rhnISSMaster.sql
+++ b/schema/spacewalk/common/tables/rhnISSMaster.sql
@@ -8,4 +8,4 @@ create table rhnIssMaster (
create sequence rhn_issmaster_seq;
-create unique index rhn_issm_only_one_default on rhnISSMaster (is_current_master) where is_current_master = 'Y';
+create unique index rhn_issm_only_one_default on rhnISSMaster (is_current_master);
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql
index 49d1874..a9a97c0 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.9-to-spacewalk-schema-1.10/028-satellite_sync_master_in_db.sql
@@ -3,4 +3,4 @@ alter table rhnISSMaster add is_current_master char(1) default 'N' not null
alter table rhnISSMaster add ca_cert varchar2(256);
-create unique index rhn_issm_only_one_default on rhnISSMaster (is_current_master) where is_current_master = 'Y';
+create unique index rhn_issm_only_one_default on rhnISSMaster (is_current_master);
10 years, 10 months
Changes to 'refs/tags/spacewalk-java-1.10.112-1'
by Grant Gainey
Tag 'spacewalk-java-1.10.112-1' created by Grant Gainey <ggainey(a)redhat.com> at 2013-07-02 19:58 +0000
Tagging package [spacewalk-java] version [1.10.112-1] in directory [java/].
Changes since spacewalk-config-1.10.5-1:
Grant Gainey (2):
977878 - Keep some unit-tests from overlapping
Automatic commit of package [spacewalk-java] release [1.10.112-1].
---
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/IssMasterSerializerTest.java | 3
java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java | 39 +++++-----
java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/slave/test/SlaveHandlerTest.java | 25 +++---
java/spacewalk-java.spec | 5 +
rel-eng/packages/spacewalk-java | 2
5 files changed, 42 insertions(+), 32 deletions(-)
---
10 years, 11 months