Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/110#discussion_r59183890
--- Diff:
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
---
@@ -2742,14 +2743,53 @@ protected LoginCredentials
waitForWinRmAvailable(final ComputeService computeSer
Callable<Boolean> checker = new Callable<Boolean>() {
public Boolean call() {
for (Map.Entry<WinRmMachineLocation, LoginCredentials>
entry : machinesToTry.entrySet()) {
- WinRmMachineLocation machine = entry.getKey();
- WinRmToolResponse response =
machine.executeCommand(
-
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
- ImmutableList.of("echo testing"));
- boolean success = (response.getStatusCode() == 0);
- if (success) {
- credsSuccessful.set(entry.getValue());
- return true;
+ try {
+ final WinRmMachineLocation machine =
entry.getKey();
+ WinRmToolResponse response =
machine.executeCommand(
+
ImmutableMap.of(WinRmTool.PROP_EXEC_TRIES.getName(), 1),
+ ImmutableList.of("echo testing"));
+ boolean success = (response.getStatusCode() ==
0);
+ if (success) {
+ credsSuccessful.set(entry.getValue());
+// final String pendingRebootStatusScript =
"C:\\Get-PendingReboot.ps1";
--- End diff --
Is the reboot because you are testing on vCloud Director, and it is the
vmware tools that is doing the reboot? My understanding in that situation is
that the vApp template can include configuration that causes a reboot of the
VM. Given that situation is not about upgrades, then the Windows OS does not
know it is going to be rebooted until the vmware tools issues the reboot
command.
It also wouldn't surprise me if there is a race: when the VM first boots,
it checks to see if there are any security updates that need applied and
whether those updates require reboot; but while it is still checking we are
able to connect to the VM over WinRM so we might check too early.
---
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.
---