modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java | 2 - modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java | 2 - modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServerServiceImpl.java | 12 ++++++---- 3 files changed, 10 insertions(+), 6 deletions(-)
New commits: commit 56426f4db93d40c251e18f260b44ff599e938016 Author: John Mazzitelli mazz@redhat.com Date: Mon Jan 23 12:09:18 2012 -0500
[BZ 784006] rename agent option to --fullcleanconfig and change the error you get so the user knows the command line argument to pass to set the token.
diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java index 47c1a44..720b356 100644 --- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java +++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java @@ -2750,7 +2750,7 @@ public class AgentMain { new LongOpt("console", LongOpt.REQUIRED_ARGUMENT, null, 'e'), new LongOpt("daemon", LongOpt.NO_ARGUMENT, null, 'd'), new LongOpt("cleanconfig", LongOpt.NO_ARGUMENT, null, 'l'), - new LongOpt("cleanallconfig", LongOpt.NO_ARGUMENT, null, 'L'), + new LongOpt("fullcleanconfig", LongOpt.NO_ARGUMENT, null, 'L'), new LongOpt("advanced", LongOpt.NO_ARGUMENT, null, 'a'), new LongOpt("setup", LongOpt.NO_ARGUMENT, null, 's'), new LongOpt("nostart", LongOpt.NO_ARGUMENT, null, 'n'), diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java index de24731..8f1d5f2 100644 --- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java +++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java @@ -596,7 +596,7 @@ public interface AgentI18NResourceKeys { + "\ -h, --help Shows this help message (default)\n\\n" + "\ -i, --input=<filename> Specifies a script file to be used for input\n\\n" + "\ -l, --cleanconfig Clears out existing configuration and data files, except for the security token.\n\\n" - + "\ -L, --cleanallconfig Clears out all existing configuration and data files so the agent starts with a totally clean slate\n\\n" + + "\ -L, --fullcleanconfig Clears out all existing configuration and data files so the agent starts with a totally clean slate\n\\n" + "\ -n, --nostart If specified, the agent will not be automatically started\n\\n" + "\ -o, --output=<filename> Specifies a file to write all output (excluding log messages)\n\\n" + "\ -p, --pref=<preferences name> Specifies the agent preferences name used to identify what configuration to use\n\\n" diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServerServiceImpl.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServerServiceImpl.java index 75c4d65..9afc3b9 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServerServiceImpl.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServerServiceImpl.java @@ -135,9 +135,11 @@ public class CoreServerServiceImpl implements CoreServerService { if (agentByName != null) { // the agent request provided a name that already is in use by an agent. However, the request // provided a security token that was not assigned to any agent! How can this be? Something is fishy. - String msg = "The agent asking for registration under the name [" + request.getName() + String msg = "The agent asking for registration under the name [" + + request.getName() + "] provided an invalid security token. This request will fail. " - + "Please consult an administrator to reconfigure this agent with its proper security token."; + + "Please consult an administrator to obtain the agent's proper security token " + + "and restart the agent with the option "-Drhq.agent.security-token=<the valid security token>""; throw new AgentRegistrationException(msg); } Agent agentByAddressPort = getAgentManager().getAgentByAddressAndPort(request.getAddress(), @@ -172,9 +174,11 @@ public class CoreServerServiceImpl implements CoreServerService { + " and same security token."; throw new AgentRegistrationException(msg); } else { - String msg = "The agent [" + request.getName() + String msg = "The agent [" + + request.getName() + "] is attempting to re-register without a security token. " - + "Please consult an administrator to reconfigure this agent with its proper security token."; + + "Please consult an administrator to obtain the agent's proper security token " + + "and restart the agent with the option "-Drhq.agent.security-token=<the valid security token>""; throw new AgentRegistrationException(msg);
}
rhq-commits@lists.fedorahosted.org