Bug 534533 (RHQ-1320)
Summary: | agent `failover` command sets rhq.agent.server.bind-address, even if value is bogus. | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Corey Welton <cwelton> |
Component: | Agent | Assignee: | John Mazzitelli <mazz> |
Status: | CLOSED NEXTRELEASE | QA Contact: | Jeff Weiss <jweiss> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 1.2 | CC: | dajohnso |
Target Milestone: | --- | Flags: | cwelton:
archived+
|
Target Release: | --- | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://jira.rhq-project.org/browse/RHQ-1320 | ||
Whiteboard: | |||
Fixed In Version: | 1.2 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: |
Red Hat Enterprise Linux Server release 5.2 (Tikanga) Kernel \r on an \m Linux rlx-0-12.rhndev.redhat.com 2.6.18-92.1.22.el5 #1 SMP Fri Dec 5 09:29:46 EST 2008 i686 i686 i386 GNU/Linux java version "1.6.0_11" Java(TM) SE Runtime Environment (build 1.6.0_1
|
|
Last Closed: | Type: | --- | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 534191 |
Description
Corey Welton
2009-01-06 18:30:00 UTC
I see this: shutdown> failover -s example.com Failed to switch over to server [example.com]. See log file for details. shutdown> getconfig rhq.agent.server.bind-address rhq.agent.server.bind-address=mazzthink But, my agent was currently in shutdown mode, so maybe the behavior is different if the agent has been started. Will look into this behavior and see why it does what it does. sending> failover -s foo Failed to switch over to server [foo]. See log file for details. sending> getconfig rhq.agent.server.bind-address rhq.agent.server.bind-address=foo Looks like the change to the preference is committed when in started. I see the problem. I got half way there :) I reverted the comm object but not the preferences - from AgentMain.switchToServer(): // remember this in case we fail - we have to revert back to the original server we were talking to String originalServerEndpoint = comm.getRemoteEndpoint(); // need to synch on last failover time so we don't clash with the real failover stuff synchronized (m_lastFailoverTime) { boolean ok = switchCommServer(comm, newServer, newTransport, newTransportParams); if (!ok) { try { // we are switching back to the original server because our switch failed comm.setRemoteEndpoint(originalServerEndpoint); } catch (Exception e) { // this should never happen LOG.warn(AgentI18NResourceKeys.CANNOT_SWITCH_TO_INVALID_SERVER, originalServerEndpoint, e); } } return ok; } I need to switch back the preferences too, in the if (!ok) block Will check in a fix that does this now (this is running the fix on my local box): sending> getconfig rhq.agent.server.bind-address rhq.agent.server.bind-address=mazzthink sending> failover -s foo Failed to switch over to server [foo]. See log file for details. sending> getconfig rhq.agent.server.bind-address rhq.agent.server.bind-address=mazzthink Verified, rev2561, linux agent, windows server. This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1320 |