Bug 700380 - trailing space in config file name causing deployment problem and API error
Summary: trailing space in config file name causing deployment problem and API error
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Configuration Management
Version: 540
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 462714
TreeView+ depends on / blocked
 
Reported: 2011-04-28 09:29 UTC by Stephan Dühr
Modified: 2015-05-29 20:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-29 20:11:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Stephan Dühr 2011-04-28 09:29:47 UTC
Description of problem:
It is possible to create config files that have a trailing space in their name. This causes problems with config file deployment and results in an error using the API call configchannel.lookupFileInfo

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


How reproducible:
by creating a config file with a trailing blank in a config channel

Steps to Reproduce:
1. create a config file with a trailing blank in a config channel
2. use the following API calls (Python)

>>> client = xmlrpclib.Server(SATELLITE_URL, verbose=0)
>>> global session
>>> 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)
  
Actual results:

>>> 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'>

Expected results:

This is usually caused accidentally by a user doing cut and paste, but anyway the Web GUI should trim trailing whitespace from config file names. I don't know any case where a trailing space in a config file name could be useful or necesary.

Additional info:


Note You need to log in before you can comment on or make changes to this bug.