Bug 1576006

Summary: Server is not subscribed to parent of channel
Product: [Community] Spacewalk Reporter: vinzenz.meier
Component: ClientsAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.8CC: krzysztof.pawlowski
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-15 07:59:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1653216    

Description vinzenz.meier 2018-05-08 14:18:55 UTC
Description of problem:
After upgrading to spacewalk 2.8, "rhn-channel -a -c xxx' resulted with 
"Server is not subscribed to parent of channel xxx"


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. rhn-channel -a -c xxx
2.
3.

Actual results:
"Server is not subscribed to parent of channel xxx"


Expected results:
system subscribes to channel

Additional info:
adding the "where" clause to backend/server/rhnChannel.py fixes the problem

_query_server_parent_channel = rhnSQL.Statement("""
select pc.id, pc.label
  from rhnChannel c
  join rhnServerChannel sc on c.parent_channel = sc.channel_id
  join rhnChannel pc on c.parent_channel = pc.id
where sc.server_id = :sid
 group by pc.id, pc.label
""")

using the spacewalk-client 2.7 or 2.8 made no difference.

Comment 1 vinzenz.meier 2018-05-08 14:19:51 UTC
Altering the child channel trough the web interface worked fine without altering the rhnChannel.py

Comment 2 Krzysztof Pawłowski 2018-05-24 07:10:39 UTC
Same problem for us and the same change in backend/server/rhnChannel.py fixed the problem.

Comment 3 Tomáš Kašpárek 2018-05-28 09:13:03 UTC
spacewalk.git(master): f3237461126a72c77395ffea1706059229c66c73

Comment 4 Michael Mráka 2018-11-26 09:43:58 UTC
Move Spacewalk 2.9 bugs ON_QA.

Comment 5 Michael Mráka 2019-01-15 07:59:25 UTC
Spacewalk 2.9 has been released.
https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes29