Bug 1014800

Summary: changing a config file's type from 'text' to 'binary' destroys the content
Product: [Community] Spacewalk Reporter: Stephen Herr <sherr>
Component: WebUIAssignee: Eric Herget <eherget>
Status: CLOSED WORKSFORME QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.0CC: eherget
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-29 20:34:20 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: 1484117    

Description Stephen Herr 2013-10-02 19:56:20 UTC
Description of problem:
Changing a config file's type from 'text' to 'binary' in the webui causes the newly created revision to have 0's for the content.

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

How reproducible:
always

Steps to Reproduce:
1. have a text config file in the spacewalk ui
2. change its type to 'binary'
3. download the file and look at the results

Actual results:
The original content has been replace with \0

Expected results:
The original content still exists.

Comment 1 Eric Herget 2016-06-22 21:01:33 UTC
I have attempted to reproduce this issue but I have not been successful.  I'm running Spacewalk 2.5 and setting a text config file to 'binary' type did not alter the content when I download the file from the Spacewalk UI, nor when I download it with `rhncfg-manager get ...` command.

Comment 2 Eric Herget 2016-06-29 20:34:20 UTC
I have not been able to reproduce this in Spacewalk 2.5 on PostgreSQL and Oracle.  I have tested download via:
- web UI download
- calling `rhncfg-manager get ...` on the client
- homegrown script using XMLRPC API

In addition, I searched through git history and was unable to find any commits that appear to have fixed such an issue, but did find a ticket (1162862) opened a year after this issue was opened that reported changing a config file type between binary and text was failing.  For that bug to have been opened and then resolved, this instant bug must have been resolved.

I am closing this bug as I am unable to reproduce it in any of the possible download mechanisms.  If someone is able to reproduce this issue in any current release, please reopen.

Comment 3 Eric Herget 2017-09-28 18:11:55 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.