Bug 1549546

Summary: spacewalk-channel does not allow adding a parent/base channel to system with no subscriptions.
Product: [Community] Spacewalk Reporter: Laurence Rochfort <laurence.rochfort>
Component: ServerAssignee: Jiří Dostál <jdostal>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.7CC: jdostal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-20 12:31:50 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: 1564160    

Description Laurence Rochfort 2018-02-27 12:04:40 UTC
Description of problem:
When running spacewalk-channel -a -c <PARENT CHANNEL> on a system with no channel subscriptions, it's not possible to add a parent/base channel. The error below is shown.

This is because there's a check to ensure the channel being added is a child of the system's parent channel, but the check takes place even if you're supplying a parent channel and if the system is not subscribed to any channels.

Error message: 

Error communicating with server. The message was:

Error Message:
    Parent of channel <PARENT CHANNEL> is not subscribed to server
Error Class Code: 32
Error Class Info: Channel error

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

How reproducible:
spacewalk-channel -a -c <PARENT CHANNEL> on a system with no channel subscriptions

Actual results:
Error as above. System not subscribed.

Expected results:
System should be subscribed.

Comment 1 Jiří Dostál 2018-03-26 11:57:23 UTC
spacewalk ffd0a4db99f9e588d1498c6fea7c2546e693e71c

Comment 2 Jiří Dostál 2018-03-26 12:16:44 UTC
Moving ON_QA

Comment 3 Jiří Dostál 2018-04-20 12:31:50 UTC
Spacewalk 2.8 has been released.
https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes28