Bug 963983 - if server endpoint check test fails, agent loses token
Summary: if server endpoint check test fails, agent loses token
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Agent
Version: JON 3.1.1
Hardware: Unspecified
OS: Unspecified
urgent
unspecified
Target Milestone: ER01
: JON 3.2.0
Assignee: John Mazzitelli
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 963982
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-16 23:44 UTC by Charles Crouch
Modified: 2015-02-01 23:28 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 963982
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
agent_log.png (167.41 KB, image/png)
2013-09-20 16:40 UTC, Armine Hovsepyan
no flags Details

Description Charles Crouch 2013-05-16 23:44:16 UTC
+++ This bug was initially created as a clone of Bug #963982 +++

Install everything. Give a bogus public endpoint to the server.

Register a new agent (make sure the default setting of rhq.agent.test-failover-list-at-startup remains "true" - since this is the default, nothing to do here, just wanted to point that out).

See that the server registered the agent successfully, assigned it a token and sent it to the agent. The agent, however, fails the server endpoint ping test and retries. However, by now, the token has been assigned, but the agent didn't persist it yet. So the retry fails.

I haven't tested this, but this is the behavior reported to me and the code I see seems to tell me this is what will happen.

We should persist the token as soon as we get it.

--- Additional comment from John Mazzitelli on 2013-05-16 19:43:07 EDT ---

I think the code to fix is in here:

org.rhq.enterprise.agent.AgentMain.registerWithServer(long, boolean)

Comment 1 Charles Crouch 2013-05-16 23:47:04 UTC
This may explain apparent token loss issues from customers which we've never been able to reproduce or explain.

We need to make sure we document all the test case scenarios that need to be tested in this area, not just the ones which exercise this particular failure scenario.

Comment 2 John Mazzitelli 2013-05-17 20:50:42 UTC
see bug #963982 for test procedures to know if this is fixed.

Comment 3 John Mazzitelli 2013-05-17 21:11:06 UTC
git commit to master: edaffb8

Comment 4 Armine Hovsepyan 2013-09-20 16:40:36 UTC
Created attachment 800569 [details]
agent_log.png

Comment 5 Armine Hovsepyan 2013-09-20 16:41:42 UTC
verified in jon 3.2 er1 by steps described in bug #963982


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