Bug 147895

Summary: Space in Config File Deploy Path Gets Lost
Product: Red Hat Satellite 5 Reporter: Robert Spier <rspier>
Component: Configuration ManagementAssignee: Todd Sanders <tsanders>
Status: CLOSED WONTFIX QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: stephan.duehr
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-05 22:49:55 UTC Type: ---
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: 462714    

Description Robert Spier 2005-02-12 05:13:45 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a6)
Gecko/20041230

Description of problem:
It is possible to create config files that are undeployable, and
indistinguishable from other config files in the web UI and client
scripts.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Upload a new config file
2. Set the deploy path to have trailing whitespace
3. finish the upload procedure.
4. attempt to rhncfg-client get the file (with and without trailing
whitespace and quotes)
    

Actual Results:  no file is deployed.

Expected Results:  should be able to deploy the file, especially with
rhncfg-client get "foo ".  Or, the web UI should trim the trailing
whitespace.


Additional info:
It's possible to upload another file _without_ the space, and they
look identical in the web UI.

Comment 2 Red Hat Bugzilla 2007-05-03 05:26:56 UTC
User wregglej's account has been closed

Comment 4 Clifford Perry 2011-01-05 22:49:55 UTC
The RHN Satellite 4.x and RHN Proxy 4.x products have reached their end of
life. Please see:

Satellite 4 EOL Errata
 - https://rhn.redhat.com/errata/RHSA-2011-0001.html

RHN Proxy 4 EOL Errata
 - https://rhn.redhat.com/errata/RHSA-2011-0002.html

This bugzilla was reported for an unspecified version of the product, but was created prior to the release of 5.x - as such we assume this bug was reported for the 4.x version of the product - which is no longer supported. 

https://access.redhat.com/support/policy/updates/satellite/
RHN Satellite and Proxy Server 5
General availability: 	June 26, 2007

We are closing this bugzilla out. If you feel this bug report should be
reviewed again since it is valid for a currently supported product version,
then please feel free to re-open this bug report. 

Regards,
Clifford

Comment 5 Stephan Dühr 2011-04-28 09:16:59 UTC
This problem still exists in Satellite 5.4
It is possible to create a config file with trailing space in Web GUI.
Although this is usually accidentally by a user doing cut and paste, but anyway it does not only result in config file deployment problems but also causes Errors using API call configchannel.lookupFileInfo with results from configchannel.listFiles

This is reproducible by creating a config file with a trailing blank in a config channel. Then using this (Python code):

>>> import xmlrpclib
>>> client = xmlrpclib.Server(SATELLITE_URL, verbose=0)
>>> session = client.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD)
>>> 
>>> label = 'cfg-corp-dev-rhel-server-5'
>>> files = client.configchannel.listFiles(session, label)
>>> files
[{'path': '/etc/syslog.conf ', 'last_modified': <DateTime u'20110428T10:42:17' at 2ad4477c2bd8>, 'type': 'file'}]
>>> filePaths = map(lambda f: f['path'], files)
>>> filePaths
['/etc/syslog.conf ']
>>> fileInfos = client.configchannel.lookupFileInfo(session, label, filePaths)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1286, in _parse_response
    return u.close()
  File "/usr/lib64/python2.4/xmlrpclib.py", line 744, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -1: 'redstone.xmlrpc.XmlRpcFault: unhandled internal exception: null'>

I don't know any case where a trailing space in a config file name could be useful or necesary. The Web GUI should trim trailing whitespace from config file names.

Comment 6 Stephan Dühr 2011-04-28 09:30:34 UTC
I've submitted a new BZ for Satellite Version 540:
https://bugzilla.redhat.com/show_bug.cgi?id=700380