Bug 1004804

Summary: "rhncfg-manager add" fails on file with 000 permissions
Product: Red Hat Satellite 5 Reporter: Matej Kollar <mkollar>
Component: ServerAssignee: Michael Mráka <mmraka>
Status: CLOSED CURRENTRELEASE QA Contact: Dimitar Yordanov <dyordano>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 560CC: cperry, dyordano
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-backend-2.1.17-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-13 09:54:22 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: 843041, 1127641    

Description Matej Kollar 2013-09-05 14:05:00 UTC
Description of problem:

  Running "rhncfg-manager add" ends with ISE (500) when trying
  to add file with permissions 0.

Version-Release number of selected component: rhncfg-management-5.10.55-2.el6sat

How reproducible: always/deterministic

Steps to Reproduce:
  1. echo data > /tmp/somefile
  2. chmod 000 /tmp/somefile
  4. rhncfg-manager create-channel test-x
  3. rhncfg-manager add -c test-x /tmp/somefile

Actual results:

  Application ends with

> Pushing to channel test-x:
> XML-RPC call error: <ProtocolError for fqdn.example.com /CONFIG-MANAGEMENT-TOOL: 500 Internal Server Error>

  In server's httpd error log

> [*** *** ** **:**:** ****] [error] Exception Handler Information
> [*** *** ** **:**:** ****] [error] Traceback (most recent call last):
> [*** *** ** **:**:** ****] [error]   File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py", line 123, in call_function
> [*** *** ** **:**:** ****] [error]     response = apply(func, params)
> [*** *** ** **:**:** ****] [error]   File "/usr/share/rhn/server/handlers/config_mgmt/rhn_config_management.py", line 374, in management_put_file
> [*** *** ** **:**:** ****] [error]     result = self.push_file(conf_channel_id, dict)
> [*** *** ** **:**:** ****] [error]   File "/usr/lib/python2.6/site-packages/spacewalk/server/configFilesHandler.py", line 231, in push_file
> [*** *** ** **:**:** ****] [error]     result = self._push_file(config_channel_id, file)
> [*** *** ** **:**:** ****] [error]   File "/usr/lib/python2.6/site-packages/spacewalk/server/configFilesHandler.py", line 177, in _push_file
> [*** *** ** **:**:** ****] [error]     raise ConfigFileMissingInfoError(file)
> [*** *** ** **:**:** ****] [error] ConfigFileMissingInfoError

Expected results:

  File is pushed.

Additional info:

Comment 1 Matej Kollar 2013-09-05 15:01:46 UTC
Issue was caused by invalid test for presence of file mode information, not taking into account fact that in python bool(0) is False, but 0 is valid mode.

spacewalk.git 9d7a41e4279ac80a2c2fd620b1540d2a62285be0

Comment 2 psmatana 2014-11-22 14:54:31 UTC
This bug is a little bit tricky because the problem is not on the client side but on the server side. So I am testing against spacewalk-backend package which is on server side but verification and reproduction I am doing on client.

Verification.

spacewalk-backend-2.3.3-20.el6sat

In the step 4 from reproducer in Description application exits with this correct message:

Using server name elisha.usersys.redhat.com
Pushing to channel test-x:
Local file /tmp/somefile -> remote file /tmp/somefile

Reproduced.

spacewalk-backend-2.0.3-30.el6sat

In the step 4 application exits with this error call:

Pushing to channel test-x:
XML-RPC call error: <ProtocolError for intel-s3ea2-04.rhts.eng.bos.redhat.com /CONFIG-MANAGEMENT-TOOL: 500 Internal Server Error>

Comment 4 Clifford Perry 2015-01-13 09:54:22 UTC
With the release of Red Hat Satellite 5.7 on January 12th 2015 this bug is
being moved to a Closed Current Release state. 

The Satellite 5.7 GA Errata:
 - https://rhn.redhat.com/errata/RHSA-2015-0033.html 

Satellite 5.7 Release Notes:
 -
https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html-single/Release_Notes/index.html

Satellite Customer Portal Blog announcement for release:
 - https://access.redhat.com/blogs/1169563/posts/1315743 

Cliff