Bug 565522 - spacewalk-utils, traceback, --help not well described
Summary: spacewalk-utils, traceback, --help not well described
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 0.9
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space09
TreeView+ depends on / blocked
 
Reported: 2010-02-15 15:01 UTC by Petr Sklenar
Modified: 2010-05-05 14:57 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-05 14:57:00 UTC
Embargoed:


Attachments (Terms of Use)

Description Petr Sklenar 2010-02-15 15:01:17 UTC
Description of problem:
There is not so much description in help for package spacewalk-utils. And I often could see traceback.


Version-Release number of selected component (if applicable):
spacewalk-utils-0.9.1-1.fc12.noarch

How reproducible:
always

Steps to Reproduce:
A]
1.[root@dell-pe800-01 satellite-api-testing-automation]# spacewalk-common-channels centos5-addons
centos5-i386-addons
   name = CentOS 5 Addons (i386)
   checksum = sha1
   summary = CentOS 5 Addons (i386)
   activationkey = centos5-i386-addons
   label = centos5-i386-addons
   arch = i386
   base_channel = centos5-i386
centos5-x86_64-addons
   name = CentOS 5 Addons (x86_64)
   checksum = sha1
   summary = CentOS 5 Addons (x86_64)
   activationkey = centos5-x86_64-addons
   label = centos5-x86_64-addons
   arch = x86_64
   base_channel = centos5-x86_64
Traceback (most recent call last):
  File "/usr/bin/spacewalk-common-channels", line 168, in <module>
    client, key = connect(options.user, options.password, options.server)
  File "/usr/bin/spacewalk-common-channels", line 60, in connect
    key      = client.auth.login(user, password)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 2950: 'redstone.xmlrpc.XmlRpcFault: Either the password or username is incorrect.'>

2. # this works well:  spacewalk-common-channels centos5-addons -u admin -p admin 
- username and password are obligatory so it should be in '--help' or it should be somehow checked

B] option --keys, traceback
It seems it always create actkey with some default name even without option --keys or is it only for name of this act key ? don't know from "--help"

these two command seem working same, no differents if i use "-k":
spacewalk-common-channels -u admin -p admin x86_64 -k key-1 -v epel5
spacewalk-common-channels -u admin -p admin x86_64 -v epel5


+ traceback:

# spacewalk-common-channels -u admin -p admin -v -k key-1 fedora11
   name = Fedora 11 (i386)
   checksum = sha256
   summary = Fedora 11 (i386)
   activationkey = fedora11-i386
   label = fedora11-i386
   arch = i386
   base_channel = 
fedora11-sparc
   name = Fedora 11 (sparc)
   checksum = sha256
   summary = Fedora 11 (sparc)
   activationkey = fedora11-sparc
   label = fedora11-sparc
   arch = sparc
   base_channel = 
fedora11-ppc
   name = Fedora 11 (ppc)
   checksum = sha256
   summary = Fedora 11 (ppc)
   activationkey = fedora11-ppc
   label = fedora11-ppc
   arch = ppc
   base_channel = 
fedora11-x86_64
   name = Fedora 11 (x86_64)
   checksum = sha256
   summary = Fedora 11 (x86_64)
   activationkey = fedora11-x86_64
   label = fedora11-x86_64
   arch = x86_64
   base_channel = 
fedora11-s390x
   name = Fedora 11 (s390x)
   checksum = sha256
   summary = Fedora 11 (s390x)
   activationkey = fedora11-s390x
   label = fedora11-s390x
   arch = s390x
   base_channel = 
Connecting to http://localhost/rpc/api
Base channel 'Fedora 11 (i386)' - creating...
* Activation key 'fedora11-i386' - creating...
Traceback (most recent call last):
  File "/usr/bin/spacewalk-common-channels", line 205, in <module>
    base_info['label'], int(options.keys), [], False)
ValueError: invalid literal for int() with base 10: 'key-1'
  

C] RFE: if there is option to create activation key which is organization's universal default it would be nice :) 


Actual results:
not well described, traceback

Expected results:
better --help, no traceback

Additional info:
it would be also useful if there is some "example use" in --help

Comment 1 Michael Mráka 2010-02-15 21:51:55 UTC
a) does this sound better?
$ ./spacewalk-common-channels -c spacewalk-common-channels.ini  -v -u user  -p wrongpassword -s ibm-x3250m2-02.rhts.eng.bos.redhat.com -k 1234 '*' 
Connecting to http://ibm-x3250m2-02.rhts.eng.bos.redhat.com/rpc/api
Either the password or username is incorrect.
$ echo $?
2

Pushed as
commit 4227ec9f737af7950445a62bb3bf95c584e74478
    report user/password mismatch instead of traceback


b) debug comments have been removed.
as for -k -- I reworded help option to hopefully avoid such kind of misunderstanding; this is the key usage limit (number) not the key name

commit 2203d97374d2d765f2604700d476dbe1cee7e508
    better explanation of key limit number

Comment 2 Michael Mráka 2010-02-15 22:38:42 UTC
6f7a1780d2249587c337277b6de0858b01c2474d
    added examples to --help output

Examples:

Create Fedora 12 channel, its child channels and activation key limited to 10 servers:
    %(prog)s -u admin -p pass -k 10 'fedora12*'

Create Centos 5 with child channels only on x86_64:
    %(prog)s -u admin -p pass -a x86_64 'centos5*'

Create only Centos 4 base channels for intel archs:
    %(prog)s -u admin -p pass -a i386,x86_64 'centos4'

Create Spacewalk client child channel for every (suitable) defined base channel:
    %(prog)s -u admin -p pass 'spacewalk-client*'

Create everything as well as unlimited activation key for every channel:
    %(prog)s -u admin -p pass -k unlimited '*'

Comment 3 Michael Mráka 2010-04-14 08:56:47 UTC
Has been fixed in nightly repo, package spacewalk-utils-0.9.2-1.

Comment 4 Miroslav Suchý 2010-05-05 14:57:00 UTC
This bug has been fixed in Spacewalk 1.0.
Closing.


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