Changes to 'refs/tags/osad-5.9.26-1'
by Jan Pazdziora
Tag 'osad-5.9.26-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2010-01-29 16:03 +0000
Tagging package [osad] version [5.9.26-1] in directory [client/tools/osad/].
Changes since spacewalk-backend-0.8.39-1:
Jan Pazdziora (2):
559230 - need spacewalk-selinux even in postun, to force order in rpm removal transaction.
Automatic commit of package [osad] release [5.9.26-1].
---
client/tools/osad/osad.spec | 8 ++++++--
rel-eng/packages/osad | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
---
14 years, 2 months
client/tools rel-eng/packages
by Jan Pazdziora
client/tools/osad/osad.spec | 6 +++++-
rel-eng/packages/osad | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 4e7beb22fd2c6b15d22cc4d12fdf0d4b9a9fbb77
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jan 29 17:03:55 2010 +0100
Automatic commit of package [osad] release [5.9.26-1].
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 76f6a2a..ecfa67b 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -9,7 +9,7 @@ Group: System Environment/Daemons
License: GPLv2
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 5.9.25
+Version: 5.9.26
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -240,6 +240,10 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvvi {}
# $Id$
%changelog
+* Fri Jan 29 2010 Jan Pazdziora 5.9.26-1
+- 559230 - address errors during package removal.
+- Do not hide any error messages produced by semanage port -a.
+
* Wed Jan 27 2010 Miroslav Suchy <msuchy(a)redhat.com> 5.9.25-1
- replaced popen2 with subprocess in client (michael.mraka(a)redhat.com)
diff --git a/rel-eng/packages/osad b/rel-eng/packages/osad
index ecb7225..f282b12 100644
--- a/rel-eng/packages/osad
+++ b/rel-eng/packages/osad
@@ -1 +1 @@
-5.9.25-1 client/tools/osad/
+5.9.26-1 client/tools/osad/
14 years, 2 months
client/tools
by Jan Pazdziora
client/tools/osad/osad.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 43cce89844bc24ce2004817c5d9b581a874665da
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jan 29 16:59:02 2010 +0100
559230 - need spacewalk-selinux even in postun, to force order in rpm removal transaction.
Addressing
libsepol.print_missing_requirements: osa-dispatcher's global requirements were not met: type/attribute spacewalk_log_t
libsemanage.semanage_link_sandbox: Link packages failed
/usr/sbin/semodule: Failed!
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index d0d463b..76f6a2a 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -81,7 +81,7 @@ Requires: selinux-policy >= %{selinux_policyver}
Requires: selinux-policy >= 2.4.6-114
%endif
Requires(post): /usr/sbin/semodule, /sbin/restorecon, /usr/sbin/selinuxenabled, /usr/sbin/semanage
-Requires(postun): /usr/sbin/semodule, /sbin/restorecon, /usr/sbin/semanage
+Requires(postun): /usr/sbin/semodule, /sbin/restorecon, /usr/sbin/semanage, spacewalk-selinux
Requires: osa-dispatcher
%description -n osa-dispatcher-selinux
14 years, 2 months
Changes to 'refs/tags/spacewalk-backend-0.8.39-1'
by Michael Mraka
Tag 'spacewalk-backend-0.8.39-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-01-29 15:56 +0000
Tagging package [spacewalk-backend] version [0.8.39-1] in directory [backend/].
Changes since spacewalk-java-0.8.8-1:
Jan Pazdziora (6):
No XMLRPC/SOAP processing in the web/Perl stack, removing.
545389 - initial satellite-sync performance issue -- force use of index.
Do semodule -l before any semodule operation.
Do not hide any error messages produced by semanage port -a.
Do not hide any error messages produced by semanage port -a.
559230 - delete port before removing the osa-dispatcher SELinux module.
Justin Sherrill (4):
559284 - fixing issue where _ & - characters were being removed from cobbler names
fixing issue that kept spacewalk from working with the newest cobbler
506950 - fixing issue where RedHat channels tab would show up for spacewalk users
538435 - fixing issue where cloning a channel wouldnt properly clone the activation keys, and wouldnt update the default session key properly
Michael Mraka (4):
559447 - removed update_family_counts() from clear_subscriptions()
559447 - speed up rhn-satelite-activate
fixed capitalization of MD5sum
Automatic commit of package [spacewalk-backend] release [0.8.39-1].
Milan Zazrivec (2):
557370 - clear dmi warnings for xen pv guests
548812 - include host info in the virt. guests refresh
Tomas Lestach (2):
539159 - offering only ssm systems with appropriate permissions for config channel subscription
539159 - offering only ssm systems with appropriate permissions for config channel unsubscription
---
backend/server/importlib/backend.py | 2
backend/server/wsgi/wsgiHandler.py | 2
backend/spacewalk-backend.spec | 6 +
client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 23 +++--
client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable | 2
client/tools/osad/osad.spec | 10 ++
client/tools/rhn-virtualization/virtualization/poller.py | 7 +
java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java | 9 ++
java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml | 1
java/code/src/com/redhat/rhn/common/security/acl/BaseHandler.java | 11 ++
java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java | 25 +++++-
java/code/src/com/redhat/rhn/frontend/action/configuration/ssm/SubscribeConfirm.java | 7 +
java/code/src/com/redhat/rhn/frontend/action/configuration/ssm/UnsubscribeConfirmSubmitAction.java | 8 +-
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 2
java/code/src/com/redhat/rhn/manager/kickstart/KickstartEditCommand.java | 12 +++
java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerCommand.java | 4 -
java/code/webapp/WEB-INF/nav/channel_tabs.xml | 2
java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml | 2
rel-eng/packages/spacewalk-backend | 2
schema/spacewalk/oracle/packages/rhn_channel.pkb | 39 ++++++++--
schema/spacewalk/oracle/packages/rhn_channel.pks | 7 +
schema/spacewalk/oracle/packages/rhn_entitlements.pkb | 19 +++-
schema/spacewalk/oracle/packages/rhn_entitlements.pks | 3
selinux/jabberd-selinux/jabberd-selinux-enable | 2
selinux/oracle-rhnsat-selinux/oracle-rhnsat-selinux.spec | 3
selinux/oracle-selinux/oracle-selinux.spec | 11 +-
selinux/oracle-xe-selinux/oracle-xe-selinux-enable | 5 -
selinux/oracle-xe-selinux/oracle-xe-selinux.spec | 3
web/modules/pxt/PXT/ApacheHandler.pm | 23 +----
30 files changed, 183 insertions(+), 71 deletions(-)
---
14 years, 2 months
2 commits - backend/server backend/spacewalk-backend.spec rel-eng/packages
by Michael Mraka
backend/server/wsgi/wsgiHandler.py | 2 +-
backend/spacewalk-backend.spec | 6 +++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 84c84c27ccc7f1995196393aa8251cb3b58614d0
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Jan 29 16:56:38 2010 +0100
Automatic commit of package [spacewalk-backend] release [0.8.39-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 8e471b8..7340ff1 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -8,7 +8,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.8.38
+Version: 0.8.39
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -625,6 +625,10 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Fri Jan 29 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.39-1
+- fixed ISE on F12 mod_wsgi
+- 545389 - initial satellite-sync performance issue -- force use of index.
+
* Wed Jan 27 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.38-1
- fixed packaging of wsgi handler files
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 350f6cf..2475609 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.8.38-1 backend/
+0.8.39-1 backend/
commit b7e89b67cab0dcd243667224ec780dc5d26c65b6
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Jan 29 16:51:39 2010 +0100
fixed capitalization of MD5sum
adressed
Exception Handler Information
Traceback (most recent call last):
File "/usr/share/rhn/server/apacheUploadServer.py", line 107, in _wrapper
ret = function(req)
File "/usr/share/rhn/upload_server/handlers/package_push/package_push.py", line 126, in handler
if not (checksum_type == self.file_checksum_type
AttributeError: PackagePush instance has no attribute 'file_checksum_type'
diff --git a/backend/server/wsgi/wsgiHandler.py b/backend/server/wsgi/wsgiHandler.py
index bc1f7c0..0c5bda2 100644
--- a/backend/server/wsgi/wsgiHandler.py
+++ b/backend/server/wsgi/wsgiHandler.py
@@ -25,7 +25,7 @@ from common import log_debug
def handle(environ, start_response, server, component_type, type="normal"):
#wsgi seems to capitalize incoming headers and add HTTP- to the front :/
# so we strip out the first 5 letters, and transform it into what we want.
- replacements = {'_':'-', 'Rhn':'RHN', 'Md5Sum':'MD5Sum', 'Xml':'XML'}
+ replacements = {'_':'-', 'Rhn':'RHN', 'Md5Sum':'MD5sum', 'Xml':'XML'}
for key in environ.keys():
if key[:5] == "HTTP_":
new_key = key[5:].title()
14 years, 2 months
client/tools
by Jan Pazdziora
client/tools/osad/osad.spec | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 349fc5a0383c56324bee0f73f92880ad60c0878b
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jan 29 16:47:28 2010 +0100
559230 - delete port before removing the osa-dispatcher SELinux module.
Addressing
libsepol.context_from_record: type osa_dispatcher_upstream_notif_server_port_t is not defined
libsepol.context_from_record: could not create context structure
libsepol.port_from_record: could not create port structure for range 1290:1290 (tcp)
libsepol.sepol_port_modify: could not load port range 1290 - 1290 (tcp)
libsemanage.dbase_policydb_modify: could not modify record value
libsemanage.semanage_base_merge_components: could not merge local modifications into policy
/usr/sbin/semodule: Failed!
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index b504a83..d0d463b 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -80,8 +80,8 @@ Requires: selinux-policy >= %{selinux_policyver}
%if 0%{?rhel} == 5
Requires: selinux-policy >= 2.4.6-114
%endif
-Requires(post): /usr/sbin/semodule, /sbin/restorecon, /usr/sbin/selinuxenabled
-Requires(postun): /usr/sbin/semodule, /sbin/restorecon
+Requires(post): /usr/sbin/semodule, /sbin/restorecon, /usr/sbin/selinuxenabled, /usr/sbin/semanage
+Requires(postun): /usr/sbin/semodule, /sbin/restorecon, /usr/sbin/semanage
Requires: osa-dispatcher
%description -n osa-dispatcher-selinux
@@ -172,6 +172,12 @@ fi
%postun -n osa-dispatcher-selinux
# Clean up after package removal
if [ $1 -eq 0 ]; then
+
+ /usr/sbin/semanage port -ln \
+ | perl '-F/,?\s+/' -ane 'print map "$_\n", @F if shift @F eq "osa_dispatcher_upstream_notif_server_port_t" and shift @F eq "tcp"' \
+ | while read port ; do \
+ /usr/sbin/semanage port -d -t osa_dispatcher_upstream_notif_server_port_t -p tcp $port || :
+ done
for selinuxvariant in %{selinux_variants}
do
/usr/sbin/semodule -s ${selinuxvariant} -l > /dev/null 2>&1 \
14 years, 2 months
2 commits - client/tools selinux/jabberd-selinux
by Jan Pazdziora
client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable | 2 +-
selinux/jabberd-selinux/jabberd-selinux-enable | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 95e98e89e6a1ae547ad6cc8c510eaee8eb8eb156
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jan 29 15:01:14 2010 +0100
Do not hide any error messages produced by semanage port -a.
diff --git a/selinux/jabberd-selinux/jabberd-selinux-enable b/selinux/jabberd-selinux/jabberd-selinux-enable
index 677cb14..728d414 100644
--- a/selinux/jabberd-selinux/jabberd-selinux-enable
+++ b/selinux/jabberd-selinux/jabberd-selinux-enable
@@ -8,7 +8,7 @@ for selinuxvariant in mls strict targeted
/usr/share/selinux/${selinuxvariant}/jabber.pp || :
done
-/usr/sbin/semanage port -a -t jabber_interserver_port_t -p tcp 5347 > /dev/null 2>&1 || :
+/usr/sbin/semanage port -a -t jabber_interserver_port_t -p tcp 5347 || :
rpm -ql jabberd | xargs -n 1 /sbin/restorecon -ri {} || :
/sbin/restorecon -ri /var/run/jabberd || :
commit 7fb85054fce5c5ae07048d93cdf1bcda11d31ce8
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jan 29 14:59:21 2010 +0100
Do not hide any error messages produced by semanage port -a.
diff --git a/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable b/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable
index 87a91c2..dc2a01c 100644
--- a/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable
+++ b/client/tools/osad/osa-dispatcher-selinux/osa-dispatcher-selinux-enable
@@ -8,7 +8,7 @@ for selinuxvariant in mls strict targeted
/usr/share/selinux/${selinuxvariant}/osa-dispatcher.pp || :
done
-/usr/sbin/semanage port -a -t osa_dispatcher_upstream_notif_server_port_t -p tcp 1290 > /dev/null 2>&1 || :
+/usr/sbin/semanage port -a -t osa_dispatcher_upstream_notif_server_port_t -p tcp 1290 || :
rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvvi {}
/sbin/restorecon -vvi /var/log/rhn/osa-dispatcher.log
14 years, 2 months
selinux/oracle-rhnsat-selinux selinux/oracle-selinux selinux/oracle-xe-selinux
by Jan Pazdziora
selinux/oracle-rhnsat-selinux/oracle-rhnsat-selinux.spec | 3 ++-
selinux/oracle-selinux/oracle-selinux.spec | 11 +++++++----
selinux/oracle-xe-selinux/oracle-xe-selinux-enable | 5 +++--
selinux/oracle-xe-selinux/oracle-xe-selinux.spec | 3 ++-
4 files changed, 14 insertions(+), 8 deletions(-)
New commits:
commit 46b9cd79e9de090d291f64afe0993dfbfe63aaf3
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jan 29 14:53:21 2010 +0100
Do semodule -l before any semodule operation.
This allows us to drop the > /dev/null on the actual operation
and thus see any errors that might otherwise go lost.
diff --git a/selinux/oracle-rhnsat-selinux/oracle-rhnsat-selinux.spec b/selinux/oracle-rhnsat-selinux/oracle-rhnsat-selinux.spec
index 239054c..f9bc69e 100644
--- a/selinux/oracle-rhnsat-selinux/oracle-rhnsat-selinux.spec
+++ b/selinux/oracle-rhnsat-selinux/oracle-rhnsat-selinux.spec
@@ -97,7 +97,8 @@ if [ $1 -eq 0 ]; then
# Remove SELinux policy modules
for selinuxvariant in %{selinux_variants}
do
- /usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} &> /dev/null || :
+ /usr/sbin/semodule -s ${selinuxvariant} -l > /dev/null 2>&1 \
+ && /usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} || :
done
# Clean up oracle-server-arch files
diff --git a/selinux/oracle-selinux/oracle-selinux.spec b/selinux/oracle-selinux/oracle-selinux.spec
index c80748a..87b1b37 100644
--- a/selinux/oracle-selinux/oracle-selinux.spec
+++ b/selinux/oracle-selinux/oracle-selinux.spec
@@ -121,8 +121,9 @@ rm -rf %{buildroot}
# Install SELinux policy modules
for selinuxvariant in %{selinux_variants}
do
- /usr/sbin/semodule -s ${selinuxvariant} -i \
- %{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp &> /dev/null || :
+ /usr/sbin/semodule -s ${selinuxvariant} -l > /dev/null 2>&1 \
+ && /usr/sbin/semodule -s ${selinuxvariant} -i \
+ %{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp || :
done
# add an oracle port if it does not already exist
@@ -167,7 +168,8 @@ if [ $1 -eq 0 ]; then
# Remove SELinux policy modules
for selinuxvariant in %{selinux_variants}
do
- /usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} &> /dev/null || :
+ /usr/sbin/semodule -s ${selinuxvariant} -l > /dev/null 2>&1 \
+ && /usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} || :
done
# Clean up any remaining file contexts (shouldn't be any really)
[ -d %{oracle_base} ] && \
@@ -187,7 +189,8 @@ if [ $1 -eq 0 ]; then
# Remove SELinux policy modules
for selinuxvariant in %{selinux_variants}
do
- /usr/sbin/semodule -s ${selinuxvariant} -r %{modulename}-nofcontext &> /dev/null || :
+ /usr/sbin/semodule -s ${selinuxvariant} -l > /dev/null 2>&1 \
+ && /usr/sbin/semodule -s ${selinuxvariant} -r %{modulename}-nofcontext || :
done
fi
diff --git a/selinux/oracle-xe-selinux/oracle-xe-selinux-enable b/selinux/oracle-xe-selinux/oracle-xe-selinux-enable
index e2abdf7..18508b1 100644
--- a/selinux/oracle-xe-selinux/oracle-xe-selinux-enable
+++ b/selinux/oracle-xe-selinux/oracle-xe-selinux-enable
@@ -3,8 +3,9 @@
# Install SELinux policy modules
for selinuxvariant in mls strict targeted
do
- /usr/sbin/semodule -s ${selinuxvariant} -i \
- /usr/share/selinux/${selinuxvariant}/oracle-xe.pp &> /dev/null || :
+ /usr/sbin/semodule -s ${selinuxvariant} -l > /dev/null 2>&1 \
+ && /usr/sbin/semodule -s ${selinuxvariant} -i \
+ /usr/share/selinux/${selinuxvariant}/oracle-xe.pp || :
done
/usr/sbin/semanage port -a -t oracle_port_t -p tcp 9055 || :
diff --git a/selinux/oracle-xe-selinux/oracle-xe-selinux.spec b/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
index 003d3ed..14ce013 100644
--- a/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
+++ b/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
@@ -117,7 +117,8 @@ if [ $1 -eq 0 ]; then
# Remove SELinux policy modules
for selinuxvariant in %{selinux_variants}
do
- /usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} &> /dev/null || :
+ /usr/sbin/semodule -s ${selinuxvariant} -l > /dev/null 2>&1 \
+ && /usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} || :
done
/usr/sbin/semanage port -d -t oracle_port_t -p tcp 9000 || :
14 years, 2 months
2 commits - schema/spacewalk
by Michael Mraka
schema/spacewalk/oracle/packages/rhn_channel.pkb | 39 +++++++++++++++---
schema/spacewalk/oracle/packages/rhn_channel.pks | 7 ++-
schema/spacewalk/oracle/packages/rhn_entitlements.pkb | 19 ++++++--
schema/spacewalk/oracle/packages/rhn_entitlements.pks | 3 -
4 files changed, 54 insertions(+), 14 deletions(-)
New commits:
commit 9376fa4c50709439d71a5dc7071b22f552021820
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Jan 29 14:12:19 2010 +0100
559447 - speed up rhn-satelite-activate
we recount family group members during activation; the trouble is we do
it in clear_subscriptions() which means we recount every family
numerous times (once per every server subscribed to channel belonging to
the family which sometimes means up to hundred to thousand times)
so this commit added update_family_countsYN parameter to clear_subscriptions()
which inhibits recounting inside and moved it to the
update_group_family_counts() which does bulk update once per family
diff --git a/schema/spacewalk/oracle/packages/rhn_channel.pkb b/schema/spacewalk/oracle/packages/rhn_channel.pkb
index df1c9cb..e438524 100644
--- a/schema/spacewalk/oracle/packages/rhn_channel.pkb
+++ b/schema/spacewalk/oracle/packages/rhn_channel.pkb
@@ -482,7 +482,8 @@ IS
end;
- PROCEDURE clear_subscriptions(server_id_in IN NUMBER, deleting_server IN NUMBER := 0 )
+ PROCEDURE clear_subscriptions(server_id_in IN NUMBER, deleting_server IN NUMBER := 0,
+ update_family_countsYN IN NUMBER := 1)
IS
cursor server_channels(server_id_in in number) is
select s.org_id, sc.channel_id, cfm.channel_family_id
@@ -495,12 +496,13 @@ IS
BEGIN
for channel in server_channels(server_id_in)
loop
- unsubscribe_server(server_id_in, channel.channel_id, 1, 1, deleting_server);
+ unsubscribe_server(server_id_in, channel.channel_id, 1, 1, deleting_server, update_family_countsYN);
end loop channel;
END clear_subscriptions;
PROCEDURE unsubscribe_server(server_id_in IN NUMBER, channel_id_in NUMBER, immediate_in NUMBER := 1, unsubscribe_children_in number := 0,
- deleting_server IN NUMBER := 0 )
+ deleting_server IN NUMBER := 0,
+ update_family_countsYN IN NUMBER := 1)
IS
channel_family_id_val NUMBER;
server_org_id_val NUMBER;
@@ -537,7 +539,8 @@ IS
channel_id_in => child.id,
immediate_in => immediate_in,
unsubscribe_children_in => unsubscribe_children_in,
- deleting_server => deleting_server);
+ deleting_server => deleting_server,
+ update_family_countsYN => update_family_countsYN);
else
rhn_exception.raise_exception('channel_unsubscribe_child_exists');
end if;
@@ -598,7 +601,9 @@ IS
FROM rhnServer
WHERE id = server_id_in;
- rhn_channel.update_family_counts(channel_family_id_val, server_org_id_val);
+ if update_family_countsYN = 1 then
+ rhn_channel.update_family_counts(channel_family_id_val, server_org_id_val);
+ end if;
END unsubscribe_server;
PROCEDURE bulk_unsubscribe_server(channel_id_in IN NUMBER, set_label_in IN VARCHAR2, set_uid_in IN NUMBER)
@@ -708,6 +713,29 @@ IS
END update_family_counts;
+ PROCEDURE update_group_family_counts(group_label_in IN VARCHAR2,
+ org_id_in IN NUMBER)
+ IS
+ BEGIN
+ FOR i IN (
+ SELECT DISTINCT CFM.channel_family_id, SG.org_id
+ FROM rhnChannelFamilyMembers CFM
+ JOIN rhnServerChannel SC
+ ON SC.channel_id = CFM.channel_id
+ JOIN rhnServerGroupMembers SGM
+ ON SC.server_id = SGM.server_id
+ JOIN rhnServerGroup SG
+ ON SGM.server_group_id = SG.id
+ JOIN rhnServerGroupType SGT
+ ON SG.group_type = SGT.id
+ WHERE SGT.label = group_label_in
+ AND SG.org_id = org_id_in
+ AND SGT.is_base = 'Y'
+ ) LOOP
+ rhn_channel.update_family_counts(i.channel_family_id, i.org_id);
+ END LOOP;
+ END update_group_family_counts;
+
FUNCTION available_chan_subscriptions(channel_id_in IN NUMBER,
org_id_in IN NUMBER)
RETURN NUMBER
diff --git a/schema/spacewalk/oracle/packages/rhn_channel.pks b/schema/spacewalk/oracle/packages/rhn_channel.pks
index 50aa667..972f3f4 100644
--- a/schema/spacewalk/oracle/packages/rhn_channel.pks
+++ b/schema/spacewalk/oracle/packages/rhn_channel.pks
@@ -51,7 +51,8 @@ IS
FUNCTION get_license_path(channel_id_in IN NUMBER) RETURN VARCHAR2;
PROCEDURE unsubscribe_server(server_id_in IN NUMBER, channel_id_in NUMBER, immediate_in NUMBER := 1, unsubscribe_children_in number := 0,
- deleting_server in number := 0 );
+ deleting_server in number := 0,
+ update_family_countsYN IN NUMBER := 1);
PROCEDURE subscribe_server(server_id_in IN NUMBER, channel_id_in NUMBER, immediate_in NUMBER := 1, user_id_in number := null, recalcfamily_in number := 1);
function can_server_consume_virt_channl(
@@ -90,7 +91,8 @@ IS
set_uid_in in number,
channel_id_in in number);
- PROCEDURE clear_subscriptions(server_id_in IN NUMBER, deleting_server in number := 0 );
+ PROCEDURE clear_subscriptions(server_id_in IN NUMBER, deleting_server in number := 0,
+ update_family_countsYN IN NUMBER := 1);
FUNCTION available_family_subscriptions(channel_family_id_in IN NUMBER, org_id_in IN NUMBER) RETURN NUMBER;
@@ -99,6 +101,7 @@ IS
return number;
PROCEDURE update_family_counts(channel_family_id_in IN NUMBER, org_id_in IN NUMBER);
+ PROCEDURE update_group_family_counts(group_label_in IN VARCHAR2, org_id_in IN NUMBER);
FUNCTION family_for_channel(channel_id_in IN NUMBER) RETURN NUMBER;
FUNCTION available_chan_subscriptions(channel_id_in IN NUMBER, org_id_in IN NUMBER) RETURN NUMBER;
diff --git a/schema/spacewalk/oracle/packages/rhn_entitlements.pkb b/schema/spacewalk/oracle/packages/rhn_entitlements.pkb
index b839312..555da10 100644
--- a/schema/spacewalk/oracle/packages/rhn_entitlements.pkb
+++ b/schema/spacewalk/oracle/packages/rhn_entitlements.pkb
@@ -928,7 +928,8 @@ is
procedure prune_group (
group_id_in in number,
type_in in char,
- quantity_in in number
+ quantity_in in number,
+ update_family_countsYN in number := 1
) is
cursor usergroups is
select user_id, user_group_id, ugt.label
@@ -1008,7 +1009,8 @@ is
-- if we're removing a base ent, then be sure to
-- remove the server's channel subscriptions.
if ( type_is_base = 'Y' ) then
- rhn_channel.clear_subscriptions(sg.server_id);
+ rhn_channel.clear_subscriptions(sg.server_id,
+ update_family_countsYN => update_family_countsYN);
end if;
end loop;
@@ -1265,10 +1267,15 @@ is
rhn_exception.raise_exception(
'not_enough_entitlements_in_base_org');
else
+ -- don't update family counts after every server
+ -- will do bulk update afterwards
rhn_entitlements.set_group_count(org_id_in,
'S',
group_type,
- quantity_in);
+ quantity_in,
+ update_family_countsYN => 0);
+ -- bulk update family counts
+ rhn_channel.update_group_family_counts(group_label_in, org_id_in);
end if;
@@ -1344,7 +1351,8 @@ is
customer_id_in in number,
type_in in char,
group_type_in in number,
- quantity_in in number
+ quantity_in in number,
+ update_family_countsYN in number := 1
) is
group_id number;
quantity number;
@@ -1373,7 +1381,8 @@ is
rhn_entitlements.prune_group(
group_id,
type_in,
- quantity
+ quantity,
+ update_family_countsYN
);
exception
when no_data_found then
diff --git a/schema/spacewalk/oracle/packages/rhn_entitlements.pks b/schema/spacewalk/oracle/packages/rhn_entitlements.pks
index c348ca4..8860c36 100644
--- a/schema/spacewalk/oracle/packages/rhn_entitlements.pks
+++ b/schema/spacewalk/oracle/packages/rhn_entitlements.pks
@@ -144,7 +144,8 @@ is
customer_id_in in number, -- customer_id
type_in in char, -- 'U' or 'S'
group_type_in in number, -- rhn[User|Server]GroupType.id
- quantity_in in number -- quantity
+ quantity_in in number, -- quantity
+ update_family_countsYN in number := 1 -- call update_family_counts inside
);
procedure set_family_count (
commit 6bee8ca975152a3095cc2dd0a176a33dc90f80c9
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Jan 29 14:01:39 2010 +0100
559447 - removed update_family_counts() from clear_subscriptions()
it's already called at the end of unsubscribe_server()
diff --git a/schema/spacewalk/oracle/packages/rhn_channel.pkb b/schema/spacewalk/oracle/packages/rhn_channel.pkb
index 98dd687..df1c9cb 100644
--- a/schema/spacewalk/oracle/packages/rhn_channel.pkb
+++ b/schema/spacewalk/oracle/packages/rhn_channel.pkb
@@ -496,7 +496,6 @@ IS
for channel in server_channels(server_id_in)
loop
unsubscribe_server(server_id_in, channel.channel_id, 1, 1, deleting_server);
- rhn_channel.update_family_counts(channel.channel_family_id, channel.org_id);
end loop channel;
END clear_subscriptions;
14 years, 2 months
2 commits - java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml | 1 +
java/code/src/com/redhat/rhn/frontend/action/configuration/ssm/SubscribeConfirm.java | 7 ++++---
java/code/src/com/redhat/rhn/frontend/action/configuration/ssm/UnsubscribeConfirmSubmitAction.java | 8 +++++---
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 2 +-
4 files changed, 11 insertions(+), 7 deletions(-)
New commits:
commit c425651c7fc1c91395edde5aa0519b959c468a50
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Jan 28 18:02:51 2010 +0100
539159 - offering only ssm systems with appropriate permissions for config channel unsubscription
diff --git a/java/code/src/com/redhat/rhn/frontend/action/configuration/ssm/UnsubscribeConfirmSubmitAction.java b/java/code/src/com/redhat/rhn/frontend/action/configuration/ssm/UnsubscribeConfirmSubmitAction.java
index fb89400..093fbcf 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/configuration/ssm/UnsubscribeConfirmSubmitAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/configuration/ssm/UnsubscribeConfirmSubmitAction.java
@@ -14,6 +14,7 @@
*/
package com.redhat.rhn.frontend.action.configuration.ssm;
+import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.common.hibernate.LookupException;
import com.redhat.rhn.domain.config.ConfigChannel;
import com.redhat.rhn.domain.rhnset.RhnSet;
@@ -21,6 +22,7 @@ import com.redhat.rhn.domain.rhnset.RhnSetElement;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.action.configuration.ConfigActionHelper;
+import com.redhat.rhn.frontend.dto.ConfigSystemDto;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnListDispatchAction;
import com.redhat.rhn.manager.configuration.ConfigurationManager;
@@ -72,15 +74,15 @@ public class UnsubscribeConfirmSubmitAction extends RhnListDispatchAction {
public ActionForward confirm(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
User user = new RequestContext(request).getLoggedInUser();
- RhnSet systemSet = RhnSetDecl.SYSTEMS.get(user);
RhnSet channelSet = RhnSetDecl.CONFIG_CHANNELS.get(user);
ConfigurationManager cm = ConfigurationManager.getInstance();
+ DataResult systemSet = cm.ssmSystemListForChannels(user, null);
int successes = 0;
- Iterator systems = systemSet.getElements().iterator();
+ Iterator systems = systemSet.iterator();
//go through each system in the set
while (systems.hasNext()) {
- Long sid = ((RhnSetElement)systems.next()).getElement();
+ Long sid = ((ConfigSystemDto)systems.next()).getId();
Server server;
boolean hit = false;
try {
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 6db0cae..8cf1daf 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
@@ -15515,7 +15515,7 @@ any of these revisions. Are you sure you want to do this?</source>
<source>You can unsubscribe systems from the configuration channels below. The channels shown below are all of the global configuration channels to which at least one system in your system set is subscribed.</source>
</trans-unit>
<trans-unit id="unsubscribe.jsp.noChannels">
- <source>No configuration channels.</source>
+ <source>No configuration channels with subscribed systems in the current System Set!</source>
</trans-unit>
<trans-unit id="unsubscribe.jsp.systems">
<source>Systems</source>
commit fd4ef2d08d9dff304a778527a6b9cdada43c5812
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Jan 28 17:06:31 2010 +0100
539159 - offering only ssm systems with appropriate permissions for config channel subscription
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml
index d2edaad..177f872 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml
@@ -895,6 +895,7 @@ SELECT S.id, S.name
WHERE ST.label = :system_set_label
AND ST.user_id = :user_id
AND ST.element = S.id
+ AND EXISTS(SELECT 1 FROM rhnServerFeaturesView SFV WHERE SFV.server_id = ST.element AND SFV.label = 'ftr_config')
ORDER BY S.name
</query>
<elaborator params="channel_set_label, user_id">
diff --git a/java/code/src/com/redhat/rhn/frontend/action/configuration/ssm/SubscribeConfirm.java b/java/code/src/com/redhat/rhn/frontend/action/configuration/ssm/SubscribeConfirm.java
index 73eceff..4536d1a 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/configuration/ssm/SubscribeConfirm.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/configuration/ssm/SubscribeConfirm.java
@@ -23,6 +23,7 @@ import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.action.common.BadParameterException;
import com.redhat.rhn.frontend.action.configuration.ConfigChannelSetComparator;
+import com.redhat.rhn.frontend.dto.ConfigSystemDto;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnAction;
import com.redhat.rhn.frontend.struts.RhnHelper;
@@ -122,15 +123,15 @@ public class SubscribeConfirm extends RhnAction {
String position = request.getParameter(POSITION);
checkPosition(request);
- RhnSet systems = RhnSetDecl.SYSTEMS.get(user);
+ List systems = ConfigurationManager.getInstance().ssmSystemsForSubscribe(user);
RhnSet channels = RhnSetDecl.CONFIG_CHANNELS_RANKING.get(user);
//visit every server and change their subscriptions
//keep track of how many servers we have changed
int successes = 0;
- Iterator i = systems.getElements().iterator();
+ Iterator i = systems.iterator();
while (i.hasNext()) {
- Long sid = ((RhnSetElement)i.next()).getElement();
+ Long sid = ((ConfigSystemDto)i.next()).getId();
try {
Server server = SystemManager.lookupByIdAndUser(sid, user);
14 years, 2 months