Bug 190602
Summary: | rhnpush errors for --list option when run without --channel option | ||
---|---|---|---|
Product: | Red Hat Satellite 5 | Reporter: | Pradeep Kilambi <pkilambi> |
Component: | Other | Assignee: | Pradeep Kilambi <pkilambi> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | wes hayutin <whayutin> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | unspecified | CC: | wregglej |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | rhn500h | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-03-24 16:44:49 UTC | Type: | --- |
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: | 166615 |
Description
Pradeep Kilambi
2006-05-03 20:36:38 UTC
yeah, the opt-parsing on that seems quite screwed up. moving to rhn420-must when a channel option is specified rhnpush_confmanager creates the options.channel with something like this: self.defaultconfig.channel = map(string.strip, string.split(self.defaultconfig.channel, ',')) that is if --channel=A,B we get ['A', 'B'] but if no channel option is specified we get ['']. which is a list of size 1. hence the check "if not options.channel" fails and thinks that there is a channel even though there is not and continues the call to the server. This is true for --newest flag a well. [root@prad pkilambi]# rhnpush --server=rlx-0-20.rhndev.redhat.com --username=admin --password=dog8code --newest Error Message: You are not allowed to manage channel , or that channel does not exist Error Class Code: 32 Error Class Info: Channel error Explanation: An error has occurred while processing your request. If this problem persists please enter a bug report at bugzilla.redhat.com. If you choose to submit the bug report, please be sure to include details of what you were trying to do when this error occurred and details on how to reproduce this problem. where --channel is mandatory for --newest. There is a check for the channel option but it fails due to the way we return the empty channel list of size 1. fix is to assign a null array to the option.channel when no --channel is specified. if not self.defaultconfig.channel: #if no channel then make it null array instead of #an empty string array from of size 1 [''] . self.defaultconfig.channel = [] else: self.defaultconfig.channel = map(string.strip, string.split(self.defaultconfig.channel, ',')) That way it behaves as expected: [pkilambi@prad pkilambi]# rhnpush --server=rlx-0-20.rhndev.redhat.com --username=admin --password=dog8code --list Must specify a channel for --list to list channels [pkilambi@prad pkilambi]# rhnpush --server=rlx-0-20.rhndev.redhat.com --username=admin --password=dog8code --newest Must specify a channel for --newest to work the errors for the above look good.. however I'm not sure about the following... [root@whayutin ~]# PYTHONPATH='/usr/share/rhn' python /usr/bin/rhnpush --server=fjs-0.06.rhndev.redhat.com --username=whayutin --password=redhat --newest -crhel-i386-es-4 ERROR: unhandled exception occurred: ((-2, 'Name or service not known')). [root@whayutin ~]# PYTHONPATH='/usr/share/rhn' python /usr/bin/rhnpush --server=fjs-0.06.rhndev.redhat.com --username=whayutin --password=redhat --list -crhel-i386-es-4 ERROR: unhandled exception occurred: ((-2, 'Name or service not known')). [root@whayutin ~]# rpm -qa | grep rhnpush rhnpush-5.0.0-3 yep we need a better error message here, although the problem here is your server name is unresolvable, try fjs-0-06 instead of fjs-0.06 oh man... thanks.. Ok.. got this working.. [whayutin@whayutin tmp]$ PYTHONPATH='/usr/share/rhn' python /usr/bin/rhnpush --server=fjs-0-06.rhndev.redhat.com --username=whayutin --password=redhat -cwesleyd VMware-console-3.1.0-9089.i386.rpm --nosig the above problem w/ the error is fixed.. closing the bug... I'll open a new bug to track "Name or service not known" error message so its more clear... low priority I'm sure.. thanks need a working satellite in stage to verify this.. but we're having cert problems. Closed in rhn500h Release. Closed in rhn500h release. Closed in rhn500h Release. Closed in rhn500h Release. |