Github user aledsage commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/211#discussion_r70590868 --- Diff: software/base/src/main/java/org/apache/brooklyn/entity/software/base/lifecycle/MachineLifecycleEffectorTasks.java --- @@ -709,7 +712,26 @@ protected void doStop(ConfigBag parameters, Callable<StopMachineDetails<Integer> DynamicTasks.queue("pre-stop", new PreStopCustomTask()); + // BROOKLYN-263: + // With this change the stop effector will wait for Location to provision so it can stop it. + // It will not retry if non-jclouds location is used in the entity. Maybe<MachineLocation> machine = Machines.findUniqueMachineLocation(entity().getLocations()); + if (Boolean.TRUE.equals(entity().sensors().get(Attributes.JCLOUDS_PROVISIONING_STARTED)) + && machine.isAbsent()) { + entity().sensors().set(Attributes.JCLOUDS_PROVISIONING_STARTED, null); --- End diff -- This name feels misleading. It's sort-of more about whether the provisioning is running, rather than started. I'd be inclined to use an enum to indicate the exact state. The value could be one of PROVISIONING, ABORTING, or null. See later comment (not added yet!) about telling the jclouds provisioning to not do anything else (e.g. currently it will wait for ssh'able etc, which we can abort earlier).
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---