brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [2/2] brooklyn-server git commit: Closes #110
Date Wed, 27 Apr 2016 11:24:41 GMT
Closes #110

Wait to start windows parameter.

The problem this PR tries to solve is that In some clouds a restart could happen on a Windows
Host 2 minutes after it is provisioned. This could be because of System Upgrade or other.

What particularly I experience is that this Blueprint fail:
```yaml
services:
  type: org.apache.brooklyn.entity.software.base.VanillaWindowsProcess
  brooklyn.config:
    pre.install.command: echo preInstallCommand
    install.command: echo installCommand > C:\\install.txt
    post.install.command: echo postInstallCommand
    customize.command: echo customizeCommand
    pre.launch.command: echo preLaunchCommand
    launch.powershell.command: |
      Start-Sleep -s 400
      Write-Host Test Completed
    post.launch.command: echo postLaunchCommand
    checkRunning.command: echo checkRunningCommand
    stop.command: echo stopCommand
```

When I login on the host and search for System event of type 1074 in Windows Event Viewer,
there is
```none
The process C:\Windows\system32\winlogon.exe (W2K12-STD) has initiated the restart of computer
WIN-JV0CGR5J6GN on behalf of user NT AUTHORITY\SYSTEM for the following reason: Operating
System: Upgrade (Planned) Reason Code: 0x80020003 Shutdown Type: restart Comment:
```

-----
With this config key Brooklyn will wait 5 minutes for a restart to happen before returning
the machine as accessible. With this config Brooklyn waits before giving the machine to the
entity and the blueprint succeeds.

I tried adding Get-PendingReboot script from  [gallery.technet.microsoft.com](https://gallery.technet.microsoft.com/scriptcenter/Get-PendingReboot-Query-bdb79542)
but every time it executes it tells that no restarts are pending and again it restarts.
I left out commented code so you can test Get-PendingReboot yourself.

Do you think adding this option is enough or I should investigate further why it restarts?


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/c63e0598
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/c63e0598
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/c63e0598

Branch: refs/heads/master
Commit: c63e05987e343d0bebde95e69e8e67ecb975c72a
Parents: 5a4f313 95f2874
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Wed Apr 27 14:24:05 2016 +0300
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Wed Apr 27 14:24:05 2016 +0300

----------------------------------------------------------------------
 .../location/jclouds/JcloudsLocation.java       | 48 ++++++++++++++++++--
 .../location/winrm/WinRmMachineLocation.java    |  4 ++
 2 files changed, 48 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



Mime
View raw message