private LocalSession createSessionFromApplication(File applicationDirectory,
                                                      ApplicationId applicationId,
                                                      boolean internalRedeploy,
                                                      TimeoutBudget timeoutBudget,
                                                      DeployLogger deployLogger,
                                                      Instant created) {
        long sessionId = getNextSessionId();
        try {
            ensureSessionPathDoesNotExist(sessionId);
            ApplicationPackage app = createApplicationPackage(applicationDirectory, applicationId, sessionId, internalRedeploy, Optional.of(deployLogger));
            log.log(Level.FINE, () -> TenantRepository.logPre(tenantName) + "Creating session " + sessionId + " in ZooKeeper");
            SessionZooKeeperClient sessionZKClient = createSessionZooKeeperClient(sessionId);
            sessionZKClient.createNewSession(created);
            CompletionWaiter waiter = sessionZKClient.getUploadWaiter();
            LocalSession session = new LocalSession(tenantName, sessionId, app, sessionZKClient);
            waiter.awaitCompletion(Duration.ofSeconds(Math.min(120, timeoutBudget.timeLeft().getSeconds())));
            addLocalAndRemoteSession(session);
            return session;
        } catch (IOException e) {
            throw new RuntimeException("Error creating session " + sessionId, e);
        }
    }
A session for which we don't have a watcher, i.e. hitherto unknown to us.

@param sessionId session id for the new session
configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java