Bug 480126 - redstone.xmlrpc.XmlRpcFault: proxy_already_registered even if message above says deactivated
Summary: redstone.xmlrpc.XmlRpcFault: proxy_already_registered even if message above s...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Proxy Server
Version: 0.4
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Partha Aji
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space05
TreeView+ depends on / blocked
 
Reported: 2009-01-15 09:35 UTC by Jan Pazdziora
Modified: 2009-09-17 07:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-17 07:09:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora 2009-01-15 09:35:36 UTC
Description of problem:

I had a RHEL 5 with Spacewalk Proxy 0.4 installed on a vmware guest and activated against Spacewalk 0.4. I have then reverted that virtual guest to try something, and I run configure-proxy.sh again. It failed.

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

# rpm -qa | grep proxy
spacewalk-proxy-package-manager-0.4.3-1.el5
spacewalk-proxy-html-0.4.2-1.el5
spacewalk-proxy-broker-0.4.3-1.el5
spacewalk-proxy-tools-0.4.3-1.el5
spacewalk-proxy-installer-0.4.4-1.el5
spacewalk-proxy-docs-0.4.1-1.el5
spacewalk-proxy-common-0.4.3-1.el5

How reproducible:

Tried twice.

Steps to Reproduce:
1. Install Spacewalk Proxy, activate against Spacewalk.
2. Try to activate again.
  
Actual results:

# configure-proxy.sh
Proxy version to activate [0.4]: 
RHN Parent [dhcp77-206.rhndev.redhat.com]: 
Traceback email []: jpazdziora
Use SSL [1]: 
CA Chain [/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT]: 
HTTP Proxy []: 
Regardless of whether you enabled SSL for the connection to the Spacewalk Parent
Server, you will be prompted to generate an SSL certificate.
This SSL certificate will allow client systems to connect to this Spacewalk Proxy
securely. Refer to the Spacewalk Proxy Installation Guide for more information.
Organization: Red Hat
Organization Unit [vmware145.englab.brq.redhat.com]: 
Common Name [vmware145.englab.brq.redhat.com]: 
City: Brno
State: .
Country code: CZ
Email [jpazdziora]: 
API version: 0.4
RHN Proxy successfully deactivated.

There was a problem activating the RHN Proxy entitlement:
ERROR: upon entitlement/activation attempt: unknown error - <Fault 1043: 'redstone.xmlrpc.XmlRpcFault: proxy_already_registered'>
Proxy activation failed! Configuration interrupted.

Expected results:

If the message says

RHN Proxy successfully deactivated.

it shouldn't then fail with the activation.

Additional info:

I did rhn_check -vv before the second attempt, the results is the same.

In the WebUI of Spacewalk server, there is no Proxy tab with the system in question, so I don't even have a way of deactivating the system from the WebUI.

Comment 1 Miroslav Suchý 2009-01-15 10:09:07 UTC
It may be related to the move to stock httpd and the fact that /rpc/api is not working ATM. But how it happend then that the proxy say it is activated?

It may be related to BZ 469060. Which then can fix the problem or at least provide cleaner error message.

Comment 2 Jan Pazdziora 2009-01-15 10:42:54 UTC
I was able to reproduce the issue even after I've put

   RewriteRule ^/rpc/api /rhn/rpc/api [P]

to /etc/httpd/conf.d/zz-spacewalk-server.conf, so I don't think it's related to the /rpc/api problem. When I registered fresh system with the Spacewalk, I got the proxy activated alright, so some parts of the API had to work.

Comment 3 Miroslav Suchý 2009-01-22 11:02:33 UTC
OK. The problem is that the proxy is not deactivated. 
The problem seems to be that in file:
 java/code/src/com/redhat/rhn/manager/system/SystemManager.java
on line 1290 is code:
 server.setProxyInfo(null);
And it do not delete the proxyinfo record.

This has been introduce by commit 1e291c1941e4d2a89afc99fe8add9e127e018a34
         // freakin hibernate can't do a simple bulk delete statement unless
         // it uses HQL!
-        executeWriteMode("System_queries",
-                "delete_proxy_info", params);
+        server.setProxyInfo(null);
         executeWriteMode("Monitoring_queries",

I wonder how to fix it to not reintroduce the monitoring bug again.

Comment 4 Partha Aji 2009-01-31 01:29:17 UTC
Should be fixed by commit 73bdcdcc5a3b420fb6219125b0b4356598f8883d

Comment 5 Miroslav Suchý 2009-02-03 10:15:58 UTC
I just installed package with Partha modifiacation and it works as expected.
VERIFIED.

Comment 6 Jesus M. Rodriguez 2009-04-14 14:12:10 UTC
Spacewalk 0.5 released.

Comment 7 Miroslav Suchý 2009-09-17 07:09:02 UTC
Spacewalk 0.5 has been released for long time ago.


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