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

Bug 841664

Summary: agent security-token update problem when re-register server without one
Product: [JBoss] JBoss Operations Network Reporter: Zhengping Jin <zjin>
Component: AgentAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED NOTABUG QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: JON 3.1.0CC: loleary, myarboro
Target Milestone: ---   
Target Release: JON 3.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-05 21:16:19 UTC 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:    
Bug Blocks: 837381    
Attachments:
Description Flags
Agent Log none

Description Zhengping Jin 2012-07-19 19:15:10 UTC
Created attachment 599227 [details]
Agent Log

Description of problem:
In a typical condition when agent requires "security-token" to register server (otherwise be rejected by server), current solution "service jon-agent start" does not support any option such as "-Drhq.agent.security-token=<the valid security token>" to start the agent

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


How reproducible: occassionally


Steps to Reproduce:
1. install the agent and config it.
2. run "service jon-agent start"
3. import the agent in the discovery queue
4. quickly kill the agent and uninventory the platform in the inventory
5. uninstall the agent and delete all installed files
6. install the agent again and config agian
7. run agent
 
Actual results:
the agent requires "security-token" to register server (otherwise be rejected by server), since it attempt to re-register without a security token.

Expected results:
agent can pdate the config file with the correct token
or
add delete buttons in the server UI, "administration" -> "topology" -> "agent"


Additional info: see attachment

Comment 1 Charles Crouch 2012-07-20 17:44:10 UTC
So the issue is around step4) "quickly" and "occassionally" are related here.

Comment 2 Larry O'Leary 2012-09-25 20:23:24 UTC
From the description it appears that Zhengping is trying to use the SysV init script (from the agent RPM) to re-configure/re-register the agent. This is not supported in the SysV script from what I recall from a conversation with Stefan. It seems the correct process here would be to use the rhq-agent.sh script to re-register and agent with a new security token.