private void prepare(LoadBalancerId id, ZoneEndpoint zoneEndpoint, NodeSpec requested) {
        CloudAccount cloudAccount = requested.cloudAccount();
        Optional<LoadBalancer> loadBalancer = db.readLoadBalancer(id);
        LoadBalancer newLoadBalancer = null;
        LoadBalancer.State fromState = loadBalancer.map(LoadBalancer::state).orElse(null);
        try {
            if (loadBalancer.isPresent() && ! inAccount(cloudAccount, loadBalancer.get())) {
                newLoadBalancer = loadBalancer.get().with(State.removable, nodeRepository.clock().instant());
                throw new LoadBalancerServiceException("Could not (re)configure " + id + " due to change in cloud account." +
                                                               " Current load balancer cloud account: " + cloudAccount(newLoadBalancer) +
                                                               ", requested cloud account: " + cloudAccount +
                                                               ". The operation will be retried on next deployment");
            }
            if (loadBalancer.isPresent() && ! hasCorrectVisibility(loadBalancer.get(), zoneEndpoint)) {
                newLoadBalancer = loadBalancer.get().with(State.removable, nodeRepository.clock().instant());
                throw new LoadBalancerServiceException("Could not (re)configure " + id + " due to change in load balancer visibility." +
                                                               " Current load balancer settings: " + settings(newLoadBalancer) +
                                                               ", zone endpoint settings: " + zoneEndpoint +
                                                               ". The operation will be retried on next deployment");
            }
            try {
                newLoadBalancer = loadBalancer.orElseGet(() -> createNewLoadBalancer(id, zoneEndpoint, requested)); // Determine id-seed.
                newLoadBalancer = newLoadBalancer.with(provisionInstance(newLoadBalancer, zoneEndpoint, requested)); // Update instance.
            } catch (LoadBalancerServiceException e) {
                log.log(Level.WARNING, "Failed to provision load balancer", e);
                throw e;
            }
        } finally {
            db.writeLoadBalancer(newLoadBalancer, fromState);
        }
    }
Require that load balancer IDs do not clash. This prevents name clashing when compacting endpoint DNS names
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/LoadBalancerProvisioner.java