Bug 1014767

Summary: text configuration file interpreted as binary when uploaded through spacecmd
Product: [Community] Spacewalk Reporter: helfman
Component: ClientsAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.8   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-17 08:41:33 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:
Bug Depends On:    
Bug Blocks: 1119298    

Description helfman 2013-10-02 17:48:34 UTC
Description of problem:
If a configuration file is uploaded through spacecmd, it is interpreted as binary.
When changing it to text in the webui, and submitting this change. It will be reset to binary straight away.

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

How reproducible:
Upload a text file through spacecmd
Attempt to change to 'text' in the webui for the configuration file, assuming it is noted as 'binary'

Expected results:
File should be 'text' when changed from 'binary'

Comment 1 Stephen Herr 2013-10-02 18:43:07 UTC
A workaround for this issue is to change anything else (like the file permissions for example) about the file when you try to updated and set the file to 'text'. The update will then take, and you can then set the file permissions (or whatever) back the way it was before.

Comment 2 Stephen Herr 2013-10-02 18:49:09 UTC
Except when I do that it zeros out the content. :(
Don't try the workaround in comment 1 yet.

Comment 3 Stephen Herr 2013-10-02 20:17:18 UTC
The "zeroing out the data" bug has been filed as bug 1014800. I think there's a good bit of re-architecting that needs to be done to make this all work right.

Comment 4 helfman 2013-10-04 02:22:01 UTC
Correction to this:

Expectation is that the file should be interpreted correctly as text when uploaded, and it should not require an additional step (even if that step at the moment doesn't work).

Comment 5 Milan Zázrivec 2014-02-28 11:33:35 UTC
This is now fixed with the following commits:

    48248b7818e8b09bf25c6407c1d285baa1cca857
    6daf599d669ec8b2f835991f0e30ac341e7f1d41

and in the following spacecmd build:

    spacecmd-2.1.25-1

Comment 6 Milan Zázrivec 2014-07-17 08:41:33 UTC
Spacewalk 2.2 has been released:

    https://fedorahosted.org/spacewalk/wiki/ReleaseNotes22