void activation(Runnable activation) {
                Instant start = clock.instant();
                boolean failed = false;
                metric.add(ACTIVATION, 1, context);
                logger.log(INFO, "Activating singleton for ID: " + id);
                try {
                    activation.run();
                }
                catch (RuntimeException e) {
                    failed = true;
                    throw e;
                }
                finally {
                    long durationMillis = Duration.between(start, clock.instant()).toMillis();
                    metric.set(ACTIVATION_MILLIS, durationMillis, context);
                    logger.log(INFO, "Activation completed " + (failed ? "un" : "") +
                                     "successfully in %.3f seconds".formatted(durationMillis * 1e-3));
                    if (failed) metric.add(ACTIVATION_FAILURES, 1, context);
                    else isActive = true;
                    ping();
                }
            }
Attempt to activate or deactivate if status has changed.
If activation fails, we release the lock, so a different container may acquire it.
zkfacade/src/main/java/com/yahoo/vespa/curator/SingletonManager.java