Bug 695890

Summary: RHSA-2011:0434-1 breaks taskomatic on RHEL 4 Satellite 5.3
Product: Red Hat Satellite 5 Reporter: Tasos Papaioannou <tpapaioa>
Component: ServerAssignee: Jan Pazdziora <jpazdziora>
Status: CLOSED ERRATA QA Contact: Martin Minar <mminar>
Severity: high Docs Contact:
Priority: urgent    
Version: 530CC: cperry, mkoci, mminar
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-config-0.5.9-17.el4sat Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-18 07:18:42 UTC Type: ---
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: 677501    

Description Tasos Papaioannou 2011-04-12 21:37:36 UTC
Description of problem:

On Satellite 5.3 running on RHEL 4 AS (32-bit or 64-bit) and with the latest installed packages available from RHN, the taskomatic service fails to start. 

Version-Release number of selected component (if applicable):

spacewalk-config-0.5.9-16.el4sat


How reproducible:

100%

Steps to Reproduce:
1. Install Satellite 5.3 on RHEL 4.
2. Update to latest spacewalk* packages from RHN.
3. Restart rhn-satellite service.
  
Actual results:

Taskomatic fails to start. From /var/log/rhn/rhn_taskomatic_daemon.log:

[...]
ERROR  | wrapper  | 2011/04/12 11:32:29 | Startup failed: Timed out waiting for signal from JVM.
ERROR  | wrapper  | 2011/04/12 11:32:29 | JVM did not exit on request, terminated
FATAL  | wrapper  | 2011/04/12 11:32:29 | There were 5 failed launches in a row, each lasting less than 300 seconds.  Giving up.
FATAL  | wrapper  | 2011/04/12 11:32:29 |   There may be a configuration problem: please check the logs.
STATUS | wrapper  | 2011/04/12 11:32:29 | <-- Wrapper Stopped

This is because taskomatic receives an HTTP 404 error when requesting api.getVersion from /rpc/api. In /var/log/httpd/error_log:
[...]
[Tue Apr 12 11:32:19 2011] [error] [client 127.0.0.1] File does not exist: /var/www/html/rhn/rpc
[Tue Apr 12 11:32:23 2011] [error] [client 127.0.0.1] File does not exist: /var/www/html/rhn/rpc
[Tue Apr 12 11:32:27 2011] [error] [client 127.0.0.1] File does not exist: /var/www/html/rhn/rpc


Expected results:

Successful Taskomatic startup and URL redirection by Apache httpd.

Additional info:

This is an only when the Satellite is on RHEL 4. The changes introduced in https://rhn.redhat.com/errata/RHSA-2011-0434.html to /etc/httpd/conf.d/zz-spacewalk-www.conf appear to be responsible. Backing out the changes and restarting httpd resolves the taskomatic startup issue.


# diff zz-spacewalk-www.conf.bad zz-spacewalk-www.conf.good
76,87d75
< # This rule handles incoming kickstart file requests from
< # machines actually performing a kickstart. This rule
< # processes the incoming URL and converts it into something
< # slightly more Struts friendly.
< RewriteRule ^/ks/cfg([-a-zA-Z0-9\._/\%\ ]*)$ /rhn/kickstart/DownloadFile.do?ksurl=$1
< RewriteRule ^/download/(.*)$ /rhn/common/DownloadFile.do?url=$1
< RewriteRule ^/rpc/api /rhn/rpc/api
< RewriteRule ^/ks/dist(.*)$ /rhn/common/DownloadFile.do?url=/ks/dist$1
< 
< # For rhn-custom-info
< RewriteRule ^/WEBRPC /rhn/rpc/api
< 
103a92,102
> # This rule handles incoming kickstart file requests from
> # machines actually performing a kickstart. This rule
> # processes the incoming URL and converts it into something
> # slightly more Struts friendly.
> RewriteRule ^/ks/cfg([-a-zA-Z0-9\._/\%\ ]*)$ /rhn/kickstart/DownloadFile.do?ksurl=$1 [P]
> RewriteRule ^/download/(.*)$ /rhn/common/DownloadFile.do?url=$1 [P]
> RewriteRule ^/rpc/api /rhn/rpc/api [P]
> RewriteRule ^/ks/dist(.*)$ /rhn/common/DownloadFile.do?url=/ks/dist$1 [P]
> 
> # For rhn-custom-info
> RewriteRule ^/WEBRPC /rhn/rpc/api [P]

Comment 1 Jan Pazdziora 2011-04-13 09:22:13 UTC
I confirm the issue. It affects not only taskomatic but all frontend XMLRPC API.

Comment 2 Jan Pazdziora 2011-04-13 11:47:31 UTC
Tasos,

could you please check that if you revert the zz-spacewalk-www.conf to the (broken) version from spacewalk-config-0.5.9-16.el4sat, and then apply the following patch, it will address the issue as well?

--- zz-spacewalk-www.conf.orig
+++ zz-spacewalk-www.conf
@@ -88,6 +88,10 @@ RewriteRule ^/rhn(.*) ajp://localhost:8009/rhn$1 [P]
 RewriteRule ^(/.*\.(do|jsp)(\?.*)?)$ ajp://localhost:8009/$1 [P]
 </IfModule>
 
+<IfModule mod_jk.c>
+   RewriteRule ^/rhn(.*)$ /rhn$1 [PT]
+</IfModule>
+
 RedirectMatch ^/renew/.* http://rhn.redhat.com
 RedirectMatch ^/index\.html$ /rhn/Login.do
 
Thank you,

Jan

Comment 3 Tasos Papaioannou 2011-04-13 12:23:26 UTC
Hi Jan,

Yes, the patch resolves the issue as well.

Thanks,
Tasos

Comment 5 Jan Pazdziora 2011-04-13 12:35:06 UTC
The problem is not only taskomatic but also any frontend XMLRPC API calls and display of kickstart files, like the .../ks/cfg/org/... URL on the Kickstart Details > Bare Metal Kickstart page.

Comment 8 Jan Pazdziora 2011-04-14 07:28:28 UTC
Please note that we are only releasing the new packages for RHEL 4, not RHEL 5. 

Of course, if would be good to QA verify that in fact, the problem is not present on Satellite 5.3.0 on RHEL 5 (nor on Satellite 5.4.0).

Comment 11 errata-xmlrpc 2011-04-18 07:18:42 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0448.html