Description of problem: This is a follow-up of bug 1427905 . After fixing the bug, when there is a system with the same name as other system's ID, the user is now asked to solve the problem by renaming or deleting a system and the command exits. No operations should now happen to the wrong system by accident. However, this did not solve the problem of clearly specifying the system either by ID or by name: if there are some systems where these are the same, you are prevented from making unintended operations but you are also prevented from doing anything at all: spacecmd {SSM:0}> system_list 1000010005 : 1000010006 1000010006 : 1000010005 spacecmd {SSM:0}> system_details 1000010005 WARNING: Duplicate system profile names found! WARNING: Please reference systems by ID or resolve the WARNING: underlying issue with 'system_delete' or 'system_rename' WARNING: WARNING: 1000010005 = 1000010005, 1000010006 spacecmd {SSM:0}> system_delete 1000010005 WARNING: Duplicate system profile names found! WARNING: Please reference systems by ID or resolve the WARNING: underlying issue with 'system_delete' or 'system_rename' WARNING: WARNING: 1000010005 = 1000010005, 1000010006 WARNING: No systems to delete spacecmd {SSM:0}> system_delete search:id:1000010005 WARNING: Duplicate system profile names found! WARNING: Please reference systems by ID or resolve the WARNING: underlying issue with 'system_delete' or 'system_rename' WARNING: WARNING: 1000010006 = 1000010006, 1000010005 WARNING: No systems to delete There is no way whatsoever of doing anything with these systems, even if merely deleting them. This could be solved by: 1) Either being able to specify which I am using - ID or name. E.g.: system_details --id 1000010005 2) "search:" queries returning a set of system IDs and other commands taking their results directly (not evaluating them again). Now I suppose it goes like this: "search:id:1000010005" -> 1000010006 -> [result of search being used by the call] -> "Systems with name or ID 1000010006" -> Two possible systems again! Also, possibility of using system ID is still not documented in commands' help.
system ID takes precedence over system name as it's unique spacewalk.git(master): 6d4f495564cbdf5489daf76f60b6c6bbb74af2af
Description is strange, but I think that problem can be following scenario: 1) register 2 system with same name "client-rhel7" 2) system_list client-rhel7 : 1000010005 client-rhel7 : 1000010006 3) system_delete search:id:1000010005 WARNING: Duplicate system profile names found! WARNING: Please reference systems by ID or resolve the WARNING: underlying issue with 'system_delete' or 'system_rename' WARNING: WARNING: client = 1000010005, 1000010006 WARNING: No systems to delete 4) And: >> system_delete search:name:client WARNING: Duplicate system profile names found! WARNING: Please reference systems by ID or resolve the WARNING: underlying issue with 'system_delete' or 'system_rename' WARNING: WARNING: client = 1000010005, 1000010006 Profile System ID ------------------------ --------- client_01/12/18-09-37-10 1000010004 client_01/12/18-09-36-41 1000010003 client_01/10/18-11-04-31 1000010002
spacewalk.git(master): fccb47f09697421373f2ee3371573cf2ed44d4c9
Verified with spacecmd-2.5.0-18.el6sat.noarch
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0274