Changes to 'refs/tags/rhncfg-5.10.16-1'
by Miroslav Suchý
Tag 'rhncfg-5.10.16-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-09-29 12:07 +0000
Tagging package [rhncfg] version [5.10.16-1] in directory [client/tools/rhncfg/].
Changes since spacewalk-backend-1.6.22-1:
Miroslav Suchý (2):
add save_traceback even into this branch
Automatic commit of package [rhncfg] release [5.10.16-1].
Tomas Lestach (2):
682845 - schedule repo synchronization through API
fix xmlrpc returntypes
---
client/tools/rhncfg/config_common/rpc_wrapper.py | 1
client/tools/rhncfg/rhncfg.spec | 5
java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java | 106 +++++++++-
rel-eng/packages/rhncfg | 2
4 files changed, 102 insertions(+), 12 deletions(-)
---
10 years, 10 months
2 commits - client/tools rel-eng/packages
by Miroslav Suchý
client/tools/rhncfg/config_common/rpc_wrapper.py | 1 +
client/tools/rhncfg/rhncfg.spec | 5 ++++-
rel-eng/packages/rhncfg | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 9bf58348cd20c6d854783d22ea217ea0cb0de902
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Sep 29 14:07:58 2011 +0200
Automatic commit of package [rhncfg] release [5.10.16-1].
diff --git a/client/tools/rhncfg/rhncfg.spec b/client/tools/rhncfg/rhncfg.spec
index 1241521..57a3e3e 100644
--- a/client/tools/rhncfg/rhncfg.spec
+++ b/client/tools/rhncfg/rhncfg.spec
@@ -8,7 +8,7 @@ Group: Applications/System
License: GPLv2 and Python
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 5.10.15
+Version: 5.10.16
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -106,6 +106,9 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Thu Sep 29 2011 Miroslav Suchý 5.10.16-1
+- add save_traceback even into this branch
+
* Fri Sep 23 2011 Martin Minar <mminar(a)redhat.com> 5.10.15-1
- Fix `rhncfg-client verify' traceback for missing symlinks
(Joshua.Roys(a)gtri.gatech.edu)
diff --git a/rel-eng/packages/rhncfg b/rel-eng/packages/rhncfg
index f7a172f..9faf072 100644
--- a/rel-eng/packages/rhncfg
+++ b/rel-eng/packages/rhncfg
@@ -1 +1 @@
-5.10.15-1 client/tools/rhncfg/
+5.10.16-1 client/tools/rhncfg/
commit 3c1ef0f4bccc9e04d2ef3a8bcceba7e33ba46ddc
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Sep 29 13:39:40 2011 +0200
add save_traceback even into this branch
addressing:
Traceback (most recent call last):
File "/usr/bin/rhncfg-client", line 34, in ?
sys.exit(Main().main() or 0)
File "/usr/share/rhn/config_common/rhn_main.py", line 170, in main
repo = getattr(repo_module, self.repository_class_name)()
File "/usr/share/rhn/config_client/rpc_cli_repository.py", line 32, in __init__
repository.RPC_Repository.__init__(self, setup_network)
File "/usr/share/rhn/config_common/repository.py", line 301, in __init__
x_server.registration.welcome_message()
File "/usr/lib/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/share/rhn/config_common/rpc_wrapper.py", line 221, in _request
return self._call_function(rpclib.Server._request, (self, methodname, params))
File "/usr/share/rhn/config_common/rpc_wrapper.py", line 175, in _call_function
raise e, None, save_traceback
UnboundLocalError: local variable 'save_traceback' referenced before assignment
This has been ommited in commit 86ec92b1c0221a9bb51e0f032f1800b349972036
diff --git a/client/tools/rhncfg/config_common/rpc_wrapper.py b/client/tools/rhncfg/config_common/rpc_wrapper.py
index 685d6a5..b6ede49 100644
--- a/client/tools/rhncfg/config_common/rpc_wrapper.py
+++ b/client/tools/rhncfg/config_common/rpc_wrapper.py
@@ -169,6 +169,7 @@ class Server(rpclib.Server):
raise e, None, save_traceback #Don't raise the NoMoreServers error, raise the error that triggered the failover.
continue
except (error, sslerror, herror, gaierror, timeout), e:
+ save_traceback = sys.exc_info()[2]
try:
self._failover()
except NoMoreServers, f:
10 years, 10 months
2 commits - java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java | 106 +++++++++-
1 file changed, 96 insertions(+), 10 deletions(-)
New commits:
commit 0a987bbab5667ef58547cf261d38f354a1f9fd70
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Sep 29 11:12:30 2011 +0200
fix xmlrpc returntypes
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java
index 4d4afb3..b4193cb 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java
@@ -959,7 +959,7 @@ public class ChannelSoftwareHandler extends BaseHandler {
* @xmlrpc.param #param("int", "serverId")
* @xmlrpc.param #array_single("string", "channelLabel - labels of the channels to
* subscribe the system to.")
- * @xmlrpc.returntype int - 1 on success, 0 otherwise
+ * @xmlrpc.returntype #return_int_success()
*/
@Deprecated
public int setSystemChannels(String sessionKey, Integer sid, List channelLabels)
@@ -2358,7 +2358,7 @@ public class ChannelSoftwareHandler extends BaseHandler {
* @xmlrpc.param #param_desc("string", "label", "label of repo wanted")
* @xmlrpc.param #param_desc("string", "type", "type of repo wanted")
* @xmlrpc.param #param_desc("string", "url", "url of repo wanted")
- * @xmlrpc.returntype ContentSource
+ * @xmlrpc.returntype $ContentSourceSerializer
**/
public ContentSource createRepo(String sessionKey, String label, String type,
String url) {
@@ -2385,7 +2385,7 @@ public class ChannelSoftwareHandler extends BaseHandler {
* @xmlrpc.doc Creates a ContentSource (repo)
* @xmlrpc.param #session_key()
* @xmlrpc.param #param_desc("long", "id", "ID of repo to be removed")
- * @xmlrpc.returntype Integer
+ * @xmlrpc.returntype #return_int_success()
**/
public Integer removeRepo(String sessionKey, Integer id) {
User user = getLoggedInUser(sessionKey);
@@ -2404,7 +2404,7 @@ public class ChannelSoftwareHandler extends BaseHandler {
* @xmlrpc.doc Creates a ContentSource (repo)
* @xmlrpc.param #session_key()
* @xmlrpc.param #param_desc("string", "label", "label of repo to be removed")
- * @xmlrpc.returntype Integer
+ * @xmlrpc.returntype #return_int_success()
**/
public Integer removeRepo(String sessionKey, String label) {
User user = getLoggedInUser(sessionKey);
@@ -2425,7 +2425,7 @@ public class ChannelSoftwareHandler extends BaseHandler {
* @xmlrpc.param #session_key()
* @xmlrpc.param #param_desc("string", "chanLabel", "of the channel to use")
* @xmlrpc.param #param_desc("string", "repoLabel", "of the repo to associate")
- * @xmlrpc.returntype Channel
+ * @xmlrpc.returntype $ChannelSerializer
**/
public Channel associateRepo(String sessionKey, String chanLabel, String repoLabel) {
User user = getLoggedInUser(sessionKey);
@@ -2450,7 +2450,7 @@ public class ChannelSoftwareHandler extends BaseHandler {
* @xmlrpc.param #session_key()
* @xmlrpc.param #param_desc("string", "chanLabel", "of the channel to use")
* @xmlrpc.param #param_desc("string", "repoLabel", "of the repo to disassociate")
- * @xmlrpc.returntype Channel
+ * @xmlrpc.returntype $ChannelSerializer
**/
public Channel disassociateRepo(String sessionKey, String chanLabel, String repoLabel) {
User user = getLoggedInUser(sessionKey);
@@ -2477,7 +2477,7 @@ public class ChannelSoftwareHandler extends BaseHandler {
* @xmlrpc.param #session_key()
* @xmlrpc.param #param_desc("Long", "id", "of the repo to use")
* @xmlrpc.param #param_desc("string", "url", "new URL to use")
- * @xmlrpc.returntype ContentSource
+ * @xmlrpc.returntype $ContentSourceSerializer
**/
public ContentSource updateRepoUrl(String sessionKey, Integer id, String url) {
User user = getLoggedInUser(sessionKey);
@@ -2498,7 +2498,7 @@ public class ChannelSoftwareHandler extends BaseHandler {
* @xmlrpc.param #session_key()
* @xmlrpc.param #param_desc("string", "label", "of the repo to use")
* @xmlrpc.param #param_desc("string", "url", "new URL to use")
- * @xmlrpc.returntype ContentSource
+ * @xmlrpc.returntype $ContentSourceSerializer
**/
public ContentSource updateRepoUrl(String sessionKey, String label, String url) {
User user = getLoggedInUser(sessionKey);
@@ -2519,7 +2519,7 @@ public class ChannelSoftwareHandler extends BaseHandler {
* @xmlrpc.param #session_key()
* @xmlrpc.param #param_desc("Long", "id", "of the repo to use")
* @xmlrpc.param #param_desc("string", "label", "new label to use")
- * @xmlrpc.returntype ContentSource
+ * @xmlrpc.returntype $ContentSourceSerializer
**/
public ContentSource updateRepoLabel(String sessionKey, Integer id, String label) {
User user = getLoggedInUser(sessionKey);
@@ -2542,7 +2542,7 @@ public class ChannelSoftwareHandler extends BaseHandler {
* @xmlrpc.param #param_desc("Long", "id", "of the repo to use")
* @xmlrpc.param #param_desc("string", "label", "new label to use")
* @xmlrpc.param #param_desc("string", "url", "new URL to use")
- * @xmlrpc.returntype ContentSource
+ * @xmlrpc.returntype $ContentSourceSerializer
**/
public ContentSource updateRepo(String sessionKey, Integer id, String label,
String url) {
commit f096d8184082ac69e1d659fa60dac337f105aa90
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Sep 29 12:00:00 2011 +0200
682845 - schedule repo synchronization through API
introducing:
* channel.software.listChannelRepos API
* channel.software.syncRepo APIs
* channel.software.getRepoSyncCronExpression API
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java
index a20b5c2..4d4afb3 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java
@@ -64,9 +64,11 @@ import com.redhat.rhn.manager.errata.ErrataManager;
import com.redhat.rhn.manager.errata.cache.ErrataCacheManager;
import com.redhat.rhn.manager.system.SystemManager;
import com.redhat.rhn.manager.user.UserManager;
+import com.redhat.rhn.taskomatic.TaskomaticApi;
import com.redhat.rhn.taskomatic.task.TaskConstants;
import org.apache.commons.lang.BooleanUtils;
+import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.StopWatch;
import org.apache.log4j.Logger;
@@ -2584,4 +2586,88 @@ public class ChannelSoftwareHandler extends BaseHandler {
return ChannelFactory.lookupContentSource(new Long(id.longValue()));
}
+ /**
+ * Lists associated repos with the given channel
+ * @param sessionKey session key
+ * @param channelLabel channel label
+ * @return list of associates repos
+ *
+ * @xmlrpc.doc Lists associated repos with the given channel
+ * @xmlrpc.param #session_key()
+ * @xmlrpc.param #param_desc("string", "channelLabel", "channel label")
+ * @xmlrpc.returntype
+ * #array()
+ * $ContentSourceSerializer
+ * #array_end()
+ */
+ public List<ContentSource> listChannelRepos(String sessionKey, String channelLabel) {
+ User loggedInUser = getLoggedInUser(sessionKey);
+ Channel channel = ChannelManager.lookupByLabel(loggedInUser.getOrg(),
+ channelLabel);
+ return ChannelFactory.lookupContentSources(loggedInUser.getOrg(), channel);
+ }
+
+ /**
+ * Trigger immediate repo synchronization
+ * @param sessionKey session key
+ * @param channelLabel channel label
+ * @return 1 on success
+ *
+ * @xmlrpc.doc Trigger immediate repo synchronization
+ * @xmlrpc.param #session_key()
+ * @xmlrpc.param #param_desc("string", "channelLabel", "channel label")
+ * @xmlrpc.returntype #return_int_success()
+ */
+ public int syncRepo(String sessionKey, String channelLabel) {
+ User loggedInUser = getLoggedInUser(sessionKey);
+ Channel chan = lookupChannelByLabel(loggedInUser, channelLabel);
+ new TaskomaticApi().scheduleSingleRepoSync(chan, loggedInUser);
+ return 1;
+ }
+ /**
+ * Schedule periodic repo synchronization
+ * @param sessionKey session key
+ * @param channelLabel channel label
+ * @param cronExpr cron expression, if empty all periodic schedules will be disabled
+ * @return 1 on success
+ *
+ * @xmlrpc.doc Schedule periodic repo synchronization
+ * @xmlrpc.param #session_key()
+ * @xmlrpc.param #param_desc("string", "channelLabel", "channel label")
+ * @xmlrpc.param #param_desc("string", "cron expression",
+ * "if empty all periodic schedules will be disabled")
+ * @xmlrpc.returntype #return_int_success()
+ */
+ public int syncRepo(String sessionKey, String channelLabel, String cronExpr) {
+ User loggedInUser = getLoggedInUser(sessionKey);
+ Channel chan = lookupChannelByLabel(loggedInUser, channelLabel);
+ if (StringUtils.isEmpty(cronExpr)) {
+ new TaskomaticApi().unscheduleRepoSync(chan, loggedInUser);
+ }
+ else {
+ new TaskomaticApi().scheduleRepoSync(chan, loggedInUser, cronExpr);
+ }
+ return 1;
+ }
+
+ /**
+ * Returns repo synchronization cron expression
+ * @param sessionKey session key
+ * @param channelLabel channel label
+ * @return cron expression
+ *
+ * @xmlrpc.doc Returns repo synchronization cron expression
+ * @xmlrpc.param #session_key()
+ * @xmlrpc.param #param_desc("string", "channelLabel", "channel label")
+ * @xmlrpc.return cron expression
+ */
+ public String getRepoSyncCronExpression(String sessionKey, String channelLabel) {
+ User loggedInUser = getLoggedInUser(sessionKey);
+ Channel chan = lookupChannelByLabel(loggedInUser, channelLabel);
+ String cronExpr = new TaskomaticApi().getRepoSyncSchedule(chan, loggedInUser);
+ if (StringUtils.isEmpty(cronExpr)) {
+ return new String("");
+ }
+ return cronExpr;
+ }
}
10 years, 10 months
Changes to 'refs/tags/spacewalk-backend-1.6.22-1'
by aparsons
Tag 'spacewalk-backend-1.6.22-1' created by Aron Parsons <parsonsa(a)bit-sys.com> at 2011-09-28 15:02 +0000
Tagging package [spacewalk-backend] version [1.6.22-1] in directory [backend/].
Changes since spacecmd-1.6.5-1:
Aron Parsons (2):
use COALESCE instead of NVL for compatibility with PostgreSQL
Automatic commit of package [spacewalk-backend] release [1.6.22-1].
---
backend/server/rhnServer/server_kickstart.py | 2 +-
backend/spacewalk-backend.spec | 6 +++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
---
10 years, 10 months
2 commits - backend/server backend/spacewalk-backend.spec rel-eng/packages
by aparsons
backend/server/rhnServer/server_kickstart.py | 2 +-
backend/spacewalk-backend.spec | 6 +++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit ff78451ff4c77efcb17329c93d59aeb9c46135cb
Author: Aron Parsons <parsonsa(a)bit-sys.com>
Date: Wed Sep 28 11:02:24 2011 -0400
Automatic commit of package [spacewalk-backend] release [1.6.22-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 3ef4fff..36dac85 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -11,7 +11,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2 and Python
-Version: 1.6.21
+Version: 1.6.22
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -674,6 +674,10 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Wed Sep 28 2011 Aron Parsons <parsonsa(a)bit-sys.com> 1.6.22-1
+- use COALESCE instead of NVL for compatibility with PostgreSQL (parsonsa@bit-
+ sys.com)
+
* Thu Sep 22 2011 Aron Parsons <parsonsa(a)bit-sys.com> 1.6.21-1
- fix broken --list-channels option (parsonsa(a)bit-sys.com)
- Fix nvl2/case conversion (Joshua.Roys(a)gtri.gatech.edu)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 875c573..ab0addb 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.6.21-1 backend/
+1.6.22-1 backend/
commit b7d84d91cac8d0361e500a3d9628583d63d509ad
Author: Aron Parsons <parsonsa(a)bit-sys.com>
Date: Wed Sep 28 11:00:25 2011 -0400
use COALESCE instead of NVL for compatibility with PostgreSQL
this fixes a traceback generated from client registration during a
Kickstart session when using PostgreSQL as the backend
diff --git a/backend/server/rhnServer/server_kickstart.py b/backend/server/rhnServer/server_kickstart.py
index 1739d3d..91be103 100644
--- a/backend/server/rhnServer/server_kickstart.py
+++ b/backend/server/rhnServer/server_kickstart.py
@@ -424,7 +424,7 @@ select c.id
rhnPrivateChannelFamily pcf
where pcf.org_id = :org_id
and pcf.channel_family_id = cfm.channel_family_id
- and pcf.current_members < nvl(pcf.max_members,
+ and pcf.current_members < coalesce(pcf.max_members,
pcf.current_members + 1)
union
select cfm.channel_id
10 years, 10 months
Changes to 'refs/tags/spacecmd-1.6.5-1'
by aparsons
Tag 'spacecmd-1.6.5-1' created by Aron Parsons <parsonsa(a)bit-sys.com> at 2011-09-28 13:19 +0000
Tagging package [spacecmd] version [1.6.5-1] in directory [spacecmd/].
Changes since spacewalk-schema-1.6.18-1:
Aron Parsons (2):
spacecmd: wrong argument in distribution_create help message
Automatic commit of package [spacecmd] release [1.6.5-1].
---
rel-eng/packages/spacecmd | 2 +-
spacecmd/spacecmd.spec | 9 ++++++++-
spacecmd/src/lib/distribution.py | 2 +-
3 files changed, 10 insertions(+), 3 deletions(-)
---
10 years, 10 months
2 commits - rel-eng/packages spacecmd/spacecmd.spec spacecmd/src
by aparsons
rel-eng/packages/spacecmd | 2 +-
spacecmd/spacecmd.spec | 9 ++++++++-
spacecmd/src/lib/distribution.py | 2 +-
3 files changed, 10 insertions(+), 3 deletions(-)
New commits:
commit 019d938997371068d30989ad1a39107c3c02ac7c
Author: Aron Parsons <parsonsa(a)bit-sys.com>
Date: Wed Sep 28 09:19:11 2011 -0400
Automatic commit of package [spacecmd] release [1.6.5-1].
diff --git a/rel-eng/packages/spacecmd b/rel-eng/packages/spacecmd
index 0f0cfd7..b88d0ba 100644
--- a/rel-eng/packages/spacecmd
+++ b/rel-eng/packages/spacecmd
@@ -1 +1 @@
-1.6.4-1 spacecmd/
+1.6.5-1 spacecmd/
diff --git a/spacecmd/spacecmd.spec b/spacecmd/spacecmd.spec
index 3a5e057..84427a4 100644
--- a/spacecmd/spacecmd.spec
+++ b/spacecmd/spacecmd.spec
@@ -4,7 +4,7 @@
%endif
Name: spacecmd
-Version: 1.6.4
+Version: 1.6.5
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -61,6 +61,13 @@ touch %{buildroot}/%{python_sitelib}/spacecmd/__init__.py
%doc %{_mandir}/man1/spacecmd.1.gz
%changelog
+* Wed Sep 28 2011 Aron Parsons <parsonsa(a)bit-sys.com> 1.6.5-1
+- spacecmd: wrong argument in distribution_create help message (parsonsa@bit-
+ sys.com)
+- Automatic commit of package [spacecmd] release [1.6.4-1]. (parsonsa@bit-
+ sys.com)
+- spacecmd: added softwarechannel_regenerateyumcache (parsonsa(a)bit-sys.com)
+
* Fri Sep 23 2011 Aron Parsons <parsonsa(a)bit-sys.com> 1.6.4-1
- spacecmd: added softwarechannel_regenerateyumcache (parsonsa(a)bit-sys.com)
commit 4adfd7ca005592748b64da61214468ea336bb19c
Author: Aron Parsons <parsonsa(a)bit-sys.com>
Date: Wed Sep 28 09:17:18 2011 -0400
spacecmd: wrong argument in distribution_create help message
diff --git a/spacecmd/src/lib/distribution.py b/spacecmd/src/lib/distribution.py
index fa813fb..035b1e2 100644
--- a/spacecmd/src/lib/distribution.py
+++ b/spacecmd/src/lib/distribution.py
@@ -29,7 +29,7 @@ def help_distribution_create(self):
options:
-n NAME
- -d path to tree
+ -p path to tree
-b base channel to associate with
-t install type [fedora|rhel_4/5/6|generic_rpm]'''
10 years, 10 months
Changes to 'refs/tags/spacewalk-schema-1.6.18-1'
by Michael Mraka
Tag 'spacewalk-schema-1.6.18-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-09-27 14:11 +0000
Tagging package [spacewalk-schema] version [1.6.18-1] in directory [schema/spacewalk/].
Changes since rhncfg-5.10.15-1:
Aron Parsons (2):
spacecmd: added softwarechannel_regenerateyumcache
Automatic commit of package [spacecmd] release [1.6.4-1].
Michael Mraka (5):
fixed clear_subscriptions() call with optional parameters
upgrade script for optional parameters
fixed table alias in update query
drop function must be inside package body
Automatic commit of package [spacewalk-schema] release [1.6.18-1].
---
rel-eng/packages/spacecmd | 2
rel-eng/packages/spacewalk-schema | 2
schema/spacewalk/postgres/packages/rhn_entitlements.pkb | 10
schema/spacewalk/postgres/procs/delete_server.sql | 2
schema/spacewalk/spacewalk-schema.spec | 7
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/090-rhn_entitlements.sql.postgresql | 10
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/091-rhn_channel.sql.postgresql | 6
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/092-delete_server.sql.oracle | 1
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/092-delete_server.sql.postgresql | 242 ++++++++++
spacecmd/spacecmd.spec | 5
spacecmd/src/lib/softwarechannel.py | 25 +
11 files changed, 294 insertions(+), 18 deletions(-)
---
10 years, 10 months
rel-eng/packages schema/spacewalk
by Michael Mraka
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/spacewalk-schema.spec | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 95fdec1d70add4f81695de2201264a46015f7acd
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Sep 27 16:11:13 2011 +0200
Automatic commit of package [spacewalk-schema] release [1.6.18-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 46642cf..d0fec47 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.6.17-1 schema/spacewalk/
+1.6.18-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index d9d656e..fc4cc87 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -2,7 +2,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 1.6.17
+Version: 1.6.18
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -66,6 +66,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Tue Sep 27 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.18-1
+- drop function must be inside package body
+- fixed table alias in update query
+- fixed clear_subscriptions() call with optional parameters
+
* Fri Sep 23 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.6.17-1
- synced rhn_channel with oracle
- synced rhn_entitlement with oracle
10 years, 10 months
4 commits - schema/spacewalk
by Michael Mraka
schema/spacewalk/postgres/packages/rhn_entitlements.pkb | 10
schema/spacewalk/postgres/procs/delete_server.sql | 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/090-rhn_entitlements.sql.postgresql | 10
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/091-rhn_channel.sql.postgresql | 6
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/092-delete_server.sql.oracle | 1
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/092-delete_server.sql.postgresql | 242 ++++++++++
6 files changed, 257 insertions(+), 14 deletions(-)
New commits:
commit c3b07890d9efd2725a51cb078d8d7e60c489062b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Sep 27 11:29:09 2011 +0200
drop function must be inside package body
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/091-rhn_channel.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/091-rhn_channel.sql.postgresql
index f7e37ad..ae539aa 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/091-rhn_channel.sql.postgresql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/091-rhn_channel.sql.postgresql
@@ -1,12 +1,12 @@
-- oracle equivalent source sha1 b14267384bc104605623a41b755e68e0103b5aa8
+--update pg_setting
+update pg_settings set setting = 'rhn_channel,' || setting where name = 'search_path';
+
drop function get_license_path(channel_id_in in numeric);
drop function license_consent(channel_id_in in numeric, user_id_in in numeric, server_id_in in numeric);
drop function clear_subscriptions(server_id_in in numeric, deleting_server in numeric);
---update pg_setting
-update pg_settings set setting = 'rhn_channel,' || setting where name = 'search_path';
-
create or replace function obtain_read_lock(channel_family_id_in in numeric, org_id_in in numeric)
returns void as $$
declare
commit 6e2db659bd6a13a6c568e64469658f9e6c5f4efc
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Sep 27 11:24:40 2011 +0200
fixed table alias in update query
fixing
ProgrammingError('column "sc" of relation "rhnserverchannel" does not exist\nLINE 1: UPDATE rhnServerChannel sc set sc.is_fve = \'Y\' where sc.serv...\n ^\nQUERY: UPDATE rhnServerChannel sc set sc.is_fve = \'Y\' where sc.server_id = $1 and sc.channel_id in (select cfm.channel_id from rhnChannelFamilyMembers cfm where cfm.channel_family_id = $2 )\nCONTEXT: PL/pgSQL function "activate_channel_entitlement" line 102 at SQL statement\n',)
column "sc" of relation "rhnserverchannel" does not exist
LINE 1: UPDATE rhnServerChannel sc set sc.is_fve = 'Y' where sc.serv...
^
QUERY: UPDATE rhnServerChannel sc set sc.is_fve = 'Y' where sc.server_id = $1 and sc.channel_id in (select cfm.channel_id from rhnChannelFamilyMembers cfm where cfm.channel_family_id = $2 )
CONTEXT: PL/pgSQL function "activate_channel_entitlement" line 102 at SQL statement
diff --git a/schema/spacewalk/postgres/packages/rhn_entitlements.pkb b/schema/spacewalk/postgres/packages/rhn_entitlements.pkb
index f6367f9..10477a5 100644
--- a/schema/spacewalk/postgres/packages/rhn_entitlements.pkb
+++ b/schema/spacewalk/postgres/packages/rhn_entitlements.pkb
@@ -632,7 +632,7 @@ as $$
-- if the host_server does not have virt
--- find all possible flex slots
-- and set each of the flex eligible guests to Y
- UPDATE rhnServerChannel sc set sc.is_fve = 'Y'
+ UPDATE rhnServerChannel sc set is_fve = 'Y'
where sc.server_id in (
select vi.virtual_system_id
from rhnServerFveCapable sfc
@@ -645,7 +645,7 @@ as $$
else
-- if the host_server has virt
-- set all its flex guests to N
- UPDATE rhnServerChannel sc set sc.is_fve = 'N'
+ UPDATE rhnServerChannel sc set is_fve = 'N'
where
sc.channel_id in (select cfm.channel_id from rhnChannelFamilyMembers cfm
where cfm.CHANNEL_FAMILY_ID = family.channel_family_id)
@@ -1473,7 +1473,7 @@ as $$
-- We need to convert some systems from flex guest to regular
for system in to_convert_reg(cfam_id, org_id_in, reduce_quantity) loop
--rhn_channel.convert_to_regular(system.server_id, cfam_id);
- UPDATE rhnServerChannel sc set sc.is_fve = 'N'
+ UPDATE rhnServerChannel sc set is_fve = 'N'
where sc.server_id = system.server_id
and sc.channel_id in (select cfm.channel_id
from rhnChannelFamilyMembers cfm
@@ -1503,7 +1503,7 @@ as $$
reduce_quantity := prev_ent_count - quantity_in;
for system in to_convert_flex(cfam_id, org_id_in, reduce_quantity) loop
-- rhn_channel.convert_to_fve(system.server_id, cfam_id);
- UPDATE rhnServerChannel sc set sc.is_fve = 'Y'
+ UPDATE rhnServerChannel sc set is_fve = 'Y'
where sc.server_id = system.server_id
and sc.channel_id in (select cfm.channel_id
from rhnChannelFamilyMembers cfm
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/090-rhn_entitlements.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/090-rhn_entitlements.sql.postgresql
index 0d5ce48..3d267f3 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/090-rhn_entitlements.sql.postgresql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/090-rhn_entitlements.sql.postgresql
@@ -618,7 +618,7 @@ as $$
-- if the host_server does not have virt
--- find all possible flex slots
-- and set each of the flex eligible guests to Y
- UPDATE rhnServerChannel sc set sc.is_fve = 'Y'
+ UPDATE rhnServerChannel sc set is_fve = 'Y'
where sc.server_id in (
select vi.virtual_system_id
from rhnServerFveCapable sfc
@@ -631,7 +631,7 @@ as $$
else
-- if the host_server has virt
-- set all its flex guests to N
- UPDATE rhnServerChannel sc set sc.is_fve = 'N'
+ UPDATE rhnServerChannel sc set is_fve = 'N'
where
sc.channel_id in (select cfm.channel_id from rhnChannelFamilyMembers cfm
where cfm.CHANNEL_FAMILY_ID = family.channel_family_id)
@@ -1459,7 +1459,7 @@ as $$
-- We need to convert some systems from flex guest to regular
for system in to_convert_reg(cfam_id, org_id_in, reduce_quantity) loop
--rhn_channel.convert_to_regular(system.server_id, cfam_id);
- UPDATE rhnServerChannel sc set sc.is_fve = 'N'
+ UPDATE rhnServerChannel sc set is_fve = 'N'
where sc.server_id = system.server_id
and sc.channel_id in (select cfm.channel_id
from rhnChannelFamilyMembers cfm
@@ -1489,7 +1489,7 @@ as $$
reduce_quantity := prev_ent_count - quantity_in;
for system in to_convert_flex(cfam_id, org_id_in, reduce_quantity) loop
-- rhn_channel.convert_to_fve(system.server_id, cfam_id);
- UPDATE rhnServerChannel sc set sc.is_fve = 'Y'
+ UPDATE rhnServerChannel sc set is_fve = 'Y'
where sc.server_id = system.server_id
and sc.channel_id in (select cfm.channel_id
from rhnChannelFamilyMembers cfm
commit cc1d4fcd2b461c23534c12789044eeb34a79dc3f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Sep 27 11:22:58 2011 +0200
upgrade script for optional parameters
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/090-rhn_entitlements.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/090-rhn_entitlements.sql.postgresql
index 1c6f509..0d5ce48 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/090-rhn_entitlements.sql.postgresql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/090-rhn_entitlements.sql.postgresql
@@ -1055,7 +1055,7 @@ as $$
-- if we're removing a base ent, then be sure to
-- remove the server's channel subscriptions.
if ( type_is_base = 'Y' ) then
- perform rhn_channel.clear_subscriptions(sgrecord.server_id, update_family_countsYN);
+ perform rhn_channel.clear_subscriptions(sgrecord.server_id, 0, update_family_countsYN);
end if;
end loop;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/092-delete_server.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/092-delete_server.sql.oracle
new file mode 100644
index 0000000..b7b00b1
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/092-delete_server.sql.oracle
@@ -0,0 +1 @@
+-- This file is intentionally left empty.
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/092-delete_server.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/092-delete_server.sql.postgresql
new file mode 100644
index 0000000..2c67f51
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/092-delete_server.sql.postgresql
@@ -0,0 +1,242 @@
+-- oracle equivalent source sha1 b14267384bc104605623a41b755e68e0103b5aa8
+
+create or replace
+function delete_server (
+ server_id_in in numeric
+) returns void
+as
+$$
+declare
+ servergroups cursor for
+ select server_id, server_group_id
+ from rhnServerGroupMembers sgm
+ where sgm.server_id = server_id_in;
+
+ configchannels cursor for
+ select cc.id
+ from rhnConfigChannel cc,
+ rhnConfigChannelType cct,
+ rhnServerConfigChannel scc
+ where 1=1
+ and scc.server_id = server_id_in
+ and scc.config_channel_id = cc.id
+ -- these config channel types are reserved
+ -- for use by a single server, so we don't
+ -- need to check for other servers subscribed
+ and cct.label in
+ ('local_override','server_import')
+ and cct.id = cc.confchan_type_id;
+
+ is_virt boolean;
+begin
+ perform rhn_channel.delete_server_channels(server_id_in);
+ -- rhn_channel.clear_subscriptions(server_id_in);
+
+ -- filelists
+ delete from rhnFileList where id in (
+ select spfl.file_list_id
+ from rhnServerPreserveFileList spfl
+ where spfl.server_id = server_id_in
+ and not exists (
+ select 1
+ from rhnServerPreserveFileList
+ where file_list_id = spfl.file_list_id
+ and server_id != server_id_in
+ union all
+ select 1
+ from rhnKickstartPreserveFileList
+ where file_list_id = spfl.file_list_id
+ )
+ );
+
+ for configchannel in configchannels loop
+ perform rhn_config.delete_channel(configchannel.id);
+ end loop;
+
+ is_virt := exists (
+ select 1
+ from rhnServerEntitlementView
+ where server_id = server_id_in
+ and label in ('virtualization_host', 'virtualization_host_platform')
+ );
+
+ for sgm in servergroups loop
+ perform rhn_server.delete_from_servergroup(
+ sgm.server_id, sgm.server_group_id);
+ end loop;
+
+ if is_virt then
+ perform rhn_entitlements.repoll_virt_guest_entitlements(server_id_in);
+ end if;
+
+ -- we're handling this instead of letting an "on delete
+ -- set null" do it so that we don't run the risk
+ -- of setting off the triggers and killing us with a
+ -- mutating table
+
+ -- this is merge of two single updates:
+ -- update ... set old_server_id = null where old_server_id = server_id_in;
+ -- update ... set new_server_id = null where new_server_id = server_id_in;
+ -- so we scan rhnKickstartSession table only once
+ update rhnKickstartSession
+ set old_server_id = case when old_server_id = server_id_in then null else old_server_id end,
+ new_server_id = case when new_server_id = server_id_in then null else new_server_id end
+ where old_server_id = server_id_in
+ or new_server_id = server_id_in;
+
+ perform rhn_channel.clear_subscriptions(server_id_in, 1, 1);
+
+ -- A little complicated here, but the goal is to
+ -- delete records from rhnVirtualInstace only if we don't
+ -- care about them anymore. We don't care about records
+ -- in rhnVirtualInstance if we are deleting the host
+ -- system and the virtual system is already null, or
+ -- vice-versa. We *do* care about them if either the
+ -- host or virtual system is still registered because we
+ -- still want them to show up in the UI.
+ -- If there's a newer row in rhnVirtualInstance with the same
+ -- uuid, this guest must have been re-registered, so we can clean
+ -- this data up.
+
+ delete from rhnVirtualInstance vi
+ where (host_system_id = server_id_in and virtual_system_id is null)
+ or (virtual_system_id = server_id_in and host_system_id is null)
+ or (vi.virtual_system_id = server_id_in and vi.modified < (select max(vi2.modified)
+ from rhnVirtualInstance vi2 where vi2.uuid = vi.uuid));
+
+ -- this is merge of two single updates:
+ -- update ... set host_system_id = null where host_system_id = server_id_in;
+ -- update ... set virtual_system_id = null where virtual_system_id = server_id_in;
+ -- so we scan rhnVirtualInstance table only once
+ update rhnVirtualInstance
+ set host_system_id = case when host_system_id = server_id_in then null else host_system_id end,
+ virtual_system_id = case when virtual_system_id = server_id_in then null else virtual_system_id end
+ where host_system_id = server_id_in
+ or virtual_system_id = server_id_in;
+
+ -- this is merge of two single updates:
+ -- update ... set old_host_system_id = null when old_host_system_id = server_id_in;
+ -- update ... set new_host_system_id = null when new_host_system_id = server_id_in;
+ -- so we scan rhnVirtualInstanceEventLog table only once
+ update rhnVirtualInstanceEventLog
+ set old_host_system_id = case when old_host_system_id = server_id_in then null else old_host_system_id end,
+ new_host_system_id = case when new_host_system_id = server_id_in then null else new_host_system_id end
+ where old_host_system_id = server_id_in
+ or new_host_system_id = server_id_in;
+
+ -- We're deleting everything with a foreign key to rhnServer
+ -- here, now. I'm hoping this will help aleviate our deadlock
+ -- problem.
+
+ delete from rhnActionConfigChannel where server_id = server_id_in;
+ delete from rhnActionConfigRevision where server_id = server_id_in;
+ delete from rhnActionPackageRemovalFailure where server_id = server_id_in;
+ delete from rhnClientCapability where server_id = server_id_in;
+ delete from rhnCpu where server_id = server_id_in;
+ -- there's still a cascade here, because the constraint keeps the
+ -- table locked for too long to rebuild it. Ugh...
+ delete from rhnDevice where server_id = server_id_in;
+ delete from rhnProxyInfo where server_id = server_id_in;
+ delete from rhnRam where server_id = server_id_in;
+ delete from rhnRegToken where server_id = server_id_in;
+ delete from rhnSatelliteInfo where server_id = server_id_in;
+ -- this cascades to rhnActionConfigChannel and rhnActionConfigFileName
+ delete from rhnServerAction where server_id = server_id_in;
+ delete from rhnServerActionPackageResult where server_id = server_id_in;
+ delete from rhnServerActionScriptResult where server_id = server_id_in;
+ delete from rhnServerActionVerifyResult where server_id = server_id_in;
+ delete from rhnServerActionVerifyMissing where server_id = server_id_in;
+ -- counts are handled above. this should be a delete_ function.
+ delete from rhnServerChannel where server_id = server_id_in;
+ delete from rhnServerConfigChannel where server_id = server_id_in;
+ delete from rhnServerCustomDataValue where server_id = server_id_in;
+ delete from rhnServerDMI where server_id = server_id_in;
+ delete from rhnServerEvent where server_id = server_id_in;
+ delete from rhnServerHistory where server_id = server_id_in;
+ delete from rhnServerInfo where server_id = server_id_in;
+ delete from rhnServerInstallInfo where server_id = server_id_in;
+ delete from rhnServerLocation where server_id = server_id_in;
+ delete from rhnServerLock where server_id = server_id_in;
+ delete from rhnServerNeededCache where server_id = server_id_in;
+ delete from rhnServerNetwork where server_id = server_id_in;
+ delete from rhnServerNotes where server_id = server_id_in;
+ -- I'm not removing the foreign key from rhnServerPackage; that'll
+ -- take forever. Do the delete anyway.
+ delete from rhnServerPackage where server_id = server_id_in;
+ delete from rhnServerTokenRegs where server_id = server_id_in;
+ delete from rhnSnapshotTag where server_id = server_id_in;
+ -- this cascades to:
+ -- rhnSnapshotChannel, rhnSnapshotConfigChannel, rhnSnapshotPackage,
+ -- rhnSnapshotConfigRevision, rhnSnapshotServerGroup,
+ -- rhnSnapshotTag.
+ -- We may want to consider delete_snapshot() at some point, but
+ -- I don't think we need to yet.
+ delete from rhnSnapshot where server_id = server_id_in;
+ delete from rhnUserServerPrefs where server_id = server_id_in;
+ -- hrm, this one's interesting... we _probably_ should delete
+ -- everything for the parent server_id when we delete the proxy,
+ -- but we don't currently.
+ delete from rhnServerPath where server_id_in in (server_id, proxy_server_id);
+ delete from rhnUserServerPerms where server_id = server_id_in;
+
+ delete from rhnServerNetInterface where server_id = server_id_in;
+ delete from rhn_server_monitoring_info where recid = server_id_in;
+
+ delete from rhnAppInstallSession where server_id = server_id_in;
+ delete from rhnServerUuid where server_id = server_id_in;
+
+ -- We delete all the probes running directly against this system
+ -- and any probes that were using this Server as a Proxy Scout.
+ DELETE FROM rhn_probe_state PS WHERE PS.probe_id IN (
+ SELECT CP.probe_id
+ FROM rhn_check_probe CP
+ WHERE CP.host_id = server_id_in
+ OR CP.sat_cluster_id in
+ (SELECT SN.sat_cluster_id
+ FROM rhn_sat_node SN
+ WHERE SN.server_id = server_id_in)
+ );
+
+ DELETE FROM rhn_probe P WHERE P.recid IN (
+ SELECT CP.probe_id
+ FROM rhn_check_probe CP
+ WHERE CP.host_id = server_id_in
+ OR CP.sat_cluster_id in
+ (SELECT SN.sat_cluster_id
+ FROM rhn_sat_node SN
+ WHERE SN.server_id = server_id_in)
+ );
+
+ -- delete from time_series TODO
+
+ delete from rhn_check_probe where host_id = server_id_in;
+ delete from rhn_host_probe where host_id = server_id_in;
+
+ delete from rhn_sat_cluster where recid in
+ ( select sat_cluster_id from rhn_sat_node where server_id = server_id_in );
+
+ delete from rhn_sat_node where server_id = server_id_in;
+
+ delete from rhnPushClient where server_id = server_id_in;
+
+ -- now get rhnServer itself.
+ delete
+ from rhnServer
+ where id = server_id_in;
+
+ delete
+ from rhnSet
+ where 1=1
+ and user_id in (
+ select wc.id
+ from rhnServer rs,
+ web_contact wc
+ where rs.id = server_id_in
+ and rs.org_id = wc.org_id
+ )
+ and label = 'system_list'
+ and element = server_id_in;
+end;
+$$
+language plpgsql;
+
commit b1a163656232e7464243cfaa1165db1288ff297f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Sep 27 10:19:08 2011 +0200
fixed clear_subscriptions() call with optional parameters
fixing
javax.servlet.ServletException: com.redhat.rhn.common.db.WrappedSQLException: ERROR: fun
ction rhn_channel.clear_subscriptions(numeric, integer) is not unique
Hint: Could not choose a best candidate function. You might need to add explicit type
casts.
Where: PL/pgSQL function "delete_server" line 79 at PERFORM
diff --git a/schema/spacewalk/postgres/packages/rhn_entitlements.pkb b/schema/spacewalk/postgres/packages/rhn_entitlements.pkb
index 13bfdf2..f6367f9 100644
--- a/schema/spacewalk/postgres/packages/rhn_entitlements.pkb
+++ b/schema/spacewalk/postgres/packages/rhn_entitlements.pkb
@@ -1069,7 +1069,7 @@ as $$
-- if we're removing a base ent, then be sure to
-- remove the server's channel subscriptions.
if ( type_is_base = 'Y' ) then
- perform rhn_channel.clear_subscriptions(sgrecord.server_id, update_family_countsYN);
+ perform rhn_channel.clear_subscriptions(sgrecord.server_id, 0, update_family_countsYN);
end if;
end loop;
diff --git a/schema/spacewalk/postgres/procs/delete_server.sql b/schema/spacewalk/postgres/procs/delete_server.sql
index ad35b39..0d6c269 100644
--- a/schema/spacewalk/postgres/procs/delete_server.sql
+++ b/schema/spacewalk/postgres/procs/delete_server.sql
@@ -103,7 +103,7 @@ begin
where old_server_id = server_id_in
or new_server_id = server_id_in;
- perform rhn_channel.clear_subscriptions(server_id_in,1);
+ perform rhn_channel.clear_subscriptions(server_id_in, 1, 1);
-- A little complicated here, but the goal is to
-- delete records from rhnVirtualInstace only if we don't
10 years, 10 months