Bug 467281 - we need a standard channel naming convention or empty channel for satellite tools
we need a standard channel naming convention or empty channel for satellite t...
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Pradeep Kilambi
wes hayutin
Depends On:
Blocks: space06 609654
  Show dependency treegraph
Reported: 2008-10-16 13:02 EDT by wes hayutin
Modified: 2010-06-30 14:53 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 609654 (view as bug list)
Last Closed: 2009-09-10 08:04:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
screenshot (232.63 KB, image/png)
2008-10-16 13:02 EDT, wes hayutin
no flags Details

  None (edit)
Description wes hayutin 2008-10-16 13:02:10 EDT
Created attachment 320579 [details]

Description of problem:

If a customer is using a base channels other than official rhel channels they will run into a problem when using our "enable config management" tool.

The satellite will look for a specific network tools channel associated with a base channel.  If the sat admin creates a child tools channel w/ anything other than what satellite is expecting.. the function will not work.

see screenshot for webui view of function
Comment 1 Jesus M. Rodriguez 2009-02-24 15:32:16 EST
What if we add another attribute to a channel that indicates it's relationship instead of using the channel labels? This would make it more flexible for other use cases which are similar.
Comment 2 Carsten Clasohm 2009-06-10 09:10:50 EDT
I encountered this problem while doing a Spacewalk 0.5 installation. The customer created a base channel from a RHEL 5.3 copy and a child channel with the label "rhel5-server-x86_64-rhn-tools".

rhnreg_ks printed this error during Kickstart installation:

An error has occurred:
Internal Server Error
See /var/log/up2date for more information

The same error was printed by rhn_check when we ran it after the reboot. The Web UI showed a couple of pending events for the system.

In /var/log/httpd/error_log, we got this:

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/server/apacheRequest.py", line 120, in call_function
    response = apply(func, params)
  File "/usr/share/rhn/server/handlers/xmlrpc/queue.py", line 283, in get
    ret = self.__getV2(action)
  File "/usr/share/rhn/server/handlers/xmlrpc/queue.py", line 89, in __getV2
    result = method(self.server_id, action['id'])
  File "/usr/share/rhn/server/action/kickstart_host.py", line 29, in add_tools_channel
  File "/usr/share/rhn/server/rhnChannel.py", line 2379, in subscribe_to_tools_channel
    raise NoToolsChannel("Base channel id %s does not have a RHN Tools channel as a child channel." % \
NoToolsChannel: Base channel id 130 does not have a RHN Tools channel as a child channel.

As a quick workaround, I patched /usr/share/rhn/server/rhnChannel.py from spacewalk-backend-server-0.5.34-1.el5:

--- /usr/share/rhn/server/rhnChannel.py.orig    2009-06-10 14:25:54.000000000 +0200
+++ /usr/share/rhn/server/rhnChannel.py 2009-06-10 14:28:15.000000000 +0200
@@ -2372,7 +2372,7 @@
     tools_channel = None
     for channel in child_channels:
         if channel.has_key('label'):
-            if channel['label'].find('rhn-tools') == 0:
+            if channel['label'].find('rhn-tools') != -1:
                 tools_channel = channel
     if tools_channel is None:

This allows the "rhn-tools" keyword to be anywhere in the label, instead of forcing it to be at the start.
Comment 3 Pradeep Kilambi 2009-07-31 13:08:05 EDT
commit 0bcf3672c1a4fd995b8bcec6fe12ea3b91eda1f8
Author: Pradeep Kilambi <pkilambi@redhat.com>
Date:   Fri Jul 31 13:05:49 2009 -0400

    467281 - Instead of checking for the start now we check if tools is in the channel label. This is not a perfect solution but at least covers few more cases. An ideal solution would be to add some kind of a relation ship between parent and child signifying that this is a tools channel for a given parent.
Comment 4 Miroslav Suchý 2009-09-10 08:04:57 EDT
Spacewalk 0.6 released

Note You need to log in before you can comment on or make changes to this bug.