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 <satqe-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.8CC: djuran, jpazdziora, mmello
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacecmd-1.9.3-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-03 22:49:32 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: 917805    

Description Zailo Leite 2012-09-27 21:30:10 UTC
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.

Z

Comment 1 Jan Pazdziora 2012-10-01 07:23:06 UTC
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 11:01:54 UTC
Reassigning to spacecmd maintainer.

Comment 3 Steven Hardy 2013-02-21 11:46:37 UTC
Reassigning to Aron Parsons, spacecmd maintainer

Comment 4 Aron Parsons 2013-03-03 22:49:32 UTC
commit e05e2f3b0afb1ffb95a6aa57815c80e9b98304b5.  Thanks Zailo.

Comment 5 Jan Pazdziora 2013-03-04 08:08:57 UTC
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.