Bug 861230

Summary: spacecmd does not upload binary files correctly
Product: [Community] Spacewalk Reporter: Zailo Leite <zleite>
Component: ServerAssignee: Aron Parsons <aronparsons>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satellite-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.8CC: djuran, jpazdziora, mmello
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: spacecmd-1.9.3-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-03 17:49:32 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 917805    

Description Zailo Leite 2012-09-27 17:30:10 EDT
Description of problem:

Me and the spacecmd developer fell in the same trap, apparently:

On http://spacewalk.redhat.com/documentation/api/1.7/handlers/ServerConfigHandler.html#createOrUpdatePath , there's a missing value in the path_info struct, 'binary'. It is documented in the source:

     *   #struct("path info")
     *      #prop_desc("boolean", "binary", "mark the binary content, if True,
     *      base64 encoded content is expected (only for non-directories)")
     *  #struct_end()

Without this the uploaded files are treated as text by the spacewalk server and rendered unusable.

This patchlet adds the value:

--- /0usr/lib/python2.4/site-packages/spacecmd/configchannel.py	2012-09-27 13:51:41.000000000 -0700
+++ /usr/lib/python2.4/site-packages/spacecmd/configchannel.py	2012-09-27 13:54:25.000000000 -0700
@@ -533,6 +533,7 @@
         if options.binary:
             file_info['contents_enc64'] = True
+            file_info['binary'] = True

I did a buzilla ticket for the API docs as well.

Comment 1 Jan Pazdziora 2012-10-01 03:23:06 EDT
The APIC doc bug 861225 closed as NEXTRELEASE -- the binary upload is *not* in Spacewalk 1.7.
Comment 2 Michael Mráka 2012-10-31 07:01:54 EDT
Reassigning to spacecmd maintainer.
Comment 3 Steven Hardy 2013-02-21 06:46:37 EST
Reassigning to Aron Parsons, spacecmd maintainer
Comment 4 Aron Parsons 2013-03-03 17:49:32 EST
commit e05e2f3b0afb1ffb95a6aa57815c80e9b98304b5.  Thanks Zailo.
Comment 5 Jan Pazdziora 2013-03-04 03:08:57 EST
Aron, we prefer to set the state to MODIFIED when changes were done for the bugzilla, fill the Fixed In Version (I did that now) and leave it for the release nanny to close the bugzilla when the new Spacewalk release is released.