Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 963983

Summary: if server endpoint check test fails, agent loses token
Product: [JBoss] JBoss Operations Network Reporter: Charles Crouch <ccrouch>
Component: AgentAssignee: John Mazzitelli <mazz>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: urgent    
Version: JON 3.1.1CC: ahovsepy, hbrock, hrupp, mazz, myarboro
Target Milestone: ER01   
Target Release: JON 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 963982 Environment:
Last Closed: Type: Bug
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: 963982    
Bug Blocks:    
Attachments:
Description Flags
agent_log.png none

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