{"action":"created","issue":{"url":"https://api.github.com/repos/apache/brooklyn-server/issues/110","repository_url":"https://api.github.com/repos/apache/brooklyn-server","labels_url":"https://api.github.com/repos/apache/brooklyn-server/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/apache/brooklyn-server/issues/110/comments","events_url":"https://api.github.com/repos/apache/brooklyn-server/issues/110/events","html_url":"https://github.com/apache/brooklyn-server/pull/110","id":147351614,"number":110,"title":"Wait windows up time parameter.","user":{"login":"bostko","id":1595054,"avatar_url":"https://avatars.githubusercontent.com/u/1595054?v=3","gravatar_id":"","url":"https://api.github.com/users/bostko","html_url":"https://github.com/bostko","followers_url":"https://api.github.com/users/bostko/followers","following_url":"https://api.github.com/users/bostko/following{/other_user}","gists_url":"https://api.github.com/users/bostko/gists{/gist_id}","starred_url":"https://api.github.com/users/bostko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bostko/subscriptions","organizations_url":"https://api.github.com/users/bostko/orgs","repos_url":"https://api.github.com/users/bostko/repos","events_url":"https://api.github.com/users/bostko/events{/privacy}","received_events_url":"https://api.github.com/users/bostko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-11T08:23:20Z","updated_at":"2016-04-13T14:16:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/brooklyn-server/pulls/110","html_url":"https://github.com/apache/brooklyn-server/pull/110","diff_url":"https://github.com/apache/brooklyn-server/pull/110.diff","patch_url":"https://github.com/apache/brooklyn-server/pull/110.patch"},"body":"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.\r\n\r\nWhat particularly I experience is that this Blueprint fail:\r\n```yaml\r\nservices:\r\n  type: org.apache.brooklyn.entity.software.base.VanillaWindowsProcess\r\n  brooklyn.config:\r\n    pre.install.command: echo preInstallCommand\r\n    install.command: echo installCommand > C:\\\\install.txt\r\n    post.install.command: echo postInstallCommand\r\n    customize.command: echo customizeCommand\r\n    pre.launch.command: echo preLaunchCommand\r\n    launch.powershell.command: |\r\n      Start-Sleep -s 400\r\n      Write-Host Test Completed\r\n    post.launch.command: echo postLaunchCommand\r\n    checkRunning.command: echo checkRunningCommand\r\n    stop.command: echo stopCommand\r\n```\r\n\r\nWhen I login on the host and search for System event of type 1074 in Windows Event Viewer, there is\r\n```none\r\nThe 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:\r\n```\r\n \r\n-----\r\nWith 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.\r\n\r\nI 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.\r\nI left out commented code so you can test Get-PendingReboot yourself.\r\n\r\nDo you think adding this option is enough or I should investigate further why it restarts?"},"comment":{"url":"https://api.github.com/repos/apache/brooklyn-server/issues/comments/209467839","html_url":"https://github.com/apache/brooklyn-server/pull/110#issuecomment-209467839","issue_url":"https://api.github.com/repos/apache/brooklyn-server/issues/110","id":209467839,"user":{"login":"bostko","id":1595054,"avatar_url":"https://avatars.githubusercontent.com/u/1595054?v=3","gravatar_id":"","url":"https://api.github.com/users/bostko","html_url":"https://github.com/bostko","followers_url":"https://api.github.com/users/bostko/followers","following_url":"https://api.github.com/users/bostko/following{/other_user}","gists_url":"https://api.github.com/users/bostko/gists{/gist_id}","starred_url":"https://api.github.com/users/bostko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bostko/subscriptions","organizations_url":"https://api.github.com/users/bostko/orgs","repos_url":"https://api.github.com/users/bostko/repos","events_url":"https://api.github.com/users/bostko/events{/privacy}","received_events_url":"https://api.github.com/users/bostko/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T14:16:50Z","updated_at":"2016-04-13T14:16:50Z","body":"Thank you @neykov most of the comments were addressed.\r\nI am verifying the changes now. It takes some time to wait all of this :)"}}