Bug 1427938

Summary: spacecmd - problem when system name is a number
Product: Red Hat Satellite 5 Reporter: Lukáš Hellebrandt <lhellebr>
Component: ServerAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED CURRENTRELEASE QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacecmd-2.5.0-8-sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-21 12:12:47 UTC Type: Bug
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: 1358815    

Description Lukáš Hellebrandt 2017-03-01 14:48:21 UTC
Description of problem:
Some spacecmd calls that support specifying a system both by ID and Name can not successfully find a system when its name is a number. This is related to bz 1427905 but is different because the system's name does not need to be an existing system's ID - it merely needs to be a number.

How reproducible:
Deterministic

Steps to Reproduce:
# system_installpackage 123 gvim
Start Time [now]: 
WARNING: Can't find system ID for 123

Actual results:
The call has not been applied to system with name "123" 

Expected results:
It should have been

Comment 1 Tomáš Kašpárek 2017-03-02 12:39:14 UTC
*** Bug 1427905 has been marked as a duplicate of this bug. ***

Comment 2 Tomáš Kašpárek 2017-03-02 13:21:11 UTC
spacewalk.git(master): a242a6133359f9eb5b100d3df132ea40d736656b

Comment 3 Tomáš Kašpárek 2017-03-02 13:30:11 UTC
please ignore comment#2 correct commit is:
spacewalk.git(master): 610e73d45f052dc0cabd5881ef0f4fb1d969bf24

Comment 6 Lukáš Hellebrandt 2017-03-06 15:25:04 UTC
Verified with spacecmd-2.5.0-9.el6sat.noarch.


spacecmd {SSM:0}> system_installpackage 123 rhnmd
Start Time [now]: 
123:
rhnmd-5.3.18-2.el6sat.noarch  

Start Time: 20170306T10:22:20

Install these packages [y/N]: y
INFO: Scheduled 1 system(s)