Bug 698579 - "spacewalk-channel" exit code is always 0 even when it fails.
Summary: "spacewalk-channel" exit code is always 0 even when it fails.
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 541
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 462714
TreeView+ depends on / blocked
 
Reported: 2011-04-21 09:48 UTC by Dimitar Yordanov
Modified: 2014-07-04 13:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-04 13:28:36 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Dimitar Yordanov 2011-04-21 09:48:46 UTC
Description of problem:
"spacewalk-channel" exit code is always 0 even when it fails.

Version-Release number of selected component (if applicable):
rhn-setup-0.4.20-46.el5

How reproducible:
Always

Steps to Reproduce:
1.Get RHEL5 system
2.Register to Satellite
3.spacewalk-channel --list
rhel-i386-server-5
4. Try to unsubscribe from a channel that it not in the list above.
spacewalk-channel -r -u ${USER} -p ${PASS} -c rhn-tools-rhel-i386-server-6
6. No error,info or  warning message.
5. echo $?  
Actual results:
0

Expected results:
1, 127 ... etc.

Additional info:
Many other inappropriate error messages.

Examples:
#### In case -a (-r) parameter is omitted. ###
[root@dell~]# spacewalk-channel -u admin -p admin -c rhn-tools-rhel-i386-server-6
Traceback (most recent call last):
  File "/usr/sbin/spacewalk-channel", line 92, in ?
    main()
  File "/usr/sbin/spacewalk-channel", line 86, in main
    s = rhnserver.RhnServer()
NameError: global name 'rhnserver' is not defined

The Error message is misleading.


#### Execute without params ####

[root@dell ~]# spacewalk-channel
ERROR: username is required

Does not say much as well. ( --list option does not need username and password)

Comment 1 Tomas Lestach 2011-10-05 14:27:33 UTC
Return code of up2date.unsubscribeChannels backend xmlrpc API is a matter of the RHN Satellite server.

Changing product of the BZ to RHN Satellite.


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