Bug 122635 - XMLRPC protocol incompatibility between RHEL3 client and Satellite
XMLRPC protocol incompatibility between RHEL3 client and Satellite
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Configuration Management (Show other bugs)
unspecified
i386 Linux
high Severity high
: ---
: ---
Assigned To: Bret McMillan
Paul Dorsey
:
Depends On:
Blocks: 119090
  Show dependency treegraph
 
Reported: 2004-05-06 11:08 EDT by Aleksandr Brezhnev
Modified: 2007-10-23 22:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-06-18 12:32:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Aleksandr Brezhnev 2004-05-06 11:08:33 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2)
Gecko/20040301

Description of problem:
Looks like libxml2-python library on RHEL3 can't provide transparent
transfers of non-text data and substitutes strings like "%fa" with
byte code 0xfa during communications with RHN Satellite 3.2.0.

This problem directly affects rhncfg-client because it fails to deploy
files with non-text data and corrupts files containing strings like
"%fa". 

I created a short text file (size 126 bytes) /tmp/f126 and put it into
config channel.
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890

RHEL 3 client was able to deploy it:

# rhncfg-client get /tmp/f126
Deploying /tmp/f126

Then I added one byte with null code into beginning of this file:
dd if=/dev/zero of=zz bs=1 count=1
cat zz /tmp/f126 > /tmp/z127

I put this file into config channel and switched its type to binary.
File /tmp/z127 looks like (od -c /tmp/z127):
0000000  \0   1   2   3   4   5   6   7   8   9   0   1   2   3   4   5
0000020   6   7   8   9   0  \n   1   2   3   4   5   6   7   8   9   0
0000040   1   2   3   4   5   6   7   8   9   0  \n   1   2   3   4   5
0000060   6   7   8   9   0   1   2   3   4   5   6   7   8   9   0  \n
0000100   1   2   3   4   5   6   7   8   9   0   1   2   3   4   5   6
0000120   7   8   9   0  \n   1   2   3   4   5   6   7   8   9   0   1
0000140   2   3   4   5   6   7   8   9   0  \n   1   2   3   4   5   6
0000160   7   8   9   0   1   2   3   4   5   6   7   8   9   0  \n
0000177

RHEL3 client failed to deploy it:

# rhncfg-client get /tmp/z127
XML-RPC error while talking to
https://rhnsat.fmrco.com/CONFIG-MANAGEMENT: not well-formed (invalid
token): line 16, column 15

Version-Release number of selected component (if applicable):
libxml2-python-2.5.10-6 rhncfg-client-3.1.5-3

How reproducible:
Always

Steps to Reproduce:
1. Create a short text file (size 126 bytes) /tmp/f126:
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890
12345678901234567890

2. Add one byte with null code to the beginning of this file:
dd if=/dev/zero of=zz bs=1 count=1
cat zz /tmp/f126 > /tmp/z127

3. Upload /tmp/z127 into config channel on RHN Sat.
Switch its type to binary (but text type gives the dame effect).

File /tmp/z127 looks like (od -c /tmp/z127):
0000000  \0   1   2   3   4   5   6   7   8   9   0   1   2   3   4   5
0000020   6   7   8   9   0  \n   1   2   3   4   5   6   7   8   9   0
0000040   1   2   3   4   5   6   7   8   9   0  \n   1   2   3   4   5
0000060   6   7   8   9   0   1   2   3   4   5   6   7   8   9   0  \n
0000100   1   2   3   4   5   6   7   8   9   0   1   2   3   4   5   6
0000120   7   8   9   0  \n   1   2   3   4   5   6   7   8   9   0   1
0000140   2   3   4   5   6   7   8   9   0  \n   1   2   3   4   5   6
0000160   7   8   9   0   1   2   3   4   5   6   7   8   9   0  \n
0000177

4. Try to deploy /tmp/z127 file to RHEL3 client using rhncfg-client


Actual Results:  # rhncfg-client get /tmp/z127
XML-RPC error while talking to
https://rhnsat.fmrco.com/CONFIG-MANAGEMENT: not well-formed (invalid
token): line 16, column 15

