private void addNewNodes() {
        if (requested.resources().isEmpty()) return;

        for (Node host : allNodes) {
            if ( ! nodes.canAllocateTenantNodeTo(host, dynamicProvisioning)) continue;
            if (nodes.suspended(host)) continue; // Hosts that are suspended may be down for some time, e.g. for OS upgrade
            if (host.reservedTo().isPresent() && !host.reservedTo().get().equals(application.tenant())) continue;
            if (host.reservedTo().isPresent() && application.instance().isTester()) continue;
            if ( ! allowHostSharing && exclusiveAllocation && ! fitsPerfectly(host)) continue;
            if ( ! host.provisionedForApplicationId().map(application::equals).orElse(true)) continue;
            if ( ! host.exclusiveToApplicationId().map(application::equals).orElse(true)) continue;
            if ( ! host.exclusiveToClusterType().map(clusterSpec.type()::equals).orElse(true)) continue;
            if (spareHosts.contains(host) && !canAllocateToSpareHosts) continue;
            if ( ! capacity.hasCapacity(host, requested.resources().get())) continue;
            if ( ! allNodes.childrenOf(host).owner(application).cluster(clusterSpec.id()).isEmpty()) continue;
            if ( ! requested.cloudAccount().isUnspecified() && ! requested.cloudAccount().equals(host.cloudAccount())) continue;

            candidates.add(NodeCandidate.createNewChild(requested.resources().get(),
                                                        capacity.availableCapacityOf(host),
                                                        host,
                                                        spareHosts.contains(host),
                                                        allNodes,
                                                        ipAllocationContext));
        }
    }
Add a node on each host with enough capacity for the requested flavor
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/NodePrioritizer.java