brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] brooklyn-server pull request #211: BROOKLYN-264 Stop app while VM still bein...
Date Wed, 13 Jul 2016 09:11:56 GMT
Github user aledsage commented on a diff in the pull request:
    --- Diff: software/base/src/main/java/org/apache/brooklyn/entity/software/base/lifecycle/
    @@ -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);
    +            Repeater.create("Wait for a machine to appear")
    +                    .until(new Callable<Boolean>() {
    +                        @Override
    +                        public Boolean call() throws Exception {
    +                            return Machines.findUniqueMachineLocation(entity().getLocations()).isPresent();
    +                        }
    +                    })
    +                    .every(Duration.THIRTY_SECONDS)
    --- End diff --
    Feels like strange times to use. Why only check every thirty seconds? That means we might
take 29 seconds longer than we should have. The call to `getLocations()` should be cheap,
so doing it every second seems fine.

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

View raw message