You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by nakomis <gi...@git.apache.org> on 2016/06/06 14:31:42 UTC

[GitHub] brooklyn-server pull request #150: Ability to perform installation on a Wind...

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

    https://github.com/apache/brooklyn-server/pull/150#discussion_r65900017
  
    --- Diff: software/base/src/main/java/org/apache/brooklyn/entity/software/base/AbstractSoftwareProcessWinRmDriver.java ---
    @@ -321,12 +332,22 @@ public int copyTo(InputStream source, String destination) {
         }
     
         public void rebootAndWait() {
    +        rebootAndWait(null);
    +    }
    +
    +    public void rebootAndWait(String hostname) {
             try {
    -            executePsScriptNoRetry(ImmutableList.of("Restart-Computer -Force"));
    +            if (hostname != null) {
    +                getLocation().executePsScript(ImmutableMap.of(WinRmTool.COMPUTER_NAME, hostname), ImmutableList.of("Restart-Computer -Force"));
    +            } else {
    +                getLocation().executePsScript(ImmutableList.of("Restart-Computer -Force"));
    +            }
             } catch (Exception e) {
                 // Restarting the computer will cause the command to fail; ignore the exception and continue
    --- End diff --
    
    This comment is no longer true, and the LOG message below should be changed to something like `LOG.warn("Exception when restarting machine: ", e);`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---