Description of problem: We re-provision hosts using cobbler/kickstart, in doing so we can end up with systems with duplicate names. Because expand_systems (spacecmd/src/lib/misc.py) generally expands searches to system names rather than IDs even when we use "search:id:<ID>" we keep running into: """ WARNING: Duplicate system profile names found WARNING: You can delete duplicates with 'system_delete' WARNING: <REDACTED>.redhat.com = 1000027323, 1000012783 WARNING: Duplicate system profile names found WARNING: You can delete duplicates with 'system_delete' WARNING: <REDACTED>.redhat.com = 1000027323, 1000012783 """ However, if we explicitly pass a system ID, then manipulate_child_channels (spacecmd/src/lib/system.py) errors because it sees an integer rather than a string when trying to print the list of systems that will be updated...: 97 print '\n'.join(sorted(systems)) """ ERROR: sequence item 0: expected string, int found Traceback (most recent call last): File "/usr/bin/spacecmd", line 127, in ? shell.onecmd(shell.precmd(' '.join(args))) File "/usr/lib64/python2.4/cmd.py", line 219, in onecmd return func(arg) File "/usr/lib/python2.4/site-packages/spacecmd/system.py", line 1804, in do_system_addchildchannels self.manipulate_child_channels(args) File "/usr/lib/python2.4/site-packages/spacecmd/system.py", line 96, in manipulate_child_channels print '\n'.join(sorted(systems)) TypeError: sequence item 0: expected string, int found """ IMHO there are two bugs here 1) expand_systems is passing back a non-unique field (name) rather than a unique field (id) - not sure if you're likely to do anything about this one, happy to generate a second bug. 2) the use of a simple join(sorted(systems)) when an integer is perfectly valid - hopefully this one might get fixed... Version-Release number of selected component (if applicable): spacecmd-1.9.4-1.el6.noarch How reproducible: Every #?!@ing time Steps to Reproduce: 1. re-add a host (eg re run rhnreg_ks) so that you have two hosts with the same name 2. run "spacecmd system_addchildchannels <id> <some child channel>" Actual results: EXCEPTION Expected results: childchannel added Additional info: Same lazy join is found in various places src/lib/softwarechannel.py: print '\n'.join(sorted(systems)) src/lib/report.py: print '\n'.join(sorted(systems)) src/lib/system.py: print '\n'.join(sorted(systems)) src/lib/system.py: print '\n'.join(sorted(systems)) src/lib/system.py: print '\n'.join(sorted(systems)) src/lib/system.py: print '\n'.join(sorted(systems)) src/lib/group.py: print '\n'.join(sorted(systems)) src/lib/group.py: print '\n'.join(sorted(systems)) src/lib/group.py: print '\n'.join(sorted(systems))
Problem 1 -- cannot reproduce with spacecmd-2.1.17-1 Problem 2 fixed in spacewalk.git master: 65efaf38345ccb2dd51b122fb1653c071973eccf
Switching MODIFIED Spacewalk bugs to ON_QA before 2.1 release.
Spacewalk 2.1 has been released. https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21