Bug 629011 - 'rhncfg-manager upload-channel' returns XMLRPC error '500 Internal server error'
Summary: 'rhncfg-manager upload-channel' returns XMLRPC error '500 Internal server error'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client
Version: 540
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Partha Aji
QA Contact: Pavel Novotny
URL:
Whiteboard:
Depends On:
Blocks: sat540-blockers sat540-cfg-symlinks
TreeView+ depends on / blocked
 
Reported: 2010-08-31 16:39 UTC by Pavel Novotny
Modified: 2010-10-28 15:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-28 15:01:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Novotny 2010-08-31 16:39:55 UTC
Description of problem:
When you try upload all configuration files in conf. channel back to Sattelite, the rhncfg-manager utility fails.

Version-Release number of selected component (if applicable):
rhncfg-management-5.9.5-4.el5sat

How reproducible:
Always

Steps to Reproduce:
1. Prerequisite is to have Sat540 (sync is not needed) with registered RHEL5
client. 
2. On Sat create a config channel: Configuration -> Configuration Channels ->
create new config channel
3. In the config channel, create some regular file(s): Configuration ->
Configuration Channels -> Select Channel -> Add Files -> Create
4. On client, run 'rhncfg-manager download-channel <your_config_channel> -t /tmp/'
5. Then run 'rhncfg-manager upload-channel <your_config_channel> -t /tmp/'
  
Actual results:
XML-RPC API call error from server. See additional info.
Note: This works on Satellite 5.3.

Expected results:
Upload config file(s) to Satellite server without error.

Additional info:

Steps 4 and 5:
-----
# rhncfg-manager download-channel -t /tmp/ symlink-channel
Red Hat Network username: admin
Password: *****
Deploying /tmp/TESTOUT.log -> /tmp/symlink-channel/tmp/TESTOUT.log
Deploying /tmp/eclipse-prefs.bak -> /tmp/symlink-channel/tmp/eclipse-prefs.bak
Deploying /tmp/test-dir -> /tmp/symlink-channel/tmp/test-dir

# rhncfg-manager upload-channel -t /tmp/ symlink-channel
Using config channel symlink-channel
Uploading /tmp/TESTOUT.log from /tmp/symlink-channel/tmp/TESTOUT.log
XML-RPC call error: <ProtocolError for hp-xw6400-01.rhts.eng.bos.redhat.com /CONFIG-MANAGEMENT-TOOL: 500 Internal Server Error>
-----

Log from /var/log/rhn/rhn_server.log:
-----
2010/08/31 11:54:00 -04:00 1489 0.0.0.0: config_mgmt/rhn_config_management.management_list_channels
2010/08/31 11:54:00 -04:00 29620 0.0.0.0: config_mgmt/rhn_config_management.management_get_delimiters
-----

Log /var/log/tomcat5/catalina.out shows nothing about this incident.

Comment 1 Partha Aji 2010-09-01 13:39:59 UTC
Can you by any chance paste the /var/log/httpd/error.log output?

Comment 2 Pavel Novotny 2010-09-01 14:04:43 UTC
Here is the log when I exec 'rhncfg-manager upload-channel ...':

/var/log/httpd/error_log:
-----
Exception reported from hp-xw6400-01.rhts.eng.bos.redhat.com
Time: Tue Aug 31 09:01:41 2010
Exception type exceptions.AttributeError
Exception while handling function config.management.get_default_delimiters
Request object information:
URI: /CONFIG-MANAGEMENT-TOOL
Remote Host: nec-em20.rhts.eng.bos.redhat.com
Server Name: hp-xw6400-01.rhts.eng.bos.redhat.com:0
Headers passed in:
        Accept-Encoding: identity
        Content-Length: 195
        Host: hp-xw6400-01.rhts.eng.bos.redhat.com
        content-encoding: x-gzip
        content-transfer-encoding: binary
        content-type: application/binary
        user-agent: rhn.rpclib.py/$Revision: 190936 $
        x-client-version: 1
        x-info: RPC Processor (C) Red Hat, Inc (version 191735)
        x-rhn-client-capability: rhncfg.dirs_enabled(1)=1,configfiles.base64_enc(1)=1
        x-rhn-transport-capability: follow-redirects=3
        x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc (version 190936)

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/server/apacheRequest.py", line 120, in call_function
    response = apply(func, params)
  File "/usr/share/rhn/server/handlers/config_mgmt/rhn_config_management.py", line 442, in management_get_delimiters
    return self._get_delimiters()
  File "/usr/share/rhn/server/configFilesHandler.py", line 120, in _get_delimiters
    return {
  File "/usr/share/rhn/common/rhnConfig.py", line 356, in __getattr__
    raise AttributeError(key)
AttributeError: config_delim_start

CONFIG PARSE WARNING: File not found or can't be read /etc/rhn/default/rhn_server_config-management-tool.conf
CONFIG PARSE WARNING: key not found in config default dict ('server', 'config-management-tool')
CONFIG PARSE WARNING: File not found or can't be read /etc/rhn/default/rhn_server_config-management-tool.conf
CONFIG PARSE WARNING: key not found in config default dict ('server', 'config-management-tool')
CONFIG PARSE WARNING: File not found or can't be read /etc/rhn/default/rhn_server_config-management-tool.conf
CONFIG PARSE WARNING: key not found in config default dict ('server', 'config-management-tool')
[...]
-----

It seems as a typo in the filename:
  /etc/rhn/default/rhn_server_config-management-tool.conf
  ^^^ this file does not exist
instead of:
  /etc/rhn/default/rhn_server_config-management_tool.conf
  ^^^ this file does exist

Comment 6 Pavel Novotny 2010-09-27 15:34:55 UTC
VERIFIED.
Tested successfully with version rhncfg-management-5.9.27-1.el5sat.

Comment 7 Michael Mráka 2010-10-25 08:50:13 UTC
Verified in stage.

[root@xen96 ~]# rhncfg-manager download-channel fooobar -t /tmp/fooobar/
Red Hat Network username: admin
Password: 
Deploying /tmp/fooo -> /tmp/fooobar/fooobar/tmp/fooo
Deploying /tmp/whatever -> /tmp/fooobar/fooobar/tmp/whatever
[root@xen96 ~]# rhncfg-manager upload-channel fooobar -t /tmp/fooobar/
Using config channel fooobar
Uploading /tmp/fooo from /tmp/fooobar/fooobar/tmp/fooo
Uploading /tmp/whatever from /tmp/fooobar/fooobar/tmp/whatever
[root@xen96 ~]#

Comment 8 Clifford Perry 2010-10-28 14:56:35 UTC
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. 


RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332

RHEA-2010:0803 - RHN Tools enhancement update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333

RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334

RHEA-2010:0800 - RHN Satellite Server 5.4.0
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335

Docs are available:

http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html 

Regards,
Clifford


Note You need to log in before you can comment on or make changes to this bug.