private void withLockForAdminOp(ApplicationInstanceReference reference,
                                    String eventDescription,
                                    Runnable runnable) {
        OrchestratorContext context = OrchestratorContext.createContextForAdminOp(timer.toUtcClock());

        final ApplicationLock lock;
        try {
            lock = lockApplication(context, reference);
        } catch (RuntimeException e) {
            log.log(Level.SEVERE, "Failed to get Orchestrator lock on when " + reference +
                    eventDescription + ": " + e.getMessage());
            return;
        }

        try (lock) {
            runnable.run();
        } catch (RuntimeException e) {
            log.log(Level.SEVERE, "Failed to clean up after " + reference + eventDescription +
                    ": " + e.getMessage());
        }
    }
Remove the application from ZooKeeper.

<ol>
    <li>/vespa/host-status/APPLICATION_ID (should just be ./hosts/*)</li>
    <li>/vespa/host-status-service/REFERENCE/hosts-allowed-down  (should just be ./*)</li>
    <li>/vespa/application-status-service/REFERENCE  (should just be .)</li>
</ol>
orchestrator/src/main/java/com/yahoo/vespa/orchestrator/status/ZkStatusService.java