Hello, It looks like that the following query is not actually doing what it should do:
config_queries.xml: "ssm_channels_for_subscribe_choose" How to see that: Put two systems in the SSM where only one of those is subscribed to a certain config channel. This config channel should appear in the SSM as an option to subscribe to, because not ALL of the systems in SSM are already subscribed. What happens is, that as soon as one of the systems in SSM is subscribed to a certain channel, this channel does not appear as an available config channel in SSM anymore. I found that the attached patch fixes the issue: While replacing "=" with "is" is obviously correct, I also found, that as soon as SCC.server_id is null (in the last subquery) the SCC.config_channel_id is also null. Therefore the proposed fix. Further, since the next query in that file is just the negation of this one, it would probably also need a fix. Thanks, Johannes -- SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
>From 8493f940c7b6fb27e4f25f211865890fcf71f0a3 Mon Sep 17 00:00:00 2001 From: Johannes Renner <jren...@suse.de> Date: Tue, 29 Nov 2011 16:17:34 +0100 Subject: [PATCH] Fix query to determine config channels in SSM --- .../common/db/datasource/xml/config_queries.xml | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) 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 1484317..d11bd22 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 @@ -2096,8 +2096,8 @@ SELECT CC.id, CC.name FROM rhnSet RS LEFT OUTER JOIN rhnServerConfigChannel SCC ON RS.element = SCC.server_id WHERE RS.label = 'system_list' - AND SCC.config_channel_id = XXX.config_channel_id - AND SCC.server_id = null) ) + AND SCC.config_channel_id is null + AND SCC.server_id is null) ) ORDER BY UPPER(CC.name) </query> <elaborator name="ssm_channel_elab" /> @@ -2126,7 +2126,7 @@ SELECT CC.id, CC.name FROM rhnSet RS LEFT OUTER JOIN rhnServerConfigChannel SCC ON RS.element = SCC.server_id WHERE RS.label = 'system_list' - AND SCC.config_channel_id = XXX.config_channel_id + AND SCC.config_channel_id is null AND SCC.server_id is null) ) ORDER BY UPPER(CC.name) </query> -- 1.7.3.4
_______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel