Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/145#discussion_r63838436
  
    --- Diff: 
software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaWindowsProcessWinRmDriver.java
 ---
    @@ -80,9 +80,15 @@ public void launch() {
     
         @Override
         public boolean isRunning() {
    -        int exitCode = executeCommandInTask(
    -                
getEntity().getConfig(VanillaWindowsProcess.CHECK_RUNNING_COMMAND),
    -                
getEntity().getConfig(VanillaWindowsProcess.CHECK_RUNNING_POWERSHELL_COMMAND), 
"is-running-command");
    +        int exitCode = 1;
    +        try {
    +            exitCode = executeCommandInTask(
    +                    
getEntity().getConfig(VanillaWindowsProcess.CHECK_RUNNING_COMMAND),
    +                    
getEntity().getConfig(VanillaWindowsProcess.CHECK_RUNNING_POWERSHELL_COMMAND), 
"is-running-command");
    +        } catch (javax.xml.ws.WebServiceException/*Wraps Soap 
exceptions*/|org.apache.cxf.interceptor.Fault/*Wraps IO exceptions*/ e) {
    +            LOG.warn(getEntity() + " isRunning check failed. Executing 
WinRM command failed.", e);
    --- End diff --
    
    It's worth including a comment with the reason here (as you did in the 
description of the PR). For example:
    
        // If machine is restarting, then will get WinRM IOExceptions - don't 
propagate such exceptions


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to