modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java | 32 +++++----- 1 file changed, 16 insertions(+), 16 deletions(-)
New commits: commit c52bdcd299b21043ad1c8ef70174053bc372b265 Author: John Mazzitelli mazz@redhat.com Date: Tue Jan 25 14:55:14 2011 -0500
forgot to add "g" to the short options so "-g" is valid cmd line option to the agent
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 fc2b8f3..955832c 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 @@ -1668,8 +1668,8 @@ public class AgentMain { try { shutdown(); } catch (Throwable t) { - LOG.error(t, "The plugin container has requested the agent be restarted but the shutdown " + - "operation failed."); + LOG.error(t, "The plugin container has requested the agent be restarted but the shutdown " + + "operation failed."); } if (isStarted()) { // Pause for a few seconds and try to shut down one more time. @@ -1677,44 +1677,44 @@ public class AgentMain { Thread.sleep(3000); shutdown(); } catch (Throwable t) { - LOG.error(t, "The plugin container has requested the agent be restarted but the shutdown " + - "operation failed again."); + LOG.error(t, "The plugin container has requested the agent be restarted but the shutdown " + + "operation failed again."); } } if (isStarted()) { // At this point agent shut down failed twice. We can get by with rebooting the plugin container // so we will try that as last ditch effort.
- LOG.warn("The agent shut down operation has failed twice. Attempting to reboot the plugin " + - "container so that stale resource types and deleted plugins are removed."); + LOG.warn("The agent shut down operation has failed twice. Attempting to reboot the plugin " + + "container so that stale resource types and deleted plugins are removed."); try { rebootPluginContainer(); } catch (Throwable t) { // If rebooting the plugin container fails as well, there is not much else we can do besides // reporting the failures. Manual intervention is needed. - LOG.error("The agent could not be shut down and rebooting the plugin container failed. " + - "Please check the logs for errors and manually restart the agent as soon as " + - "possible."); + LOG.error("The agent could not be shut down and rebooting the plugin container failed. " + + "Please check the logs for errors and manually restart the agent as soon as " + + "possible."); return; } } else { try { cleanDataDirectory(); } catch (Throwable t) { - LOG.warn(t, "The plugin container has requested the agent be restarted but purging the " + - "data directory failed."); + LOG.warn(t, "The plugin container has requested the agent be restarted but purging the " + + "data directory failed."); } try { start(); } catch (Throwable t) { - LOG.warn(t, "An error occurred while trying to restart the agent. Attempting restart " + - "one more time"); + LOG.warn(t, "An error occurred while trying to restart the agent. Attempting restart " + + "one more time"); try { shutdown(); start(); } catch (Throwable t1) { - LOG.error(t1, "Restarting the agent has failed. Please check the logs for errors and " + - "manually restart the agent as soon as possible."); + LOG.error(t1, "Restarting the agent has failed. Please check the logs for errors and " + + "manually restart the agent as soon as possible."); return; } } @@ -2887,7 +2887,7 @@ public class AgentMain { * @throws HelpException if help was requested and the agent should not be created */ private void processArguments(String[] args) throws Exception { - String sopts = "-:hdlasntuD:i:o:c:p:e:"; + String sopts = "-:hdlasntguD:i:o:c:p:e:"; LongOpt[] lopts = { new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'), new LongOpt("input", LongOpt.REQUIRED_ARGUMENT, null, 'i'), new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
rhq-commits@lists.fedorahosted.org