Bug 536620 - (RHQ-951) identify prompt command should be allowed to identify other servers in cloud
identify prompt command should be allowed to identify other servers in cloud
Status: CLOSED NEXTRELEASE
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
1.1
All All
low Severity medium (vote)
: ---
: ---
Assigned To: John Mazzitelli
Corey Welton
http://jira.rhq-project.org/browse/RH...
: Improvement
Depends On: RHQ-1333
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-07 09:58 EDT by John Mazzitelli
Modified: 2009-11-10 16:22 EST (History)
0 users

See Also:
Fixed In Version: 1.2
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Mazzitelli 2008-10-07 09:58:00 EDT
now that we have HA, it would be nice to allow an agent to identify any server in the cloud.

Currently, the identify prompt command can identify only the server the agent is talking to.  The "identify" prompt command can take a locator URL to any other remote endpoint, however, if that endpoint is a RHQ server, it will fail because the identify prompt command code does not  properly build the command with the security token (so you will get an auth error).

Change IdentifyPromptCommand so it can sign the message properly thus allowing one agent to identify a server not its own.
Comment 1 John Mazzitelli 2008-10-10 16:41:35 EDT
Just a single line addition to IdentifyPromptCommand:

out.println(MSG.getMsg(AgentI18NResourceKeys.IDENTIFY_ASK_REMOTE_SERVER_FOR_ID, args[1]));
+                agent.getClientCommandSender().preprocessCommand(command);
                 CommandResponse response = client.invoke(command);
                 client.disconnectRemoteCommunicator();
Comment 2 Corey Welton 2009-01-08 01:01:59 EST
This seems to work, but I need some more details on it... pending.
Comment 3 John Mazzitelli 2009-01-08 08:59:43 EST
"so it can sign the message properly" means the prompt command needed to preprocess its identify command so it contains the agent's security token. Without that, the command would fail if you gave the identify prompt a server URL (rather than let the command use the agent's internal sender which is already preprocessed/signed).

This is all internal implementation details. From the user perspective, you should just be able to say:

identify "server-uri"

and have the prompt return information about that server. That server must be a valid server in the cloud.

I'm currently enhancing this prompt command further to allow you to just specify a server hostname (right now, you must give it a full URI like "servlet://localhost:7080/...transport-params-here..."
Comment 4 John Mazzitelli 2009-01-08 10:32:25 EST
see subtask for a better way to use this identify command
Comment 5 Corey Welton 2009-01-27 09:58:28 EST
QA Verified - I get a "true" response when trying to identify a valid host, a "false" when trying to identify an invalid host, and a separate traceback when trying to run identify on a host that is not running rhq.

Comment 6 Red Hat Bugzilla 2009-11-10 16:20:18 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-951

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