@Override
    protected double maintain() {
        if (!nodeRepository().zone().cloud().dynamicProvisioning()) return 1.0; // Not relevant in zones with static capacity
        if (nodeRepository().zone().environment().isTest()) return 1.0; // Short-lived deployments
        if (!nodeRepository().nodes().isWorking()) return 0.0;

        NodeList allNodes = nodeRepository().nodes().list();
        if (!NodeMover.zoneIsStable(allNodes)) return 1.0;
        return upgradeHostFlavor(allNodes);
    }
This maintainer attempts to upgrade a single host running on an older flavor generation. The upgrade happens by
marking and retiring the host on the old generation, and redeploying to provision a replacement host on a newer
generation.

If the cloud provider reports a lack of capacity for the newer generation, retirement of the host is
cancelled, and upgrade is attempted of the next host on an old flavor, if any.

Once a host has been marked for upgrade, {@link HostResumeProvisioner} will complete provisioning of the replacement
host.

@author mpolden
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/HostFlavorUpgrader.java