Expected Results:  File should be deployed in /tmp directory.

Additional info:

No log records on Satellite in /var/log/rhn/rhn_server_xmlrpc.log,
/var/log/rhn/rhn_server_app.log and /var/log/httpd/error_log.

/var/log/httpd/access_log has following:

172.17.237.29 - - [06/May/2004:11:13:22 -0400] "POST
/CONFIG-MANAGEMENT HTTP/1.1" 200 379
172.17.237.29 - - [06/May/2004:11:13:22 -0400] "POST
/CONFIG-MANAGEMENT HTTP/1.1" 200 265

The same experiment with rhncfg-client on RHEL 2.1 works well.
Comment 1 Aleksandr Brezhnev 2004-05-06 11:09:57 EDT
Another discovery.
I created a text file /tmp/hex-test with substring "%fa":

1234567890%fa1234567890

and uploaded this file into Satellite.
Satellite shows this file properly.
RHEL3 client can deploy it but substitutes substring "%fa" with one
byte with code 0xfa:

# od -t x1 /tmp/hex-test
0000000 31 32 33 34 35 36 37 38 39 30 fa 31 32 33 34 35
0000020 36 37 38 39 30 0a
0000026
Comment 2 Bret McMillan 2004-05-06 11:22:51 EDT
Bumping priority, adding as a blocker for rhn340hosted.  Need to
determine if responsability lies w/ libxml2/libxml2-python or if it's
somewhere in the RHN stack.
Comment 3 Aleksandr Brezhnev 2004-05-06 11:24:16 EDT
Related problem is described in IT#38514:

We have an activation key with a list of packages to install:
python-optik
rhncfg
rhncfg-actions
rhncfg-client
rhncfg-management
rhns-config-libs

When we are trying to register RHEL3 client with Satellite using

rhnreg_ks --force --activationkey ACTIVATION_KEY

the package deployment action fails with error code 30 returned to
Satellite. In fact, all rpms are installed but Satellite gets error
code 0x30 which would be 0 if libxml2-python had transfered this hex
code correctly.
Comment 4 Bret McMillan 2004-05-06 11:25:34 EDT
PS -- thank you for the excellently detailed bug report!
Comment 5 Aleksandr Brezhnev 2004-05-06 15:02:54 EDT
rhncfg-client on RHEL 2.1 corrupts files containing %xx strings the
same way as it does so on RHEL 3. 

For example, 

rhncfg-client get /etc/ftpaccess

deploys file but converts "%65534" to "e534".
Comment 6 Mihai Ibanescu 2004-05-20 17:15:19 EDT
Bret is working on it.
Comment 7 Bret McMillan 2004-05-24 22:35:08 EDT
Ok, nest of bugs uncovered and hopefully squashed.  This needs to be
fully tested.

The new client rpms (rhncfg-*3.1.6-6-*) need to be tested on both
RHEL3 and RHEL2.1.  Specifically, need to run through the scheduled
action, rhncfg-client, and rhncfg-manager tests.

They need to be pointed at *both* a 3.2 satellite to ensure they work
as much as the old ones did when pointed at old app code, and they
need to be pointed at a new rhn340 satellite and new rhn340 hosted env
(aka, webdev).  The new server side packages should be confirmed to be
>= 3.4.0-7

Be sure to include /etc/mail/sendmail.cf, a text file of your choice,
and a binary file of your choice in the import and deploy tests.
Comment 8 Bret McMillan 2004-05-24 22:37:52 EDT
Oh, and we also need to test the clients in prod against the new
server side code to make sure they work together as much as the
clients in prod did w/ the rhn320 code.

So, rhncfg*-3.1.5-3-* against the rhns >= 3.4.0-7 backend packages.
Comment 9 Bret McMillan 2004-06-01 10:11:01 EDT
when testing in qa, be sure to test w/ rhncfg*3.1.6-7
Comment 10 Paul Dorsey 2004-06-09 12:46:24 EDT
All steps verified
rhncfg-client
rhncfg-manager
Paul

Note test plans for all rhncfg functions should be writen and automated
Comment 11 Robert Perkins 2005-06-30 14:51:01 EDT
When will this be released?

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