Bug 1373378

Summary: Applying errata RHBA-2016:1645 causing different behaviour of applying custom values on systems
Product: Red Hat Satellite 5 Reporter: Steffen Froemer <sfroemer>
Component: ClientAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED ERRATA QA Contact: Radovan Drazny <rdrazny>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 570CC: rdrazny, tlestach
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacecmd-2.5.0-15-sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-13 07:58:38 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: 1450111, 1450940    

Description Steffen Froemer 2016-09-06 07:00:46 UTC
Description of problem:
After applying errata RHBA-2016:1645, the behaviour of applying custom_values with spaces to a system with spacecmd, will not work as expected. Only the first part of the value will be attached to the system.

Version-Release number of selected component (if applicable):
spacecmd-2.3.0-5.el6sat

How reproducible:


Steps to Reproduce:
1. #: spacecmd custominfo_createkey SAMPLE_VALUE "sample description"
2. #: spacecmd system_updatecustomvalue SAMPLE_VALUE "one two three" system.example.com


Actual results:
#: spacecmd system_listcustomvalues system.example.com
INFO: Connected to https://localhost/rpc/api as admin
SAMPLE_VALUE = one

Expected results:
#: spacecmd system_listcustomvalues system.example.com
INFO: Connected to https://localhost/rpc/api as admin
SAMPLE_VALUE = one two three

Additional info:
This behavior was raised by BZ#1315060 (https://bugzilla.redhat.com/show_bug.cgi?id=1315060)

Comment 1 Tomáš Kašpárek 2017-10-04 12:04:30 UTC
Actually every call which uses quotes in order to pass multi-word parameters into spacecmd is broken, e.g. system_addnote.

Comment 2 Tomáš Kašpárek 2017-10-05 13:57:36 UTC
spacewalk.git(master): 4d71d82eaa4b15bdae8e9718d169de832fabd84e

Comment 5 Radovan Drazny 2017-11-20 09:14:23 UTC
Reproduced on spacecmd-2.5.0-14.el6sat using the reproducer from the initial report. The bug is valid only for the "spacecmd command" call directly from system shell. Running a command from spacecmd shell works as expected.

On spacecmd-2.5.0-16.el6sat:

$ spacecmd system_updatecustomvalue SAMPLE_VALUE "four        five      six   seven eight"  clien7.testing.mylocal

$ spacecmd system_listcustomvalues clien7.testing.mylocal 
INFO: Connected to https://satellite.server.com/rpc/api as admin
SAMPLE_VALUE = four     five      six   seven eight

Beside spaces, I have tested inserting tabs (Ctrl+V Ctrl+I) and newlines (Ctrl-V Ctrl+J). All were correctly inserted into custom value field.

VERIFIED

Comment 8 errata-xmlrpc 2017-12-13 07:58:38 UTC
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-2017:3445