summaryrefslogtreecommitdiffstats
path: root/node-repository/src/test/java/com/yahoo
diff options
context:
space:
mode:
Diffstat (limited to 'node-repository/src/test/java/com/yahoo')
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/NodeRepositoryTest.java2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/RealDataScenarioTest.java64
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java56
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingUsingBcpGroupInfoTest.java36
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModelTest.java8
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/Fixture.java8
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/AutoscalingMaintainerTest.java4
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/CapacityCheckerTest.java2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/DeprovisionedExpirerTest.java56
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/DirtyExpirerTest.java11
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostCapacityMaintainerTest.java154
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostFlavorUpgraderTest.java85
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostRetirerTest.java12
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/MetricsReporterTest.java35
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainerTest.java8
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/os/OsVersionsTest.java2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/NodeSerializerTest.java13
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DynamicProvisioningTest.java79
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTest.java22
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTester.java18
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/VirtualNodeProvisioningTest.java14
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiTest.java18
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application2.json2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/archives.json2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/capacity-zone.json2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/controller1.json26
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-container1.json38
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-os-upgrade-complete.json43
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-2.json40
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-3.json35
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-4.json35
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports.json40
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1.json43
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node2.json45
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node3.json43
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node4.json43
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node5.json43
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost1-with-firmware-data.json43
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost6.json22
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/maintenance.json3
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node1.json42
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node10.json39
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node11.json31
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node13.json2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node14.json2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node2.json39
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node3.json29
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-after-changes.json37
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-wg.json39
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-with-hostnames.json41
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4.json39
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5-after-changes.json29
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5.json29
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node55.json29
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node6.json39
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node7.json29
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node8.json2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node9.json27
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/parent2.json27
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/wireguard.json9
62 files changed, 1325 insertions, 494 deletions
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/NodeRepositoryTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/NodeRepositoryTest.java
index 7d9a48f6773..05e01c65798 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/NodeRepositoryTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/NodeRepositoryTest.java
@@ -199,7 +199,7 @@ public class NodeRepositoryTest {
// Set host 2 properties and deprovision it
try (var lock = tester.nodeRepository().nodes().lockAndGetRequired("host2")) {
- Node host2 = lock.node().withWantToRetire(true, false, true, Agent.system, tester.nodeRepository().clock().instant());
+ Node host2 = lock.node().withWantToRetire(true, false, true, false, Agent.system, tester.nodeRepository().clock().instant());
tester.nodeRepository().nodes().write(host2, lock);
}
tester.nodeRepository().nodes().removeRecursively("host2");
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/RealDataScenarioTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/RealDataScenarioTest.java
index dc1e1320ff2..29ebf1789c0 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/RealDataScenarioTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/RealDataScenarioTest.java
@@ -8,9 +8,11 @@ import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.ApplicationTransaction;
import com.yahoo.config.provision.Capacity;
import com.yahoo.config.provision.Cloud;
+import com.yahoo.config.provision.CloudName;
import com.yahoo.config.provision.ClusterResources;
import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.config.provision.Environment;
+import com.yahoo.config.provision.Flavor;
import com.yahoo.config.provision.HostSpec;
import com.yahoo.config.provision.NodeResources;
import com.yahoo.config.provision.ProvisionLock;
@@ -24,9 +26,12 @@ import com.yahoo.vespa.config.ConfigPayload;
import com.yahoo.vespa.hosted.provision.maintenance.SwitchRebalancer;
import com.yahoo.vespa.hosted.provision.node.Agent;
import com.yahoo.vespa.hosted.provision.persistence.DnsNameResolver;
+import com.yahoo.vespa.hosted.provision.persistence.NameResolver;
import com.yahoo.vespa.hosted.provision.persistence.NodeSerializer;
import com.yahoo.vespa.hosted.provision.provisioning.ProvisioningTester;
import com.yahoo.vespa.hosted.provision.testutils.MockDeployer;
+import com.yahoo.vespa.hosted.provision.testutils.MockHostProvisioner;
+import com.yahoo.vespa.hosted.provision.testutils.MockNameResolver;
import com.yahoo.vespa.model.builder.xml.dom.DomConfigPayloadBuilder;
import org.junit.Ignore;
import org.junit.Test;
@@ -37,20 +42,17 @@ import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.nio.file.Files;
import java.nio.file.Path;
-import java.nio.file.Paths;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
-import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Consumer;
import java.util.logging.Logger;
-import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.IntStream;
-import static com.yahoo.config.provision.NodeResources.DiskSpeed.any;
import static com.yahoo.config.provision.NodeResources.DiskSpeed.fast;
import static com.yahoo.config.provision.NodeResources.StorageType.local;
import static com.yahoo.config.provision.NodeResources.StorageType.remote;
@@ -75,21 +77,15 @@ public class RealDataScenarioTest {
@Ignore
@Test
public void test() {
- ProvisioningTester tester = new ProvisioningTester.Builder()
- .zone(new Zone(Cloud.builder().dynamicProvisioning(true).build(), SystemName.defaultSystem(), Environment.prod, RegionName.defaultName()))
- .flavorsConfig(parseFlavors(Paths.get("/tmp/node-flavors.xml")))
- .nameResolver(new DnsNameResolver())
- .spareCount(1)
- .build();
- initFromZk(tester.nodeRepository(), Paths.get("/tmp/snapshot"));
+ ProvisioningTester tester = tester(SystemName.Public, CloudName.AWS, Environment.prod, parseFlavors(Path.of("/tmp/node-flavors.xml")));
+ initFromZk(tester.nodeRepository(), Path.of("/tmp/snapshot"));
ApplicationId app = ApplicationId.from("tenant", "app", "default");
- Version version = Version.fromString("7.123.4");
+ Version version = Version.fromString("8.123.4");
Capacity[] capacities = new Capacity[]{
Capacity.from(new ClusterResources(1, 1, NodeResources.unspecified())),
- /** TODO: Change to NodeResources.unspecified() when {@link (com.yahoo.vespa.flags.Flags).DEDICATED_CLUSTER_CONTROLLER_FLAVOR} is gone */
- Capacity.from(new ClusterResources(3, 1, new NodeResources(0.25, 1.0, 10.0, 0.3, any))),
+ Capacity.from(new ClusterResources(3, 1, NodeResources.unspecified())),
Capacity.from(new ClusterResources(4, 1, new NodeResources(8, 16, 100, 0.3, fast, remote))),
Capacity.from(new ClusterResources(2, 1, new NodeResources(4, 8, 100, 0.3, fast, local)))
};
@@ -125,10 +121,13 @@ public class RealDataScenarioTest {
transaction.commit();
}
- private static FlavorsConfig parseFlavors(Path path) {
+ private static List<Flavor> parseFlavors(Path path) {
try {
var element = XmlHelper.getDocumentBuilder().parse(path.toFile()).getDocumentElement();
- return ConfigPayload.fromBuilder(new DomConfigPayloadBuilder(null).build(element)).toInstance(FlavorsConfig.class, "");
+ return ConfigPayload.fromBuilder(new DomConfigPayloadBuilder(null).build(element)).toInstance(FlavorsConfig.class, "")
+ .flavor().stream()
+ .map(Flavor::new)
+ .toList();
} catch (Exception e) {
throw new RuntimeException(e);
}
@@ -136,21 +135,18 @@ public class RealDataScenarioTest {
private static void initFromZk(NodeRepository nodeRepository, Path pathToZkSnapshot) {
NodeSerializer nodeSerializer = new NodeSerializer(nodeRepository.flavors(), 1000);
- AtomicReference<Node.State> state = new AtomicReference<>();
- Pattern zkNodePathPattern = Pattern.compile(".?/provision/v1/([a-z]+)/[a-z0-9.-]+\\.(com|cloud).?");
+ AtomicBoolean nodeNext = new AtomicBoolean(false);
+ Pattern zkNodePathPattern = Pattern.compile(".?/provision/v1/nodes/[a-z0-9.-]+\\.(com|cloud).?");
Consumer<String> consumer = input -> {
- if (state.get() != null) {
+ if (nodeNext.get()) {
String json = input.substring(input.indexOf("{\""), input.lastIndexOf('}') + 1);
Node node = nodeSerializer.fromJson(json.getBytes(UTF_8));
- nodeRepository.database().addNodesInState(List.of(node), state.get(), Agent.system);
- state.set(null);
+ nodeRepository.database().addNodesInState(List.of(node), node.state(), Agent.system);
+ nodeNext.set(false);
} else {
- Matcher matcher = zkNodePathPattern.matcher(input);
- if (!matcher.matches()) return;
- String stateStr = matcher.group(1);
- Node.State s = "deallocated".equals(stateStr) ? Node.State.inactive :
- "allocated".equals(stateStr) ? Node.State.active : Node.State.valueOf(stateStr);
- state.set(s);
+ if (!zkNodePathPattern.matcher(input).matches()) return;
+ if (nodeNext.getAndSet(true))
+ throw new IllegalStateException("Expected to find node JSON, but found another node path: " + input);
}
};
@@ -170,4 +166,18 @@ public class RealDataScenarioTest {
}
}
+ private static ProvisioningTester tester(SystemName systemName, CloudName cloudName, Environment environment, List<Flavor> flavors) {
+ Cloud cloud = Cloud.builder().name(cloudName).dynamicProvisioning(cloudName != CloudName.YAHOO).build();
+ NameResolver nameResolver = cloudName == CloudName.YAHOO ? new DnsNameResolver() : new MockNameResolver().mockAnyLookup();
+ ProvisioningTester.Builder builder = new ProvisioningTester.Builder()
+ .zone(new Zone(cloud, systemName, environment, RegionName.defaultName()))
+ .flavors(flavors)
+ .nameResolver(nameResolver)
+ .spareCount(environment.isProduction() && !cloud.dynamicProvisioning() && !systemName.isCd() ? 1 : 0);
+ if (cloud.dynamicProvisioning())
+ builder.hostProvisioner(new MockHostProvisioner(flavors, (MockNameResolver) nameResolver, 0));
+
+ return builder.build();
+ }
+
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java
index 36d0e464b3d..3d51c50f681 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java
@@ -61,7 +61,7 @@ public class AutoscalingTest {
fixture.loader().applyCpuLoad(0.7f, 10);
var scaledResources = fixture.tester().assertResources("Scaling up since resource usage is too high",
- 9, 1, 3.6, 7.7, 31.7,
+ 8, 1, 4.0, 9.3, 36.2,
fixture.autoscale());
fixture.deploy(Capacity.from(scaledResources));
@@ -83,7 +83,7 @@ public class AutoscalingTest {
fixture.tester().clock().advance(Duration.ofDays(7));
fixture.loader().applyCpuLoad(0.1f, 10);
fixture.tester().assertResources("Scaling cpu down since usage has gone down significantly",
- 8, 1, 1.0, 7.3, 22.1,
+ 7, 1, 1.1, 8.7, 25.4,
fixture.autoscale());
}
@@ -107,7 +107,7 @@ public class AutoscalingTest {
fixture.loader().applyLoad(new Load(0.1, 0.1, 0.1), 3);
fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0), 1);
fixture.tester().assertResources("Scaling up since resource usage is too high",
- 9, 1, 4.7, 14.8, 66.0,
+ 8, 1, 5.3, 17.5, 75.4,
fixture.autoscale());
}
@@ -167,7 +167,7 @@ public class AutoscalingTest {
var fixture = DynamicProvisioningTester.fixture().awsProdSetup(true).build();
fixture.loader().applyLoad(new Load(1.0, 0.1, 1.0), 10);
fixture.tester().assertResources("Scaling up (only) since resource usage is too high",
- 8, 1, 7.1, 8.8, 75.4,
+ 8, 1, 7.1, 9.3, 75.4,
fixture.autoscale());
}
@@ -199,7 +199,7 @@ public class AutoscalingTest {
fixture.loader().applyCpuLoad(0.70, 1);
fixture.loader().applyCpuLoad(0.01, 100);
fixture.tester().assertResources("Scaling up since peak resource usage is too high",
- 9, 1, 3.8, 7.7, 31.7,
+ 8, 1, 4.3, 9.3, 36.2,
fixture.autoscale());
}
@@ -210,7 +210,7 @@ public class AutoscalingTest {
fixture.loader().applyCpuLoad(0.70, 1);
fixture.loader().applyCpuLoad(0.01, 100);
fixture.tester().assertResources("Scaling up since peak resource usage is too high",
- 10, 1, 4, 8.0, 22.7,
+ 9, 1, 4, 16.0, 25.5,
fixture.autoscale());
}
@@ -221,7 +221,7 @@ public class AutoscalingTest {
fixture.loader().applyCpuLoad(0.70, 1);
fixture.loader().applyCpuLoad(0.01, 100);
fixture.tester().assertResources("Scaling up since peak resource usage is too high",
- 9, 1, 3.8, 8.0, 37.5,
+ 8, 1, 4.3, 9.7, 42.9,
fixture.autoscale());
}
@@ -283,7 +283,7 @@ public class AutoscalingTest {
new NodeResources(100, 1000, 1000, 1, DiskSpeed.any));
var capacity = Capacity.from(min, max);
ClusterResources scaledResources = fixture.tester().assertResources("Scaling up",
- 13, 1, 1.5, 26.7, 26.7,
+ 13, 1, 1.5, 29.1, 26.7,
fixture.autoscale(capacity));
assertEquals("Disk speed from new capacity is used",
DiskSpeed.any, scaledResources.nodeResources().diskSpeed());
@@ -401,7 +401,7 @@ public class AutoscalingTest {
fixture.tester().clock().advance(Duration.ofDays(2));
fixture.loader().applyCpuLoad(0.4, 240);
fixture.tester().assertResources("Scaling cpu up",
- 8, 4, 4.6, 4.0, 10.0,
+ 8, 4, 4.6, 4.2, 10.0,
fixture.autoscale());
}
@@ -446,7 +446,7 @@ public class AutoscalingTest {
fixture.tester().clock().advance(Duration.ofDays(2));
fixture.loader().applyCpuLoad(1.0, 120);
fixture.tester().assertResources("Suggesting above capacity limit",
- 8, 1, 6.2, 7.0, 29.0,
+ 8, 1, 6.2, 7.4, 29.0,
fixture.tester().suggest(fixture.applicationId, fixture.clusterSpec.id(), min, min));
}
@@ -492,7 +492,7 @@ public class AutoscalingTest {
fixture.tester().clock().advance(Duration.ofDays(2));
fixture.loader().applyCpuLoad(0.9, 120);
fixture.tester().assertResources("Scaling up to 2 nodes, scaling memory and disk down at the same time",
- 10, 5, 7.7, 39.3, 38.5,
+ 10, 5, 7.7, 41.5, 38.5,
fixture.autoscale());
}
@@ -528,7 +528,7 @@ public class AutoscalingTest {
fixture.tester().clock().advance(timePassed.negated());
fixture.loader().addLoadMeasurements(10, t -> t == 0 ? 200.0 : 100.0, t -> 10.0);
fixture.tester().assertResources("Scaling up cpu, others down, changing to 1 group is cheaper",
- 9, 1, 2.5, 30.7, 30.1,
+ 7, 1, 3.2, 43.3, 40.1,
fixture.autoscale());
}
@@ -548,7 +548,7 @@ public class AutoscalingTest {
fixture.tester().clock().advance(timePassed.negated());
fixture.loader().addLoadMeasurements(10, t -> t == 0 ? 20.0 : 10.0, t -> 100.0);
fixture.tester().assertResources("Scaling down since resource usage is too high, changing to 1 group is cheaper",
- 6, 1, 1.0, 49.1, 48.1,
+ 5, 1, 1.0, 62.6, 60.1,
fixture.autoscale());
}
@@ -565,7 +565,7 @@ public class AutoscalingTest {
fixture.tester().clock().advance(Duration.ofDays(1));
fixture.loader().applyMemLoad(1.0, 1000);
fixture.tester().assertResources("Increase group size to reduce memory load",
- 8, 2, 13.9, 94.5, 60.1,
+ 8, 2, 13.9, 96.3, 60.1,
fixture.autoscale());
}
@@ -594,7 +594,7 @@ public class AutoscalingTest {
fixture.tester().clock().advance(Duration.ofHours(12 * 3 + 1));
fixture.loader().applyCpuLoad(0.02, 120);
fixture.tester().assertResources("Scaling down since enough time has passed",
- 3, 1, 1.0, 24.6, 101.4,
+ 3, 1, 1.0, 23.6, 101.4,
fixture.autoscale());
}
@@ -637,8 +637,8 @@ public class AutoscalingTest {
fixture.tester.clock().advance(timeAdded.negated());
fixture.loader().addCpuMeasurements(0.25, 200);
- fixture.tester().assertResources("Scale up since we assume we need 2x cpu for growth when no data scaling time data",
- 10, 1, 1.2, 5.5, 22.5,
+ fixture.tester().assertResources("Scale up since we assume we need 2x cpu for growth when no scaling time data",
+ 8, 1, 1.6, 7.4, 29.0,
fixture.autoscale());
fixture.setScalingDuration(Duration.ofMinutes(5));
@@ -647,7 +647,7 @@ public class AutoscalingTest {
fixture.tester.clock().advance(timeAdded.negated());
fixture.loader().addCpuMeasurements(0.25, 200);
fixture.tester().assertResources("Scale down since observed growth is slower than scaling time",
- 10, 1, 1.0, 5.5, 22.5,
+ 8, 1, 1.2, 7.4, 29.0,
fixture.autoscale());
fixture.setScalingDuration(Duration.ofMinutes(60));
@@ -658,7 +658,7 @@ public class AutoscalingTest {
fixture.tester.clock().advance(timeAdded.negated());
fixture.loader().addCpuMeasurements(0.25, 200);
fixture.tester().assertResources("Scale up since observed growth is faster than scaling time",
- 9, 1, 1.4, 6.1, 25.3,
+ 8, 1, 1.5, 7.4, 29.0,
fixture.autoscale());
}
@@ -670,12 +670,12 @@ public class AutoscalingTest {
fixture.setScalingDuration(Duration.ofMinutes(60));
fixture.tester().clock().advance(Duration.ofDays(2));
Duration timeAdded = fixture.loader().addLoadMeasurements(100,
- t -> scalingFactor * (100.0 + (t < 50 ? t * t * t : 125000 - (t - 49) * (t - 49) * (t - 49))),
+ t -> scalingFactor * (100.0 + (t < 50 ? t * t * t : 155000 - (t - 49) * (t - 49) * (t - 49))),
t -> 0.0);
fixture.tester.clock().advance(timeAdded.negated());
fixture.loader().addCpuMeasurements(0.7, 200);
fixture.tester().assertResources("Scale up slightly since observed growth is faster than scaling time, but we are not confident",
- 10, 1, 1.0, 5.5, 22.5,
+ 8, 1, 1.3, 7.4, 29.0,
fixture.autoscale());
}
@@ -693,7 +693,7 @@ public class AutoscalingTest {
fixture.tester.clock().advance(timeAdded.negated());
fixture.loader().addCpuMeasurements(0.4, 200);
fixture.tester.assertResources("Query and write load is equal -> scale up somewhat",
- 10, 1, 1.4, 5.5, 22.5,
+ 8, 1, 1.8, 7.4, 29.0,
fixture.autoscale());
fixture.tester().clock().advance(Duration.ofDays(2));
@@ -702,7 +702,7 @@ public class AutoscalingTest {
fixture.loader().addCpuMeasurements(0.4, 200);
// TODO: Ackhually, we scale down here - why?
fixture.tester().assertResources("Query load is 4x write load -> scale up more",
- 10, 1, 1.3, 5.5, 22.5,
+ 8, 1, 1.4, 7.4, 29.0,
fixture.autoscale());
fixture.tester().clock().advance(Duration.ofDays(2));
@@ -710,7 +710,7 @@ public class AutoscalingTest {
fixture.tester.clock().advance(timeAdded.negated());
fixture.loader().addCpuMeasurements(0.4, 200);
fixture.tester().assertResources("Write load is 10x query load -> scale down",
- 6, 1, 1.1, 9.8, 40.5,
+ 6, 1, 1.1, 10.0, 40.5,
fixture.autoscale());
fixture.tester().clock().advance(Duration.ofDays(2));
@@ -718,7 +718,7 @@ public class AutoscalingTest {
fixture.tester.clock().advance(timeAdded.negated());
fixture.loader().addCpuMeasurements(0.4, 200);
fixture.tester().assertResources("Query only -> largest possible",
- 9, 1, 2.7, 6.1, 25.3,
+ 8, 1, 2.5, 7.4, 29.0,
fixture.autoscale());
fixture.tester().clock().advance(Duration.ofDays(2));
@@ -726,7 +726,7 @@ public class AutoscalingTest {
fixture.tester.clock().advance(timeAdded.negated());
fixture.loader().addCpuMeasurements(0.4, 200);
fixture.tester().assertResources("Write only -> smallest possible",
- 4, 1, 1.1, 16.4, 67.6,
+ 4, 1, 1.1, 16.1, 67.6,
fixture.autoscale());
}
@@ -781,7 +781,7 @@ public class AutoscalingTest {
fixture.tester().clock().advance(Duration.ofDays(2));
fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0), 200);
fixture.tester().assertResources("We scale even in dev because resources are 'required'",
- 3, 1, 1.0, 12.3, 62.5,
+ 3, 1, 1.0, 13.4, 62.5,
fixture.autoscale());
}
@@ -851,7 +851,7 @@ public class AutoscalingTest {
fixture.loader().applyLoad(new Load(0.06, 0.52, 0.27), 100);
var autoscaling = fixture.autoscale();
fixture.tester().assertResources("Scaling down",
- 7, 1, 2, 14.7, 384.0,
+ 7, 1, 2, 14.5, 384.0,
autoscaling);
fixture.deploy(Capacity.from(autoscaling.resources().get()));
assertEquals("Initial nodes are kept", initialNodes, fixture.nodes().asList());
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingUsingBcpGroupInfoTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingUsingBcpGroupInfoTest.java
index 704491ed44f..ae40795d783 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingUsingBcpGroupInfoTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingUsingBcpGroupInfoTest.java
@@ -32,7 +32,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.store(new BcpGroupInfo(100, 1.1, 0.3));
fixture.loader().addCpuMeasurements(0.7f, 10);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 9, 1, 3.6, 6.1, 25.3,
+ 8, 1, 4.0, 7.4, 29.0,
fixture.autoscale());
// Higher query rate
@@ -40,7 +40,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.store(new BcpGroupInfo(200, 1.1, 0.3));
fixture.loader().addCpuMeasurements(0.7f, 10);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 9, 1, 7.1, 6.1, 25.3,
+ 8, 1, 8.0, 7.4, 29.0,
fixture.autoscale());
// Higher headroom
@@ -48,7 +48,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.store(new BcpGroupInfo(100, 1.3, 0.3));
fixture.loader().addCpuMeasurements(0.7f, 10);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 9, 1, 4.2, 6.1, 25.3,
+ 8, 1, 4.8, 7.4, 29.0,
fixture.autoscale());
// Higher per query cost
@@ -56,7 +56,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.store(new BcpGroupInfo(100, 1.1, 0.45));
fixture.loader().addCpuMeasurements(0.7f, 10);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 9, 1, 5.4, 6.1, 25.3,
+ 8, 1, 6.0, 7.4, 29.0,
fixture.autoscale());
// Bcp elsewhere is 0 - use local only
@@ -64,7 +64,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.store(new BcpGroupInfo(0, 1.1, 0.45));
fixture.loader().addCpuMeasurements(0.7f, 10);
fixture.tester().assertResources("Scaling using local info",
- 8, 1, 1, 7.0, 29.0,
+ 8, 1, 1, 7.4, 29.0,
fixture.autoscale());
}
@@ -85,7 +85,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.store(new BcpGroupInfo(100, 1.1, 0.3));
fixture.loader().addCpuMeasurements(0.7f, 10);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 3, 3, 10.5, 41.0, 168.9,
+ 3, 3, 10.5, 38.4, 168.9,
fixture.autoscale());
// Higher query rate
@@ -93,7 +93,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.store(new BcpGroupInfo(200, 1.1, 0.3));
fixture.loader().addCpuMeasurements(0.7f, 10);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 3, 3, 20.9, 41.0, 168.9,
+ 3, 3, 20.9, 38.4, 168.9,
fixture.autoscale());
// Higher headroom
@@ -101,7 +101,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.store(new BcpGroupInfo(100, 1.3, 0.3));
fixture.loader().addCpuMeasurements(0.7f, 10);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 3, 3, 12.4, 41.0, 168.9,
+ 3, 3, 12.4, 38.4, 168.9,
fixture.autoscale());
// Higher per query cost
@@ -109,7 +109,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.store(new BcpGroupInfo(100, 1.1, 0.45));
fixture.loader().addCpuMeasurements(0.7f, 10);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 3, 3, 15.7, 41.0, 168.9,
+ 3, 3, 15.7, 38.4, 168.9,
fixture.autoscale());
}
@@ -186,7 +186,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.store(new BcpGroupInfo(200, 1.3, 0.45));
fixture.loader().addCpuMeasurements(0.7f, 10);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 8, 1, 14.2, 7.0, 29.0,
+ 8, 1, 14.2, 7.4, 29.0,
fixture.autoscale());
// Some local traffic
@@ -196,7 +196,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.tester().clock().advance(duration1.negated());
fixture.loader().addQueryRateMeasurements(10, __ -> 10.0);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 8, 1, 6.9, 7.0, 29.0,
+ 8, 1, 6.9, 7.4, 29.0,
fixture.autoscale());
// Enough local traffic to get half the votes
@@ -206,7 +206,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.tester().clock().advance(duration2.negated());
fixture.loader().addQueryRateMeasurements(10, __ -> 50.0);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 9, 1, 2.7, 6.1, 25.3,
+ 8, 1, 3.0, 7.4, 29.0,
fixture.autoscale());
// Mostly local
@@ -216,7 +216,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.tester().clock().advance(duration3.negated());
fixture.loader().addQueryRateMeasurements(10, __ -> 90.0);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 9, 1, 2.1, 6.1, 25.3,
+ 8, 1, 2.3, 7.4, 29.0,
fixture.autoscale());
// Local only
@@ -226,7 +226,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.tester().clock().advance(duration4.negated());
fixture.loader().addQueryRateMeasurements(10, __ -> 100.0);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 9, 1, 2.0, 6.1, 25.3,
+ 8, 1, 2.2, 7.4, 29.0,
fixture.autoscale());
// No group info, should be the same as the above
@@ -236,7 +236,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.tester().clock().advance(duration5.negated());
fixture.loader().addQueryRateMeasurements(10, __ -> 100.0);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 9, 1, 2.0, 6.1, 25.3,
+ 8, 1, 2.2, 7.4, 29.0,
fixture.autoscale());
// 40 query rate, no group info (for reference to the below)
@@ -246,7 +246,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.tester().clock().advance(duration6.negated());
fixture.loader().addQueryRateMeasurements(10, __ -> 40.0);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 9, 1, 1.4, 6.1, 25.3,
+ 8, 1, 1.6, 7.4, 29.0,
fixture.autoscale());
// Local query rate is too low but global is even lower so disregard it, giving the same as above
@@ -256,7 +256,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.tester().clock().advance(duration7.negated());
fixture.loader().addQueryRateMeasurements(10, __ -> 40.0);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 9, 1, 1.4, 6.1, 25.3,
+ 8, 1, 1.6, 7.4, 29.0,
fixture.autoscale());
// Local query rate is too low to be fully confident, and so is global but as it is slightly larger, incorporate it slightly
@@ -266,7 +266,7 @@ public class AutoscalingUsingBcpGroupInfoTest {
fixture.tester().clock().advance(duration8.negated());
fixture.loader().addQueryRateMeasurements(10, __ -> 40.0);
fixture.tester().assertResources("Scaling up cpu using bcp group cpu info",
- 9, 1, 1.8, 6.1, 25.3,
+ 8, 1, 1.9, 7.4, 29.0,
fixture.autoscale());
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModelTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModelTest.java
index ed00134af55..ec084014a6a 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModelTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModelTest.java
@@ -5,12 +5,17 @@ import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.Capacity;
import com.yahoo.config.provision.ClusterResources;
import com.yahoo.config.provision.ClusterSpec;
+import com.yahoo.config.provision.NodeFlavors;
import com.yahoo.config.provision.NodeResources;
import com.yahoo.config.provision.Zone;
import com.yahoo.test.ManualClock;
+import com.yahoo.vespa.curator.mock.MockCurator;
+import com.yahoo.vespa.hosted.provision.NodeRepository;
import com.yahoo.vespa.hosted.provision.applications.Application;
import com.yahoo.vespa.hosted.provision.applications.Cluster;
import com.yahoo.vespa.hosted.provision.applications.Status;
+import com.yahoo.vespa.hosted.provision.provisioning.ProvisioningTester;
+import com.yahoo.vespa.hosted.provision.testutils.MockNodeRepository;
import org.junit.Test;
import java.time.Duration;
@@ -84,12 +89,11 @@ public class ClusterModelTest {
private ClusterModel clusterModel(Status status, IntFunction<Double> queryRate, IntFunction<Double> writeRate) {
ManualClock clock = new ManualClock();
- Zone zone = Zone.defaultZone();
Application application = Application.empty(ApplicationId.from("t1", "a1", "i1"));
ClusterSpec clusterSpec = clusterSpec();
Cluster cluster = cluster(resources());
application = application.with(cluster);
- return new ClusterModel(zone,
+ return new ClusterModel(new ProvisioningTester.Builder().build().nodeRepository(),
application.with(status),
clusterSpec, cluster, clock, Duration.ofMinutes(10),
timeseries(cluster,100, queryRate, writeRate, clock),
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/Fixture.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/Fixture.java
index 5d1fd58489b..b150b372fe8 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/Fixture.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/Fixture.java
@@ -10,10 +10,12 @@ import com.yahoo.config.provision.ClusterResources;
import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.Flavor;
+import com.yahoo.config.provision.NodeFlavors;
import com.yahoo.config.provision.NodeResources;
import com.yahoo.config.provision.RegionName;
import com.yahoo.config.provision.SystemName;
import com.yahoo.config.provision.Zone;
+import com.yahoo.vespa.curator.mock.MockCurator;
import com.yahoo.vespa.flags.InMemoryFlagSource;
import com.yahoo.vespa.flags.PermanentFlags;
import com.yahoo.vespa.flags.custom.HostResources;
@@ -27,6 +29,8 @@ import com.yahoo.vespa.hosted.provision.autoscale.awsnodes.AwsHostResourcesCalcu
import com.yahoo.vespa.hosted.provision.autoscale.awsnodes.AwsNodeTypes;
import com.yahoo.vespa.hosted.provision.provisioning.DynamicProvisioningTester;
import com.yahoo.vespa.hosted.provision.provisioning.HostResourcesCalculator;
+import com.yahoo.vespa.hosted.provision.testutils.MockNodeRepository;
+
import java.time.Duration;
import java.util.Arrays;
import java.util.List;
@@ -40,14 +44,12 @@ import java.util.Optional;
public class Fixture {
final DynamicProvisioningTester tester;
- final Zone zone;
final ApplicationId applicationId;
final ClusterSpec clusterSpec;
final Capacity capacity;
final Loader loader;
public Fixture(Fixture.Builder builder, Optional<ClusterResources> initialResources, int hostCount) {
- zone = builder.zone;
applicationId = builder.application;
clusterSpec = builder.cluster;
capacity = builder.capacity;
@@ -80,7 +82,7 @@ public class Fixture {
public Capacity capacity() { return capacity; }
public ClusterModel clusterModel() {
- return new ClusterModel(zone,
+ return new ClusterModel(tester.nodeRepository(),
application(),
clusterSpec,
cluster(),
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/AutoscalingMaintainerTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/AutoscalingMaintainerTest.java
index d75f51680d7..3c459871490 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/AutoscalingMaintainerTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/AutoscalingMaintainerTest.java
@@ -154,10 +154,10 @@ public class AutoscalingMaintainerTest {
@Test
public void test_toString() {
- assertEquals("4 nodes with [vcpu: 1.0, memory: 2.0 Gb, disk 4.0 Gb, bandwidth: 1.0 Gbps, architecture: any] (total: [vcpu: 4.0, memory: 8.0 Gb, disk 16.0 Gb, bandwidth: 4.0 Gbps, architecture: any])",
+ assertEquals("4 nodes with [vcpu: 1.0, memory: 2.0 Gb, disk: 4.0 Gb, bandwidth: 1.0 Gbps, architecture: any] (total: [vcpu: 4.0, memory: 8.0 Gb, disk: 16.0 Gb, bandwidth: 4.0 Gbps, architecture: any])",
AutoscalingMaintainer.toString(new ClusterResources(4, 1, new NodeResources(1, 2, 4, 1))));
- assertEquals("4 nodes (in 2 groups) with [vcpu: 1.0, memory: 2.0 Gb, disk 4.0 Gb, bandwidth: 1.0 Gbps, architecture: any] (total: [vcpu: 4.0, memory: 8.0 Gb, disk 16.0 Gb, bandwidth: 4.0 Gbps, architecture: any])",
+ assertEquals("4 nodes (in 2 groups) with [vcpu: 1.0, memory: 2.0 Gb, disk: 4.0 Gb, bandwidth: 1.0 Gbps, architecture: any] (total: [vcpu: 4.0, memory: 8.0 Gb, disk: 16.0 Gb, bandwidth: 4.0 Gbps, architecture: any])",
AutoscalingMaintainer.toString(new ClusterResources(4, 2, new NodeResources(1, 2, 4, 1))));
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/CapacityCheckerTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/CapacityCheckerTest.java
index 51522304350..51b3bb99f4c 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/CapacityCheckerTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/CapacityCheckerTest.java
@@ -29,7 +29,7 @@ public class CapacityCheckerTest {
var failurePath = tester.capacityChecker.worstCaseHostLossLeadingToFailure();
assertTrue(failurePath.isPresent());
assertTrue(tester.nodeRepository.nodes().list().nodeType(NodeType.host).asList().containsAll(failurePath.get().hostsCausingFailure));
- assertEquals(5, failurePath.get().hostsCausingFailure.size());
+ assertEquals(4, failurePath.get().hostsCausingFailure.size());
}
@Test
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/DeprovisionedExpirerTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/DeprovisionedExpirerTest.java
new file mode 100644
index 00000000000..4100fe39eca
--- /dev/null
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/DeprovisionedExpirerTest.java
@@ -0,0 +1,56 @@
+package com.yahoo.vespa.hosted.provision.maintenance;
+
+import com.yahoo.config.provision.NodeFlavors;
+import com.yahoo.config.provision.NodeResources;
+import com.yahoo.vespa.hosted.provision.Node;
+import com.yahoo.vespa.hosted.provision.NodeList;
+import com.yahoo.vespa.hosted.provision.node.Agent;
+import com.yahoo.vespa.hosted.provision.provisioning.FlavorConfigBuilder;
+import com.yahoo.vespa.hosted.provision.provisioning.ProvisioningTester;
+import com.yahoo.vespa.hosted.provision.testutils.MockHostProvisioner;
+import org.junit.jupiter.api.Test;
+
+import java.time.Duration;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
+
+/**
+ * @author mpolden
+ */
+class DeprovisionedExpirerTest {
+
+ private final NodeFlavors flavors = FlavorConfigBuilder.createDummies("host");
+ private final ProvisioningTester tester = new ProvisioningTester.Builder().dynamicProvisioning()
+ .flavors(flavors.getFlavors())
+ .hostProvisioner(new MockHostProvisioner(flavors.getFlavors()))
+ .build();
+ private final DeprovisionedExpirer expirer = new DeprovisionedExpirer(tester.nodeRepository(), Duration.ofDays(30),
+ new TestMetric());
+
+ @Test
+ public void maintain() {
+ tester.makeReadyHosts(1, new NodeResources(2,4,8,1))
+ .activateTenantHosts();
+ NodeList hosts = tester.nodeRepository().nodes().list().state(Node.State.active);
+ assertEquals(1, hosts.size());
+
+ // Remove host
+ String hostname = hosts.first().get().hostname();
+ tester.nodeRepository().nodes().park(hostname, false, Agent.system, getClass().getSimpleName());
+ tester.nodeRepository().nodes().removeRecursively(hostname);
+ assertSame(Node.State.deprovisioned, tester.node(hostname).state());
+
+ // Host is not removed until expiry passes
+ assertExpiredAfter(Duration.ZERO, false, hostname);
+ assertExpiredAfter(Duration.ofDays(15), false, hostname);
+ assertExpiredAfter(Duration.ofDays(15), true, hostname);
+ }
+
+ private void assertExpiredAfter(Duration duration, boolean expired, String hostname) {
+ tester.clock().advance(duration);
+ expirer.maintain();
+ assertEquals(expired, tester.nodeRepository().nodes().node(hostname).isEmpty());
+ }
+
+}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/DirtyExpirerTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/DirtyExpirerTest.java
index ac20b9164f8..ddd7413567a 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/DirtyExpirerTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/DirtyExpirerTest.java
@@ -2,15 +2,10 @@
package com.yahoo.vespa.hosted.provision.maintenance;
import com.yahoo.component.Version;
-import com.yahoo.config.provision.Cloud;
import com.yahoo.config.provision.ClusterMembership;
-import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.Flavor;
import com.yahoo.config.provision.NodeResources;
import com.yahoo.config.provision.NodeType;
-import com.yahoo.config.provision.RegionName;
-import com.yahoo.config.provision.SystemName;
-import com.yahoo.config.provision.Zone;
import com.yahoo.vespa.hosted.provision.Node;
import com.yahoo.vespa.hosted.provision.node.Agent;
import com.yahoo.vespa.hosted.provision.node.Allocation;
@@ -37,8 +32,8 @@ public class DirtyExpirerTest {
}
private void assertAllocationAfterExpiry(boolean dynamicProvisioning) {
- Zone zone = new Zone(Cloud.builder().dynamicProvisioning(dynamicProvisioning).build(), SystemName.main, Environment.prod, RegionName.from("us-east"));
- ProvisioningTester tester = new ProvisioningTester.Builder().zone(zone)
+ ProvisioningTester tester = new ProvisioningTester.Builder()
+ .dynamicProvisioning(dynamicProvisioning, true)
.hostProvisioner(dynamicProvisioning ? new MockHostProvisioner(List.of()) : null)
.build();
@@ -65,4 +60,4 @@ public class DirtyExpirerTest {
assertEquals(dynamicProvisioning, tester.nodeRepository().nodes().list().first().get().status().wantToDeprovision());
}
-} \ No newline at end of file
+}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostCapacityMaintainerTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostCapacityMaintainerTest.java
index 7f5bb79b20c..ead94663807 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostCapacityMaintainerTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostCapacityMaintainerTest.java
@@ -21,11 +21,14 @@ import com.yahoo.config.provision.NodeType;
import com.yahoo.config.provision.RegionName;
import com.yahoo.config.provision.SystemName;
import com.yahoo.config.provision.Zone;
+import com.yahoo.docproc.jdisc.metric.NullMetric;
import com.yahoo.net.HostName;
+import com.yahoo.test.ManualClock;
import com.yahoo.vespa.flags.InMemoryFlagSource;
import com.yahoo.vespa.flags.PermanentFlags;
import com.yahoo.vespa.flags.custom.ClusterCapacity;
import com.yahoo.vespa.hosted.provision.Node;
+import com.yahoo.vespa.hosted.provision.Node.State;
import com.yahoo.vespa.hosted.provision.NodeList;
import com.yahoo.vespa.hosted.provision.NodeRepository;
import com.yahoo.vespa.hosted.provision.node.Agent;
@@ -37,6 +40,7 @@ import com.yahoo.vespa.hosted.provision.provisioning.FlavorConfigBuilder;
import com.yahoo.vespa.hosted.provision.provisioning.InfraDeployerImpl;
import com.yahoo.vespa.hosted.provision.provisioning.ProvisionedHost;
import com.yahoo.vespa.hosted.provision.provisioning.ProvisioningTester;
+import com.yahoo.vespa.hosted.provision.testutils.MockDeployer;
import com.yahoo.vespa.hosted.provision.testutils.MockDuperModel;
import com.yahoo.vespa.hosted.provision.testutils.MockHostProvisioner;
import com.yahoo.vespa.hosted.provision.testutils.MockNameResolver;
@@ -50,6 +54,7 @@ import org.junit.Test;
import java.time.Duration;
import java.time.Instant;
+import java.time.temporal.ChronoUnit;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
@@ -60,6 +65,7 @@ import java.util.stream.Stream;
import static com.yahoo.vespa.hosted.provision.testutils.MockHostProvisioner.Behaviour;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -77,7 +83,7 @@ public class HostCapacityMaintainerTest {
assertTrue(tester.nodeRepository.nodes().node("host3").isPresent());
tester.maintain();
- assertTrue(tester.nodeRepository.nodes().node("host2").isEmpty());
+ assertSame(State.deprovisioned, tester.nodeRepository.nodes().node("host2").get().state());
}
@Test
@@ -88,7 +94,7 @@ public class HostCapacityMaintainerTest {
assertTrue(failedHost.isPresent());
tester.maintain();
- assertTrue("Failed host is deprovisioned", tester.nodeRepository.nodes().node(failedHost.get().hostname()).isEmpty());
+ assertSame("Failed host is deprovisioned", State.deprovisioned, tester.nodeRepository.nodes().node(failedHost.get().hostname()).get().state());
assertEquals(1, tester.hostProvisioner.deprovisionedHosts());
}
@@ -112,9 +118,9 @@ public class HostCapacityMaintainerTest {
assertEquals(2, tester.hostProvisioner.provisionedHosts().size());
assertEquals(2, tester.provisionedHostsMatching(new NodeResources(48, 128, 1000, 10)));
- NodeList nodesAfter = tester.nodeRepository.nodes().list();
+ NodeList nodesAfter = tester.nodeRepository.nodes().list().not().state(State.deprovisioned);
assertEquals(9, nodesAfter.size()); // 2 removed, 2 added
- assertTrue("Failed host 'host2' is deprovisioned", tester.nodeRepository.nodes().node("host2").isEmpty());
+ assertSame("Failed host 'host2' is deprovisioned", State.deprovisioned, tester.nodeRepository.nodes().node("host2").get().state());
assertTrue("Node on deprovisioned host removed", tester.nodeRepository.nodes().node("host2-1").isEmpty());
assertTrue("Host satisfying 16-24-100-1 is kept", tester.nodeRepository.nodes().node("host3").isPresent());
assertTrue("New 48-128-1000-10 host added", tester.nodeRepository.nodes().node("host100").isPresent());
@@ -171,8 +177,8 @@ public class HostCapacityMaintainerTest {
assertEquals(2, tester.hostProvisioner.provisionedHosts().size());
assertEquals(2, tester.provisionedHostsMatching(new NodeResources(48, 128, 1000, 10)));
- assertEquals(8, tester.nodeRepository.nodes().list().size()); // 3 removed, 2 added
- assertTrue("preprovision capacity is prefered on shared hosts", tester.nodeRepository.nodes().node("host3").isEmpty());
+ assertEquals(8, tester.nodeRepository.nodes().list().not().state(State.deprovisioned).size()); // 3 removed, 2 added
+ assertSame("preprovision capacity is prefered on shared hosts", State.deprovisioned, tester.nodeRepository.nodes().node("host3").get().state());
assertTrue(tester.nodeRepository.nodes().node("host100").isPresent());
assertTrue(tester.nodeRepository.nodes().node("host101").isPresent());
@@ -187,13 +193,13 @@ public class HostCapacityMaintainerTest {
assertEquals("one provisioned host has been deprovisioned, so there are 2 -> 1 provisioned hosts",
1, tester.hostProvisioner.provisionedHosts().size());
assertEquals(1, tester.provisionedHostsMatching(new NodeResources(48, 128, 1000, 10)));
- assertEquals(7, tester.nodeRepository.nodes().list().size()); // 4 removed, 2 added
+ assertEquals(7, tester.nodeRepository.nodes().list().not().state(State.deprovisioned).size()); // 4 removed, 2 added
if (tester.nodeRepository.nodes().node("host100").isPresent()) {
- assertTrue("host101 is superfluous and should have been deprovisioned",
- tester.nodeRepository.nodes().node("host101").isEmpty());
+ assertSame("host101 is superfluous and should have been deprovisioned", State.deprovisioned,
+ tester.nodeRepository.nodes().node("host101").get().state());
} else {
assertTrue("host101 is required for preprovision capacity",
- tester.nodeRepository.nodes().node("host101").isPresent());
+ tester.nodeRepository.nodes().node("host101").isPresent());
}
}
@@ -201,8 +207,8 @@ public class HostCapacityMaintainerTest {
private void verifyFirstMaintain(DynamicProvisioningTester tester) {
assertEquals(1, tester.hostProvisioner.provisionedHosts().size());
assertEquals(1, tester.provisionedHostsMatching(new NodeResources(48, 128, 1000, 10)));
- assertEquals(8, tester.nodeRepository.nodes().list().size()); // 2 removed, 1 added
- assertTrue("Failed host 'host2' is deprovisioned", tester.nodeRepository.nodes().node("host2").isEmpty());
+ assertEquals(8, tester.nodeRepository.nodes().list().not().state(State.deprovisioned).size()); // 2 removed, 1 added
+ assertSame("Failed host 'host2' is deprovisioned", State.deprovisioned, tester.nodeRepository.nodes().node("host2").get().state());
assertTrue("Node on deprovisioned host removed", tester.nodeRepository.nodes().node("host2-1").isEmpty());
assertTrue("One 1-30-20-3 node fits on host3", tester.nodeRepository.nodes().node("host3").isPresent());
assertTrue("New 48-128-1000-10 host added", tester.nodeRepository.nodes().node("host100").isPresent());
@@ -384,7 +390,7 @@ public class HostCapacityMaintainerTest {
tester.prepareAndActivateInfraApplication(configSrvApp, hostType.childNodeType());
// Expected number of hosts and children are provisioned
- NodeList allNodes = tester.nodeRepository().nodes().list();
+ NodeList allNodes = tester.nodeRepository().nodes().list().not().state(State.deprovisioned);
NodeList configHosts = allNodes.nodeType(hostType);
NodeList configNodes = allNodes.nodeType(hostType.childNodeType());
assertEquals(3, configHosts.size());
@@ -421,7 +427,7 @@ public class HostCapacityMaintainerTest {
// Host and child is removed
dynamicProvisioningTester.maintain();
- allNodes = tester.nodeRepository().nodes().list();
+ allNodes = tester.nodeRepository().nodes().list().not().state(State.deprovisioned);
assertEquals(2, allNodes.nodeType(hostType).size());
assertEquals(2, allNodes.nodeType(hostType.childNodeType()).size());
@@ -497,15 +503,101 @@ public class HostCapacityMaintainerTest {
}
@Test
+ public void deprovision_node_when_no_allocation_and_past_TTL() {
+ var tester = new DynamicProvisioningTester();
+ ManualClock clock = (ManualClock) tester.nodeRepository.clock();
+ tester.hostProvisioner.with(Behaviour.failProvisioning);
+ tester.provisioningTester.makeReadyHosts(2, new NodeResources(1, 1, 1, 1)).activateTenantHosts();
+ List<Node> hosts = tester.nodeRepository.nodes().list(Node.State.active).asList();
+ Node host1 = hosts.get(0);
+ Node host2 = hosts.get(1);
+ tester.nodeRepository.nodes().write(host1.withHostTTL(Duration.ofDays(1)), () -> { });
+ tester.nodeRepository.nodes().write(host2.withHostTTL(Duration.ofHours(1)), () -> { });
+ Node host11 = tester.addNode("host1-1", Optional.of(host1.hostname()), NodeType.tenant, State.active, DynamicProvisioningTester.tenantApp);
+
+ // Host is not marked for deprovisioning by maintainer, because child is present
+ tester.maintain();
+ assertFalse(tester.nodeRepository.nodes().node(host1.hostname()).get().status().wantToDeprovision());
+ assertEquals(Optional.empty(), tester.nodeRepository.nodes().node(host1.hostname()).get().hostEmptyAt());
+
+ // Child is set to deprovision, but turns active
+ tester.nodeRepository.nodes().park(host11.hostname(), true, Agent.operator, "not good");
+ tester.nodeRepository.nodes().reactivate(host11.hostname(), Agent.operator, "all good");
+ assertTrue(tester.nodeRepository.nodes().node(host11.hostname()).get().status().wantToDeprovision());
+ assertEquals(State.active, tester.nodeRepository.nodes().node(host11.hostname()).get().state());
+ tester.maintain();
+ assertFalse(tester.nodeRepository.nodes().node(host1.hostname()).get().status().wantToDeprovision());
+ assertEquals(Optional.empty(), tester.nodeRepository.nodes().node(host1.hostname()).get().hostEmptyAt());
+
+ // Child is parked, to make the host effectively empty
+ tester.nodeRepository.nodes().park(host11.hostname(), true, Agent.operator, "not good");
+ tester.maintain();
+ assertFalse(tester.nodeRepository.nodes().node(host1.hostname()).get().status().wantToDeprovision());
+ assertEquals(Optional.of(clock.instant().truncatedTo(ChronoUnit.MILLIS)),
+ tester.nodeRepository.nodes().node(host1.hostname()).get().hostEmptyAt());
+
+ // Some time passes, but not enough for host1 to be deprovisioned
+ clock.advance(Duration.ofDays(1).minusSeconds(1));
+ tester.maintain();
+ assertFalse(tester.nodeRepository.nodes().node(host1.hostname()).get().status().wantToDeprovision());
+ assertEquals(Optional.of(clock.instant().minus(Duration.ofDays(1).minusSeconds(1)).truncatedTo(ChronoUnit.MILLIS)),
+ tester.nodeRepository.nodes().node(host1.hostname()).get().hostEmptyAt());
+ assertTrue(tester.nodeRepository.nodes().node(host2.hostname()).get().status().wantToDeprovision());
+ assertTrue(tester.nodeRepository.nodes().node(host2.hostname()).get().status().wantToRetire());
+ assertEquals(State.active, tester.nodeRepository.nodes().node(host2.hostname()).get().state());
+ assertEquals(Optional.of(clock.instant().minus(Duration.ofDays(1).minusSeconds(1)).truncatedTo(ChronoUnit.MILLIS)),
+ tester.nodeRepository.nodes().node(host2.hostname()).get().hostEmptyAt());
+
+ // Some more time passes, but child is reactivated on host1, rendering the host non-empty again
+ clock.advance(Duration.ofDays(1));
+ tester.nodeRepository.nodes().reactivate(host11.hostname(), Agent.operator, "all good");
+ tester.maintain();
+ assertFalse(tester.nodeRepository.nodes().node(host1.hostname()).get().status().wantToDeprovision());
+ assertEquals(Optional.empty(), tester.nodeRepository.nodes().node(host1.hostname()).get().hostEmptyAt());
+
+ // Child is removed, and host is marked as empty
+ tester.nodeRepository.database().writeTo(State.deprovisioned, host11, Agent.operator, Optional.empty());
+ tester.nodeRepository.nodes().forget(tester.nodeRepository.nodes().node(host11.hostname()).get());
+ assertEquals(Optional.empty(), tester.nodeRepository.nodes().node(host11.hostname()));
+ tester.maintain();
+ assertFalse(tester.nodeRepository.nodes().node(host1.hostname()).get().status().wantToDeprovision());
+ assertEquals(Optional.of(clock.instant().truncatedTo(ChronoUnit.MILLIS)),
+ tester.nodeRepository.nodes().node(host1.hostname()).get().hostEmptyAt());
+
+ // Enough time passes for the host to be deprovisioned
+ clock.advance(Duration.ofDays(1));
+ tester.maintain();
+ assertTrue(tester.nodeRepository.nodes().node(host1.hostname()).get().status().wantToDeprovision());
+ assertTrue(tester.nodeRepository.nodes().node(host1.hostname()).get().status().wantToRetire());
+ assertEquals(State.active, tester.nodeRepository.nodes().node(host1.hostname()).get().state());
+ assertEquals(Optional.of(clock.instant().minus(Duration.ofDays(1)).truncatedTo(ChronoUnit.MILLIS)),
+ tester.nodeRepository.nodes().node(host1.hostname()).get().hostEmptyAt());
+
+ // Let tenant host app redeploy, retiring the obsolete host.
+ tester.provisioningTester.activateTenantHosts();
+ clock.advance(Duration.ofHours(1));
+ new RetiredExpirer(tester.nodeRepository,
+ new MockDeployer(tester.nodeRepository),
+ new NullMetric(),
+ Duration.ofHours(1),
+ Duration.ofHours(1)).maintain();
+
+ // Host and children can now be removed.
+ tester.provisioningTester.activateTenantHosts();
+ tester.maintain();
+ assertEquals(List.of(), tester.nodeRepository.nodes().list().not().state(State.deprovisioned).asList());
+ }
+
+ @Test
public void deprovision_parked_node_with_allocation() {
var tester = new DynamicProvisioningTester();
tester.hostProvisioner.with(Behaviour.failProvisioning);
- Node host4 = tester.addNode("host4", Optional.empty(), NodeType.host, Node.State.parked);
+ Node host4 = tester.addNode("host4", Optional.empty(), NodeType.host, Node.State.parked, null, Duration.ofDays(1));
Node host41 = tester.addNode("host4-1", Optional.of("host4"), NodeType.tenant, Node.State.parked, DynamicProvisioningTester.tenantApp);
Node host42 = tester.addNode("host4-2", Optional.of("host4"), NodeType.tenant, Node.State.active, DynamicProvisioningTester.tenantApp);
Node host43 = tester.addNode("host4-3", Optional.of("host4"), NodeType.tenant, Node.State.failed, DynamicProvisioningTester.tenantApp);
- // Host and children are marked for deprovisioning
+ // Host and children are marked for deprovisioning, bypassing host TTL.
tester.nodeRepository.nodes().deprovision("host4", Agent.operator, Instant.now());
for (var node : List.of(host4, host41, host42, host43)) {
assertTrue(tester.nodeRepository.nodes().node(node.hostname()).map(n -> n.status().wantToDeprovision()).get());
@@ -522,10 +614,14 @@ public class HostCapacityMaintainerTest {
// Last child is parked
tester.nodeRepository.nodes().park(host42.hostname(), false, Agent.system, getClass().getSimpleName());
- // Host and children can now be removed
+ // Host and children can now be removed.
tester.maintain();
for (var node : List.of(host4, host41, host42, host43)) {
- assertTrue(node.hostname() + " removed", tester.nodeRepository.nodes().node(node.hostname()).isEmpty());
+ if (node.type().isHost()) {
+ assertSame(node.hostname() + " moved to deprovisioned", State.deprovisioned, tester.nodeRepository.nodes().node(node.hostname()).get().state());
+ } else {
+ assertTrue(node.hostname() + " removed", tester.nodeRepository.nodes().node(node.hostname()).isEmpty());
+ }
}
}
@@ -559,7 +655,7 @@ public class HostCapacityMaintainerTest {
private void assertCfghost3IsDeprovisioned(DynamicProvisioningTester tester) {
assertEquals(4, tester.nodeRepository.nodes().list(Node.State.active).size());
assertEquals(2, tester.nodeRepository.nodes().list(Node.State.active).nodeType(NodeType.confighost).size());
- assertTrue(tester.nodeRepository.nodes().node("cfghost3").isEmpty());
+ assertSame(State.deprovisioned, tester.nodeRepository.nodes().node("cfghost3").get().state());
}
private static class DynamicProvisioningTester {
@@ -633,17 +729,22 @@ public class HostCapacityMaintainerTest {
return cfghost;
}
- private Node addNode(String hostname, Optional<String> parentHostname, NodeType nodeType, Node.State state) {
- return addNode(hostname, parentHostname, nodeType, state, null);
+ private Node addNode(String hostname, Optional<String> parentHostname, NodeType nodeType, Node.State state, ApplicationId application) {
+ return addNode(hostname, parentHostname, nodeType, state, application, null);
}
- private Node addNode(String hostname, Optional<String> parentHostname, NodeType nodeType, Node.State state, ApplicationId application) {
- Node node = createNode(hostname, parentHostname, nodeType, state, application);
+ private Node addNode(String hostname, Optional<String> parentHostname, NodeType nodeType, Node.State state, ApplicationId application, Duration hostTTL) {
+ Node node = createNode(hostname, parentHostname, nodeType, state, application, hostTTL);
return nodeRepository.database().addNodesInState(List.of(node), node.state(), Agent.system).get(0);
}
private Node createNode(String hostname, Optional<String> parentHostname, NodeType nodeType,
Node.State state, ApplicationId application, String... additionalHostnames) {
+ return createNode(hostname, parentHostname, nodeType, state, application, null, additionalHostnames);
+ }
+
+ private Node createNode(String hostname, Optional<String> parentHostname, NodeType nodeType,
+ Node.State state, ApplicationId application, Duration hostTTL, String... additionalHostnames) {
Flavor flavor = nodeRepository.flavors().getFlavor(parentHostname.isPresent() ? "docker" : "host3").orElseThrow();
Optional<Allocation> allocation = Optional.ofNullable(application)
.map(app -> new Allocation(
@@ -654,17 +755,18 @@ public class HostCapacityMaintainerTest {
false));
List<com.yahoo.config.provision.HostName> hostnames = Stream.of(additionalHostnames).map(com.yahoo.config.provision.HostName::of).toList();
Node.Builder builder = Node.create("fake-id-" + hostname, hostname, flavor, state, nodeType)
- .ipConfig(IP.Config.of(state == Node.State.active ? Set.of("::1") : Set.of(), Set.of(), hostnames));
+ .ipConfig(IP.Config.of(state == Node.State.active ? Set.of("::1") : Set.of(), Set.of(), hostnames))
+ .hostTTL(hostTTL);
parentHostname.ifPresent(builder::parentHostname);
allocation.ifPresent(builder::allocation);
if (hostname.equals("host2-1"))
- builder.status(Status.initial().withWantToRetire(true, true, false));
+ builder.status(Status.initial().withWantToRetire(true, true, false, false));
return builder.build();
}
private long provisionedHostsMatching(NodeResources resources) {
return hostProvisioner.provisionedHosts().stream()
- .filter(host -> host.generateHost().resources().compatibleWith(resources))
+ .filter(host -> host.generateHost(Duration.ZERO).resources().compatibleWith(resources))
.count();
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostFlavorUpgraderTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostFlavorUpgraderTest.java
new file mode 100644
index 00000000000..6224143aabf
--- /dev/null
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostFlavorUpgraderTest.java
@@ -0,0 +1,85 @@
+package com.yahoo.vespa.hosted.provision.maintenance;
+
+import com.yahoo.config.provision.ApplicationId;
+import com.yahoo.config.provision.Capacity;
+import com.yahoo.config.provision.ClusterResources;
+import com.yahoo.config.provision.ClusterSpec;
+import com.yahoo.config.provision.NodeFlavors;
+import com.yahoo.config.provision.NodeResources;
+import com.yahoo.config.provision.NodeType;
+import com.yahoo.vespa.hosted.provision.Node;
+import com.yahoo.vespa.hosted.provision.NodeList;
+import com.yahoo.vespa.hosted.provision.provisioning.FlavorConfigBuilder;
+import com.yahoo.vespa.hosted.provision.provisioning.ProvisioningTester;
+import com.yahoo.vespa.hosted.provision.testutils.MockDeployer;
+import com.yahoo.vespa.hosted.provision.testutils.MockHostProvisioner;
+import com.yahoo.vespa.hosted.provision.testutils.MockHostProvisioner.Behaviour;
+import org.junit.jupiter.api.Test;
+
+import java.time.Duration;
+import java.util.Map;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/**
+ * @author mpolden
+ */
+class HostFlavorUpgraderTest {
+
+ @Test
+ public void maintain() {
+ String flavor0 = "host";
+ String flavor1 = "host2";
+ NodeFlavors flavors = FlavorConfigBuilder.createDummies(flavor0, flavor1);
+ MockHostProvisioner hostProvisioner = new MockHostProvisioner(flavors.getFlavors());
+ ProvisioningTester tester = new ProvisioningTester.Builder().dynamicProvisioning()
+ .flavors(flavors.getFlavors())
+ .hostProvisioner(hostProvisioner)
+ .build();
+ ApplicationId app = ProvisioningTester.applicationId();
+ NodeResources resources = new NodeResources(4, 8, 100, 1,
+ NodeResources.DiskSpeed.fast, NodeResources.StorageType.remote);
+ ClusterSpec spec = ClusterSpec.request(ClusterSpec.Type.content, ClusterSpec.Id.from("c1")).vespaVersion("1").build();
+ Capacity capacity = Capacity.from(new ClusterResources(2, 1, resources));
+ Map<ApplicationId, MockDeployer.ApplicationContext> applications = Map.of(app, new MockDeployer.ApplicationContext(app, spec, capacity));
+ MockDeployer deployer = new MockDeployer(tester.provisioner(), tester.clock(), applications);
+ HostFlavorUpgrader upgrader = new HostFlavorUpgrader(tester.nodeRepository(), Duration.ofDays(1),
+ new TestMetric(), deployer, hostProvisioner);
+
+ // Provision hosts and deploy application
+ tester.makeReadyNodes(2, flavor0, NodeType.host);
+ tester.activateTenantHosts();
+ tester.deploy(app, spec, capacity);
+ Node host = tester.nodeRepository().nodes().list().hosts().first().get();
+ assertEquals(flavor0, host.flavor().name());
+
+ // Nothing to upgrade initially
+ assertEquals(1, upgrader.maintain());
+ assertEquals(NodeList.of(), tester.nodeRepository().nodes().list()
+ .matching(h -> h.status().wantToUpgradeFlavor()));
+
+ // Mark flavor as upgradable, but fail all provisioning requests
+ hostProvisioner.addUpgradableFlavor(flavor0)
+ .with(Behaviour.failProvisionRequest);
+ assertEquals(1, upgrader.maintain());
+ assertEquals(NodeList.of(),
+ tester.nodeRepository().nodes().list()
+ .matching(node -> node.status().wantToUpgradeFlavor() || node.status().wantToRetire()),
+ "No hosts marked for upgrade or retirement");
+
+ // First provision request fails, but second succeeds and a replacement host starts provisioning
+ hostProvisioner.with(Behaviour.failProvisionRequest, 1);
+ assertEquals(1, upgrader.maintain());
+ NodeList nodes = tester.nodeRepository().nodes().list();
+ NodeList upgradingFlavor = nodes.matching(node -> node.status().wantToRetire() &&
+ node.status().wantToUpgradeFlavor());
+ assertEquals(1, upgradingFlavor.size());
+ assertEquals(1, nodes.state(Node.State.provisioned).size());
+
+ // No more upgrades are started while host is retiring
+ assertEquals(1, upgrader.maintain());
+ assertEquals(upgradingFlavor, tester.nodeRepository().nodes().list()
+ .matching(node -> node.status().wantToUpgradeFlavor()));
+ }
+
+}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostRetirerTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostRetirerTest.java
index 387a2cf5a4b..253c150f9da 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostRetirerTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/HostRetirerTest.java
@@ -1,14 +1,9 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.provision.maintenance;
-import com.yahoo.config.provision.Cloud;
-import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.HostEvent;
import com.yahoo.config.provision.NodeFlavors;
import com.yahoo.config.provision.NodeResources;
-import com.yahoo.config.provision.RegionName;
-import com.yahoo.config.provision.SystemName;
-import com.yahoo.config.provision.Zone;
import com.yahoo.jdisc.test.MockMetric;
import com.yahoo.vespa.hosted.provision.Node;
import com.yahoo.vespa.hosted.provision.NodeList;
@@ -30,15 +25,10 @@ public class HostRetirerTest {
@Test
public void retire_hosts() {
NodeFlavors flavors = FlavorConfigBuilder.createDummies("default");
- Zone zone = new Zone(Cloud.builder()
- .dynamicProvisioning(true)
- .build(), SystemName.defaultSystem(),
- Environment.defaultEnvironment(),
- RegionName.defaultName());
MockHostProvisioner hostProvisioner = new MockHostProvisioner(flavors.getFlavors());
ProvisioningTester tester = new ProvisioningTester.Builder().hostProvisioner(hostProvisioner)
.flavors(flavors.getFlavors())
- .zone(zone)
+ .dynamicProvisioning()
.build();
HostRetirer retirer = new HostRetirer(tester.nodeRepository(), Duration.ofDays(1), new MockMetric(), hostProvisioner);
tester.makeReadyHosts(3, new NodeResources(24, 48, 1000, 10))
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/MetricsReporterTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/MetricsReporterTest.java
index 487355a0b75..de2c060a0eb 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/MetricsReporterTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/MetricsReporterTest.java
@@ -19,8 +19,11 @@ import com.yahoo.vespa.curator.stats.LockStats;
import com.yahoo.vespa.hosted.provision.LockedNodeList;
import com.yahoo.vespa.hosted.provision.Node;
import com.yahoo.vespa.hosted.provision.NodeRepository;
+import com.yahoo.vespa.hosted.provision.autoscale.Autoscaling;
+import com.yahoo.vespa.hosted.provision.autoscale.Load;
import com.yahoo.vespa.hosted.provision.node.Agent;
import com.yahoo.vespa.hosted.provision.node.Allocation;
+import com.yahoo.vespa.hosted.provision.node.ClusterId;
import com.yahoo.vespa.hosted.provision.node.Generation;
import com.yahoo.vespa.hosted.provision.node.IP;
import com.yahoo.vespa.hosted.provision.provisioning.FlavorConfigBuilder;
@@ -240,7 +243,7 @@ public class MetricsReporterTest {
}
@Test
- public void non_active_metric() {
+ public void node_and_cluster_metrics() {
ProvisioningTester tester = new ProvisioningTester.Builder().build();
tester.makeReadyHosts(5, new NodeResources(64, 256, 2000, 10));
tester.activateTenantHosts();
@@ -248,18 +251,36 @@ public class MetricsReporterTest {
MetricsReporter metricsReporter = metricsReporter(metric, tester);
// Application is deployed
- ApplicationId application = ApplicationId.from("t1", "a1", "default");
- Map<String, String> dimensions = Map.of("applicationId", application.toFullString());
+ ApplicationId applicationId = ApplicationId.from("t1", "a1", "default");
+ ClusterSpec clusterSpec = ProvisioningTester.contentClusterSpec();
NodeResources resources = new NodeResources(2, 8, 100, 1);
- List<Node> activeNodes = tester.deploy(application, ProvisioningTester.contentClusterSpec(), Capacity.from(new ClusterResources(4, 1, resources)));
+ Capacity capacity = Capacity.from(new ClusterResources(4, 1, resources));
+
+ List<Node> activeNodes = tester.deploy(applicationId, clusterSpec, capacity);
+ var application = tester.nodeRepository().applications().require(applicationId);
+ application = application.withCluster(clusterSpec.id(), false, capacity);
+ var cluster = application.cluster(clusterSpec.id()).get().withTarget(new Autoscaling(Autoscaling.Status.ideal,
+ "test",
+ Optional.empty(),
+ tester.clock().instant(),
+ Load.zero(),
+ new Load(0.1, 0.2, 0.3),
+ Autoscaling.Metrics.zero()));
+ tester.nodeRepository().applications().put(application.with(cluster), tester.nodeRepository().applications().lock(applicationId));
+
metricsReporter.maintain();
+ Map<String, String> dimensions = Map.of("applicationId", applicationId.toFullString());
assertEquals(0D, getMetric("nodes.nonActiveFraction", metric, dimensions));
assertEquals(4, getMetric("nodes.active", metric, dimensions));
assertEquals(0, getMetric("nodes.nonActive", metric, dimensions));
- Map<String, String> clusterDimensions = Map.of("applicationId", application.toFullString(),
- "clusterid", ProvisioningTester.contentClusterSpec().id().value());
+
+ Map<String, String> clusterDimensions = Map.of("applicationId", applicationId.toFullString(),
+ "clusterid", clusterSpec.id().value());
assertEquals(1.392, getMetric("cluster.cost", metric, clusterDimensions));
+ assertEquals(0.1, getMetric("cluster.load.ideal.cpu", metric, clusterDimensions));
+ assertEquals(0.2, getMetric("cluster.load.ideal.memory", metric, clusterDimensions));
+ assertEquals(0.3, getMetric("cluster.load.ideal.disk", metric, clusterDimensions));
// One node fails
tester.fail(activeNodes.get(0).hostname());
@@ -269,7 +290,7 @@ public class MetricsReporterTest {
assertEquals(1, getMetric("nodes.nonActive", metric, dimensions));
// Cluster is removed
- tester.deactivate(application);
+ tester.deactivate(applicationId);
metricsReporter.maintain();
assertEquals(1D, getMetric("nodes.nonActiveFraction", metric, dimensions).doubleValue(), Double.MIN_VALUE);
assertEquals(0, getMetric("nodes.active", metric, dimensions));
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainerTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainerTest.java
index f73d6f2ce01..1b677224295 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainerTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainerTest.java
@@ -73,9 +73,9 @@ public class ScalingSuggestionsMaintainerTest {
new TestMetric());
maintainer.maintain();
- assertEquals("8 nodes with [vcpu: 3.2, memory: 4.5 Gb, disk 10.0 Gb, bandwidth: 0.1 Gbps, architecture: any]",
+ assertEquals("8 nodes with [vcpu: 3.2, memory: 4.5 Gb, disk: 10.0 Gb, bandwidth: 0.1 Gbps, architecture: any]",
suggestionOf(app1, cluster1, tester).resources().get().toString());
- assertEquals("8 nodes with [vcpu: 3.6, memory: 4.4 Gb, disk 11.8 Gb, bandwidth: 0.1 Gbps, architecture: any]",
+ assertEquals("8 nodes with [vcpu: 3.6, memory: 4.7 Gb, disk: 11.8 Gb, bandwidth: 0.1 Gbps, architecture: any]",
suggestionOf(app2, cluster2, tester).resources().get().toString());
// Utilization goes way down
@@ -83,14 +83,14 @@ public class ScalingSuggestionsMaintainerTest {
addMeasurements(0.10f, 0.10f, 0.10f, 0, 500, app1, tester.nodeRepository());
maintainer.maintain();
assertEquals("Suggestion stays at the peak value observed",
- "8 nodes with [vcpu: 3.2, memory: 4.5 Gb, disk 10.0 Gb, bandwidth: 0.1 Gbps, architecture: any]",
+ "8 nodes with [vcpu: 3.2, memory: 4.5 Gb, disk: 10.0 Gb, bandwidth: 0.1 Gbps, architecture: any]",
suggestionOf(app1, cluster1, tester).resources().get().toString());
// Utilization is still way down and a week has passed
tester.clock().advance(Duration.ofDays(7));
addMeasurements(0.10f, 0.10f, 0.10f, 0, 500, app1, tester.nodeRepository());
maintainer.maintain();
assertEquals("Peak suggestion has been outdated",
- "3 nodes with [vcpu: 1.2, memory: 4.0 Gb, disk 10.0 Gb, bandwidth: 0.1 Gbps, architecture: any]",
+ "3 nodes with [vcpu: 1.2, memory: 4.0 Gb, disk: 10.0 Gb, bandwidth: 0.1 Gbps, architecture: any]",
suggestionOf(app1, cluster1, tester).resources().get().toString());
assertTrue(shouldSuggest(app1, cluster1, tester));
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/os/OsVersionsTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/os/OsVersionsTest.java
index 40b035968bd..ada96b3f793 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/os/OsVersionsTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/os/OsVersionsTest.java
@@ -622,7 +622,7 @@ public class OsVersionsTest {
Optional<Version> wantedOsVersion = node.status().osVersion().wanted();
assertFalse(node + " is not retiring", node.status().wantToRetire());
assertTrue(node + " is rebuilding", node.status().wantToRebuild());
- node = node.withWantToRetire(false, false, false, Agent.system,
+ node = node.withWantToRetire(false, false, false, false, Agent.system,
tester.clock().instant());
return node.with(node.status().withOsVersion(node.status().osVersion().withCurrent(wantedOsVersion)));
});
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java
index c429f88cfa1..c997da543ea 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java
@@ -68,7 +68,7 @@ public class ApplicationSerializerTest {
Load.zero(),
Load.one(),
Autoscaling.Metrics.zero()),
- new ClusterInfo.Builder().bcpDeadline(Duration.ofMinutes(33)).build(),
+ new ClusterInfo.Builder().bcpDeadline(Duration.ofMinutes(33)).hostTTL(Duration.ofSeconds(321)).build(),
new BcpGroupInfo(0.1, 0.2, 0.3),
List.of(new ScalingEvent(new ClusterResources(10, 5, minResources),
new ClusterResources(12, 6, minResources),
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/NodeSerializerTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/NodeSerializerTest.java
index 1086f2026a8..1a0827fc487 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/NodeSerializerTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/NodeSerializerTest.java
@@ -326,14 +326,15 @@ public class NodeSerializerTest {
}
@Test
- public void want_to_rebuild() {
+ public void want_to_rebuild_and_upgrade_flavor() {
Node node = nodeSerializer.fromJson(nodeSerializer.toJson(createNode()));
assertFalse(node.status().wantToRebuild());
- node = node.with(node.status().withWantToRetire(true, false, true));
+ node = node.with(node.status().withWantToRetire(true, false, true, true));
node = nodeSerializer.fromJson(nodeSerializer.toJson(node));
assertTrue(node.status().wantToRetire());
assertFalse(node.status().wantToDeprovision());
assertTrue(node.status().wantToRebuild());
+ assertTrue(node.status().wantToUpgradeFlavor());
}
@Test
@@ -476,13 +477,19 @@ public class NodeSerializerTest {
nodeFlavors.getFlavorOrThrow("default"), NodeType.host);
Node node = nodeSerializer.fromJson(nodeSerializer.toJson(builder.build()));
assertFalse(node.exclusiveToApplicationId().isPresent());
+ assertFalse(node.hostTTL().isPresent());
assertFalse(node.exclusiveToClusterType().isPresent());
ApplicationId exclusiveToApp = ApplicationId.from("tenant1", "app1", "instance1");
ClusterSpec.Type exclusiveToCluster = ClusterSpec.Type.admin;
- node = builder.exclusiveToApplicationId(exclusiveToApp).exclusiveToClusterType(exclusiveToCluster).build();
+ node = builder.exclusiveToApplicationId(exclusiveToApp)
+ .hostTTL(Duration.ofDays(1))
+ .hostEmptyAt(clock.instant().minus(Duration.ofDays(1)).truncatedTo(MILLIS))
+ .exclusiveToClusterType(exclusiveToCluster).build();
node = nodeSerializer.fromJson(nodeSerializer.toJson(node));
assertEquals(exclusiveToApp, node.exclusiveToApplicationId().get());
+ assertEquals(Duration.ofDays(1), node.hostTTL().get());
+ assertEquals(clock.instant().minus(Duration.ofDays(1)).truncatedTo(MILLIS), node.hostEmptyAt().get());
assertEquals(exclusiveToCluster, node.exclusiveToClusterType().get());
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DynamicProvisioningTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DynamicProvisioningTest.java
index 382d2840377..ced29b28d41 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DynamicProvisioningTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DynamicProvisioningTest.java
@@ -3,10 +3,8 @@ package com.yahoo.vespa.hosted.provision.provisioning;
import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.Capacity;
-import com.yahoo.config.provision.Cloud;
import com.yahoo.config.provision.ClusterResources;
import com.yahoo.config.provision.ClusterSpec;
-import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.Flavor;
import com.yahoo.config.provision.HostSpec;
import com.yahoo.config.provision.NodeFlavors;
@@ -15,12 +13,10 @@ import com.yahoo.config.provision.NodeResources.Architecture;
import com.yahoo.config.provision.NodeResources.DiskSpeed;
import com.yahoo.config.provision.NodeResources.StorageType;
import com.yahoo.config.provision.NodeType;
-import com.yahoo.config.provision.RegionName;
-import com.yahoo.config.provision.SystemName;
-import com.yahoo.config.provision.Zone;
import com.yahoo.vespa.flags.InMemoryFlagSource;
import com.yahoo.vespa.flags.PermanentFlags;
import com.yahoo.vespa.hosted.provision.Node;
+import com.yahoo.vespa.hosted.provision.Node.State;
import com.yahoo.vespa.hosted.provision.NodeList;
import com.yahoo.vespa.hosted.provision.NodeRepository;
import com.yahoo.vespa.hosted.provision.node.Agent;
@@ -31,6 +27,7 @@ import org.junit.Test;
import java.time.Instant;
import java.util.Collection;
import java.util.List;
+import java.util.Optional;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
@@ -116,6 +113,55 @@ public class DynamicProvisioningTest {
}
@Test
+ public void empty_exclusive_to_hosts_reused_iff_new_allocation_fits_perfectly() {
+ var tester = tester(true);
+
+ NodeResources highResources = new NodeResources(4, 80, 100, 1);
+ NodeResources lowResources = new NodeResources(2, 20, 50, 1);
+
+ ApplicationId application = ProvisioningTester.applicationId();
+ prepareAndActivate(application, clusterSpec("mycluster", true), 2, 1, highResources, tester);
+
+ // Total of 4 nodes should now be in node-repo, 2 active hosts and 2 active nodes.
+ assertEquals(4, tester.nodeRepository().nodes().list().size());
+ assertEquals(2, tester.nodeRepository().nodes().list(Node.State.active).nodeType(NodeType.tenant).size());
+
+ // Redeploying the application causes no changes at all.
+ prepareAndActivate(application, clusterSpec("mycluster", true), 2, 1, highResources, tester);
+ assertEquals(4, tester.nodeRepository().nodes().list().size());
+ assertEquals(2, tester.nodeRepository().nodes().list(Node.State.active).nodeType(NodeType.tenant).size());
+
+ // Deploying with a smaller node flavour causes new, smaller hosts to be provisioned.
+ prepareAndActivate(application, clusterSpec("mycluster", true), 2, 1, lowResources, tester);
+
+ // Total of 8 nodes should now be in node-repo, 4 active hosts and 4 active nodes, of which 2 are retired.
+ NodeList nodes = tester.nodeRepository().nodes().list();
+ assertEquals(8, nodes.size());
+ assertEquals(4, nodes.nodeType(NodeType.host).state(Node.State.active).size());
+ assertEquals(4, nodes.nodeType(NodeType.tenant).state(Node.State.active).size());
+ assertEquals(2, nodes.retired().size());
+
+ // Remove the child nodes, and redeploy with the original flavour. This should reuse the existing hosts.
+ tester.nodeRepository().database().writeTo(State.deprovisioned, nodes.retired().asList(), Agent.operator, Optional.empty());
+ tester.nodeRepository().nodes().list().state(State.deprovisioned).forEach(tester.nodeRepository().nodes()::forget);
+
+ // Total of 6 nodes should now be in node-repo, 4 active hosts and 2 active nodes.
+ nodes = tester.nodeRepository().nodes().list();
+ assertEquals(6, nodes.size());
+ assertEquals(4, nodes.nodeType(NodeType.host).state(Node.State.active).size());
+ assertEquals(2, nodes.nodeType(NodeType.tenant).state(Node.State.active).size());
+ assertEquals(0, nodes.retired().size());
+
+ // Deploy again with high resources.
+ prepareAndActivate(application, clusterSpec("mycluster", true), 2, 1, highResources, tester);
+ // Total of 8 nodes should now be in node-repo, 4 active hosts and 4 active nodes.
+ nodes = tester.nodeRepository().nodes().list();
+ assertEquals(8, nodes.size());
+ assertEquals(4, nodes.nodeType(NodeType.host).state(Node.State.active).size());
+ assertEquals(4, nodes.nodeType(NodeType.tenant).state(Node.State.active).size());
+ }
+
+ @Test
public void avoids_allocating_to_empty_hosts() {
var tester = tester(false);
tester.makeReadyHosts(6, new NodeResources(12, 12, 200, 12));
@@ -199,7 +245,7 @@ public class DynamicProvisioningTest {
List<Flavor> flavors = List.of(new Flavor("2x",
new NodeResources(2, 17, 200, 10, fast, remote)));
- ProvisioningTester tester = new ProvisioningTester.Builder().zone(zone(false))
+ ProvisioningTester tester = new ProvisioningTester.Builder().dynamicProvisioning(true, false)
.flavors(flavors)
.hostProvisioner(new MockHostProvisioner(flavors, memoryTax))
.nameResolver(nameResolver)
@@ -244,7 +290,8 @@ public class DynamicProvisioningTest {
List<Flavor> flavors = List.of(new Flavor("x86", new NodeResources(2, 4, 50, 0.1, fast, local, Architecture.x86_64)),
new Flavor("arm", new NodeResources(2, 4, 50, 0.1, fast, local, Architecture.arm64)));
MockHostProvisioner hostProvisioner = new MockHostProvisioner(flavors);
- ProvisioningTester tester = new ProvisioningTester.Builder().zone(zone(false))
+ ProvisioningTester tester = new ProvisioningTester.Builder()
+ .dynamicProvisioning(true, false)
.flavors(flavors)
.hostProvisioner(hostProvisioner)
.resourcesCalculator(0, 0)
@@ -287,7 +334,7 @@ public class DynamicProvisioningTest {
new Flavor("2x", new NodeResources(2, 20 - memoryTax, 200, 0.1, fast, remote)),
new Flavor("4x", new NodeResources(4, 40 - memoryTax, 400, 0.1, fast, remote)));
- ProvisioningTester tester = new ProvisioningTester.Builder().zone(zone(false))
+ ProvisioningTester tester = new ProvisioningTester.Builder().dynamicProvisioning(true, false)
.flavors(flavors)
.hostProvisioner(new MockHostProvisioner(flavors, memoryTax))
.nameResolver(nameResolver)
@@ -362,7 +409,7 @@ public class DynamicProvisioningTest {
new Flavor("4x", new NodeResources(4, 40 - memoryTax, 400, 0.1, fast, remote)),
new Flavor("4xl", new NodeResources(4, 40 - memoryTax, 400, 0.1, fast, local)));
- ProvisioningTester tester = new ProvisioningTester.Builder().zone(zone(false))
+ ProvisioningTester tester = new ProvisioningTester.Builder().dynamicProvisioning(true, false)
.flavors(flavors)
.hostProvisioner(new MockHostProvisioner(flavors, memoryTax))
.nameResolver(nameResolver)
@@ -397,7 +444,7 @@ public class DynamicProvisioningTest {
new Flavor("2xl", new NodeResources(2, 20 - memoryTax, 200, 0.1, fast, remote)),
new Flavor("4xl", new NodeResources(4, 40 - memoryTax, 400, 0.1, fast, remote)));
- ProvisioningTester tester = new ProvisioningTester.Builder().zone(zone(false))
+ ProvisioningTester tester = new ProvisioningTester.Builder().dynamicProvisioning(true, false)
.flavors(flavors)
.hostProvisioner(new MockHostProvisioner(flavors, memoryTax))
.nameResolver(nameResolver)
@@ -420,7 +467,7 @@ public class DynamicProvisioningTest {
public void gpu_host() {
List<Flavor> flavors = List.of(new Flavor("gpu", new NodeResources(4, 16, 125, 10, fast, local,
Architecture.x86_64, new NodeResources.GpuResources(1, 16))));
- ProvisioningTester tester = new ProvisioningTester.Builder().zone(zone(false))
+ ProvisioningTester tester = new ProvisioningTester.Builder().dynamicProvisioning(true, false)
.flavors(flavors)
.hostProvisioner(new MockHostProvisioner(flavors))
.nameResolver(nameResolver)
@@ -433,17 +480,9 @@ public class DynamicProvisioningTest {
2, 1, resources);
}
- private Zone zone(boolean sharing) {
- return new Zone(
- Cloud.builder().dynamicProvisioning(true).allowHostSharing(sharing).build(),
- SystemName.main,
- Environment.prod,
- RegionName.from("us-east"));
- }
-
private ProvisioningTester tester(boolean sharing) {
var hostProvisioner = new MockHostProvisioner(new NodeFlavors(ProvisioningTester.createConfig()).getFlavors(), nameResolver, 0);
- return new ProvisioningTester.Builder().zone(zone(sharing)).hostProvisioner(hostProvisioner).nameResolver(nameResolver).build();
+ return new ProvisioningTester.Builder().dynamicProvisioning(true, sharing).hostProvisioner(hostProvisioner).nameResolver(nameResolver).build();
}
private void prepareAndActivate(ApplicationId application, ClusterSpec clusterSpec, int nodes, int groups, NodeResources resources,
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTest.java
index 28cd3067155..67760d8cdf3 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTest.java
@@ -86,7 +86,7 @@ public class ProvisioningTest {
// deploy another application
SystemState state1App2 = prepare(application2, 2, 2, 3, 3, defaultResources, tester);
- assertFalse("Hosts to different apps are disjunct", state1App2.allHosts.removeAll(state1.allHosts));
+ assertFalse("Hosts to different apps are disjoint", state1App2.allHosts.removeAll(state1.allHosts));
tester.activate(application2, state1App2.allHosts);
// prepare twice
@@ -525,14 +525,14 @@ public class ProvisioningTest {
tester.activate(app1, cluster1, Capacity.from(resources(4, 2, 2, 10, 20),
resources(6, 3, 3, 15, 25)));
tester.assertNodes("Allocation preserving resources within new limits",
- 6, 2, 3, 8.0/4*21 / (6.0/2), 25,
+ 6, 2, 3, 14.57, 25,
app1, cluster1);
// Widening window does not change allocation
tester.activate(app1, cluster1, Capacity.from(resources(4, 2, 1, 5, 15),
resources(8, 4, 4, 21, 30)));
tester.assertNodes("Same allocation",
- 6, 2, 3, 8.0/4*21 / (6.0/2), 25,
+ 6, 2, 3, 14.57, 25,
app1, cluster1);
// Changing limits in opposite directions cause a mixture of min and max
@@ -682,6 +682,22 @@ public class ProvisioningTest {
}
@Test
+ public void non_matching_resources_but_cannot_fail() {
+ ProvisioningTester tester = new ProvisioningTester.Builder().zone(new Zone(Environment.prod, RegionName.from("us-east"))).build();
+ tester.makeReadyHosts(4, defaultResources).activateTenantHosts();
+ ApplicationId application = ProvisioningTester.applicationId();
+ var cluster = ClusterSpec.request(ClusterSpec.Type.content, ClusterSpec.Id.from("music")).vespaVersion("4.5.6").build();
+ var hosts1 = tester.prepare(application, cluster, Capacity.from(new ClusterResources(4, 1, defaultResources), false, true));
+ tester.activate(application, hosts1);
+
+ var nonMatchingResources = defaultResources.withVcpu(defaultResources.vcpu() * 2);
+ var hosts2 = tester.prepare(application, cluster, Capacity.from(new ClusterResources(4, 1, nonMatchingResources), false, false));
+ assertEquals(hosts1, hosts2);
+ for (var host : hosts2)
+ assertFalse(host.membership().get().retired());
+ }
+
+ @Test
public void out_of_capacity_all_nodes_want_to_retire() {
ProvisioningTester tester = new ProvisioningTester.Builder().zone(new Zone(Environment.prod, RegionName.from("us-east"))).build();
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTester.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTester.java
index 76dcc6cf8a8..2acbeb00f5f 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTester.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTester.java
@@ -7,9 +7,11 @@ import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.ApplicationName;
import com.yahoo.config.provision.ApplicationTransaction;
import com.yahoo.config.provision.Capacity;
+import com.yahoo.config.provision.Cloud;
import com.yahoo.config.provision.ClusterResources;
import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.config.provision.DockerImage;
+import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.Flavor;
import com.yahoo.config.provision.HostFilter;
import com.yahoo.config.provision.HostSpec;
@@ -21,6 +23,8 @@ import com.yahoo.config.provision.NodeResources.StorageType;
import com.yahoo.config.provision.NodeType;
import com.yahoo.config.provision.ProvisionLock;
import com.yahoo.config.provision.ProvisionLogger;
+import com.yahoo.config.provision.RegionName;
+import com.yahoo.config.provision.SystemName;
import com.yahoo.config.provision.TenantName;
import com.yahoo.config.provision.Zone;
import com.yahoo.config.provisioning.FlavorsConfig;
@@ -673,6 +677,20 @@ public class ProvisioningTester {
return this;
}
+ public Builder dynamicProvisioning() {
+ return dynamicProvisioning(true, true);
+ }
+
+ public Builder dynamicProvisioning(boolean enabled, boolean allowHostSharing) {
+ return zone(new Zone(Cloud.builder()
+ .dynamicProvisioning(enabled)
+ .allowHostSharing(allowHostSharing)
+ .build(),
+ SystemName.defaultSystem(),
+ Environment.defaultEnvironment(),
+ RegionName.defaultName()));
+ }
+
public Builder nameResolver(NameResolver nameResolver) {
this.nameResolver = nameResolver;
return this;
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/VirtualNodeProvisioningTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/VirtualNodeProvisioningTest.java
index f40c8037f41..0b4d345b8a5 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/VirtualNodeProvisioningTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/VirtualNodeProvisioningTest.java
@@ -440,7 +440,7 @@ public class VirtualNodeProvisioningTest {
catch (Exception e) {
assertEquals("No room for 3 nodes as 2 of 4 hosts are exclusive",
"Could not satisfy request for 3 nodes with " +
- "[vcpu: 2.0, memory: 4.0 Gb, disk 100.0 Gb, bandwidth: 1.0 Gbps, architecture: any] " +
+ "[vcpu: 2.0, memory: 4.0 Gb, disk: 100.0 Gb, bandwidth: 1.0 Gbps, architecture: any] " +
"in tenant2.app2 container cluster 'my-container' 6.39: " +
"Node allocation failure on group 0: " +
"Not enough suitable nodes available due to host exclusivity constraints",
@@ -467,7 +467,7 @@ public class VirtualNodeProvisioningTest {
}
catch (NodeAllocationException e) {
assertEquals("Could not satisfy request for 2 nodes with " +
- "[vcpu: 1.0, memory: 4.0 Gb, disk 100.0 Gb, bandwidth: 1.0 Gbps, storage type: remote, architecture: any] " +
+ "[vcpu: 1.0, memory: 4.0 Gb, disk: 100.0 Gb, bandwidth: 1.0 Gbps, storage type: remote, architecture: any] " +
"in tenant.app1 content cluster 'my-content'" +
" 6.42: Node allocation failure on group 0",
e.getMessage());
@@ -549,8 +549,8 @@ public class VirtualNodeProvisioningTest {
}
catch (IllegalArgumentException e) {
assertEquals("No allocation possible within limits: " +
- "from 2 nodes with [vcpu: 1.0, memory: 5.0 Gb, disk 10.0 Gb, bandwidth: 1.0 Gbps, architecture: any] " +
- "to 4 nodes with [vcpu: 1.0, memory: 5.0 Gb, disk 10.0 Gb, bandwidth: 1.0 Gbps, architecture: any]",
+ "from 2 nodes with [vcpu: 1.0, memory: 5.0 Gb, disk: 10.0 Gb, bandwidth: 1.0 Gbps, architecture: any] " +
+ "to 4 nodes with [vcpu: 1.0, memory: 5.0 Gb, disk: 10.0 Gb, bandwidth: 1.0 Gbps, architecture: any]",
e.getMessage());
}
}
@@ -573,9 +573,9 @@ public class VirtualNodeProvisioningTest {
}
catch (IllegalArgumentException e) {
assertEquals("No allocation possible within limits: " +
- "from 2 nodes with [vcpu: 20.0, memory: 37.0 Gb, disk 100.0 Gb, bandwidth: 1.0 Gbps, architecture: any] " +
- "to 4 nodes with [vcpu: 20.0, memory: 37.0 Gb, disk 100.0 Gb, bandwidth: 1.0 Gbps, architecture: any]. " +
- "Nearest allowed node resources: [vcpu: 20.0, memory: 40.0 Gb, disk 100.0 Gb, bandwidth: 1.0 Gbps, storage type: remote, architecture: any]",
+ "from 2 nodes with [vcpu: 20.0, memory: 37.0 Gb, disk: 100.0 Gb, bandwidth: 1.0 Gbps, architecture: any] " +
+ "to 4 nodes with [vcpu: 20.0, memory: 37.0 Gb, disk: 100.0 Gb, bandwidth: 1.0 Gbps, architecture: any]. " +
+ "Nearest allowed node resources: [vcpu: 20.0, memory: 40.0 Gb, disk: 100.0 Gb, bandwidth: 1.0 Gbps, storage type: remote, architecture: any]",
e.getMessage());
}
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiTest.java
index 022822fd3ec..40895e25f2f 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiTest.java
@@ -1016,15 +1016,25 @@ public class NodesV2ApiTest {
assertResponse(new Request(url, Utf8.toBytes("{\"exclusiveToApplicationId\": \"t1:a1:i1\"}"), Request.Method.PATCH),
"{\"message\":\"Updated dockerhost1.yahoo.com\"}");
- tester.assertPartialResponse(new Request(url), "exclusiveTo\":\"t1:a1:i1\",", true);
+ tester.assertPartialResponse(new Request(url), "\"exclusiveTo\":\"t1:a1:i1\",", true);
+
+ assertResponse(new Request(url, Utf8.toBytes("{\"hostTTL\": 86400000}"), Request.Method.PATCH),
+ "{\"message\":\"Updated dockerhost1.yahoo.com\"}");
+ tester.assertPartialResponse(new Request(url), "\"hostTTL\":86400000", true);
+
+ assertResponse(new Request(url, Utf8.toBytes("{\"hostEmptyAt\": 789}"), Request.Method.PATCH),
+ "{\"message\":\"Updated dockerhost1.yahoo.com\"}");
+ tester.assertPartialResponse(new Request(url), "\"hostEmptyAt\":789", true);
assertResponse(new Request(url, Utf8.toBytes("{\"exclusiveToClusterType\": \"admin\"}"), Request.Method.PATCH),
"{\"message\":\"Updated dockerhost1.yahoo.com\"}");
- tester.assertPartialResponse(new Request(url), "exclusiveTo\":\"t1:a1:i1\",\"exclusiveToClusterType\":\"admin\",", true);
+ tester.assertPartialResponse(new Request(url), "\"exclusiveToClusterType\":\"admin\",", true);
- assertResponse(new Request(url, Utf8.toBytes("{\"exclusiveTo\": null, \"exclusiveToClusterType\": null}"), Request.Method.PATCH),
+ assertResponse(new Request(url, Utf8.toBytes("{\"exclusiveTo\": null, \"hostTTL\":null, \"hostEmptyAt\":null, \"exclusiveToClusterType\": null}"), Request.Method.PATCH),
"{\"message\":\"Updated dockerhost1.yahoo.com\"}");
- tester.assertPartialResponse(new Request(url), "exclusiveTo", false);
+ tester.assertPartialResponse(new Request(url), "\"exclusiveTo", false);
+ tester.assertPartialResponse(new Request(url), "\"hostTTL\"", false);
+ tester.assertPartialResponse(new Request(url), "\"hostEmptyAt\"", false);
}
@Test
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json
index 92e5425e84e..28bde7bd966 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json
@@ -140,7 +140,7 @@
"at" : 123
}
],
- "scalingDuration": 600000
+ "scalingDuration": 300000
}
}
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application2.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application2.json
index cba56e1c51e..2a8f436b30c 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application2.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application2.json
@@ -94,7 +94,7 @@
"at" : 123
}
],
- "scalingDuration": 43200000
+ "scalingDuration": 28800000
}
}
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/archives.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/archives.json
index 738d8ee1bb3..51fd7201295 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/archives.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/archives.json
@@ -9,7 +9,7 @@
"uri": "ftp://host/dir/"
},
{
- "account": "777888999000",
+ "account": "aws:777888999000",
"uri": "s3://acc-bucket/"
}
]
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/capacity-zone.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/capacity-zone.json
index 0e14dd8b36f..87b823fbb33 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/capacity-zone.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/capacity-zone.json
@@ -3,7 +3,7 @@
"couldLoseHosts": 4,
"failedTenantParent": "dockerhost1.yahoo.com",
"failedTenant": "host4.yahoo.com",
- "failedTenantResources": "[vcpu: 1.0, memory: 4.0 Gb, disk 100.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
+ "failedTenantResources": "[vcpu: 1.0, memory: 4.0 Gb, disk: 100.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
"failedTenantAllocation": "allocated to tenant3.application3.instance3 as 'content/id3/0/0/stateful'",
"hostCandidateRejectionReasons": {
"singularReasonFailures": {
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/controller1.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/controller1.json
index 42ca28a09d5..a314afebd06 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/controller1.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/controller1.json
@@ -6,8 +6,24 @@
"hostname": "controller1.yahoo.com",
"flavor": "default",
"cpuCores": 2.0,
- "resources":{"vcpu":2.0,"memoryGb":16.0,"diskGb":400.0,"bandwidthGbps":10.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":2.0,"memoryGb":16.0,"diskGb":400.0,"bandwidthGbps":10.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 2.0,
+ "memoryGb": 16.0,
+ "diskGb": 400.0,
+ "bandwidthGbps": 10.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 2.0,
+ "memoryGb": 16.0,
+ "diskGb": 400.0,
+ "bandwidthGbps": 10.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -31,9 +47,7 @@
"agent": "operator"
}
],
- "ipAddresses": [
- "127.0.0.1"
- ],
+ "ipAddresses": ["127.0.0.1"],
"additionalIpAddresses": [],
- "cloudAccount":"111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-container1.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-container1.json
index 8ef88eae97d..a1d38ed0e22 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-container1.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-container1.json
@@ -5,9 +5,25 @@
"type": "tenant",
"hostname": "test-node-pool-102-2",
"parentHostname": "dockerhost3.yahoo.com",
- "flavor": "[vcpu: 1.0, memory: 4.0 Gb, disk 100.0 Gb, bandwidth: 1.0 Gbps, storage type: remote, architecture: x86_64]",
- "resources":{"vcpu":1.0,"memoryGb":4.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":1.0,"memoryGb":4.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "flavor": "[vcpu: 1.0, memory: 4.0 Gb, disk: 100.0 Gb, bandwidth: 1.0 Gbps, storage type: remote, architecture: x86_64]",
+ "resources": {
+ "vcpu": 1.0,
+ "memoryGb": 4.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 1.0,
+ "memoryGb": 4.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"owner": {
"tenant": "tenant3",
@@ -25,7 +41,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":1.0, "memoryGb":4.0, "diskGb":100.0, "bandwidthGbps":1.0,"diskSpeed":"fast", "storageType":"any","architecture":"any" },
+ "requestedResources": {
+ "vcpu": 1.0,
+ "memoryGb": 4.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "any",
+ "architecture": "any"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"failCount": 0,
@@ -63,9 +87,7 @@
"agent": "application"
}
],
- "ipAddresses": [
- "::102:2"
- ],
+ "ipAddresses": ["::102:2"],
"additionalIpAddresses": [],
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-os-upgrade-complete.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-os-upgrade-complete.json
index b5e8a040c30..cc38ae425b1 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-os-upgrade-complete.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-os-upgrade-complete.json
@@ -6,8 +6,24 @@
"hostname": "dockerhost1.yahoo.com",
"flavor": "large",
"cpuCores": 4.0,
- "resources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"owner": {
"tenant": "zoneapp",
@@ -25,7 +41,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":4.0, "memoryGb":32.0, "diskGb":1600.0, "bandwidthGbps":20.0, "diskSpeed": "fast", "storageType":"remote","architecture":"x86_64" },
+ "requestedResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"currentOsVersion": "7.5.2",
@@ -90,14 +114,7 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.100.1",
- "::100:1"
- ],
- "additionalIpAddresses": [
- "::100:2",
- "::100:3",
- "::100:4"
- ],
- "cloudAccount": "111222333444"
+ "ipAddresses": ["127.0.100.1", "::100:1"],
+ "additionalIpAddresses": ["::100:2", "::100:3", "::100:4"],
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-2.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-2.json
index afed3b4e17e..9094844126c 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-2.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-2.json
@@ -6,8 +6,24 @@
"hostname": "dockerhost1.yahoo.com",
"flavor": "large",
"cpuCores": 4.0,
- "resources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"owner": {
"tenant": "zoneapp",
@@ -32,7 +48,7 @@
"bandwidthGbps": 20.0,
"diskSpeed": "fast",
"storageType": "remote",
- "architecture":"x86_64"
+ "architecture": "x86_64"
},
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -107,15 +123,8 @@
"agent": "system"
}
],
- "ipAddresses": [
- "127.0.100.1",
- "::100:1"
- ],
- "additionalIpAddresses": [
- "::100:2",
- "::100:3",
- "::100:4"
- ],
+ "ipAddresses": ["127.0.100.1", "::100:1"],
+ "additionalIpAddresses": ["::100:2", "::100:3", "::100:4"],
"reports": {
"actualCpuCores": {
"createdMillis": 3
@@ -126,12 +135,9 @@
"type": "HARD_FAIL",
"details": {
"inGib": 3,
- "disks": [
- "/dev/sda1",
- "/dev/sdb3"
- ]
+ "disks": ["/dev/sda1", "/dev/sdb3"]
}
}
},
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-3.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-3.json
index 1c366d634cc..158c5388c72 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-3.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-3.json
@@ -6,8 +6,24 @@
"hostname": "dockerhost1.yahoo.com",
"flavor": "large",
"cpuCores": 4.0,
- "resources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"owner": {
"tenant": "zoneapp",
@@ -32,7 +48,7 @@
"bandwidthGbps": 20.0,
"diskSpeed": "fast",
"storageType": "remote",
- "architecture":"x86_64"
+ "architecture": "x86_64"
},
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -107,19 +123,12 @@
"agent": "system"
}
],
- "ipAddresses": [
- "127.0.100.1",
- "::100:1"
- ],
- "additionalIpAddresses": [
- "::100:2",
- "::100:3",
- "::100:4"
- ],
+ "ipAddresses": ["127.0.100.1", "::100:1"],
+ "additionalIpAddresses": ["::100:2", "::100:3", "::100:4"],
"reports": {
"actualCpuCores": {
"createdMillis": 3
}
},
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-4.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-4.json
index 98e3920b910..0984a08ad9f 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-4.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports-4.json
@@ -6,8 +6,24 @@
"hostname": "dockerhost1.yahoo.com",
"flavor": "large",
"cpuCores": 4.0,
- "resources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"owner": {
"tenant": "zoneapp",
@@ -32,7 +48,7 @@
"bandwidthGbps": 20.0,
"diskSpeed": "fast",
"storageType": "remote",
- "architecture":"x86_64"
+ "architecture": "x86_64"
},
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -107,14 +123,7 @@
"agent": "system"
}
],
- "ipAddresses": [
- "127.0.100.1",
- "::100:1"
- ],
- "additionalIpAddresses": [
- "::100:2",
- "::100:3",
- "::100:4"
- ],
- "cloudAccount": "111222333444"
+ "ipAddresses": ["127.0.100.1", "::100:1"],
+ "additionalIpAddresses": ["::100:2", "::100:3", "::100:4"],
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports.json
index dbe0222a848..5a6e8f943cd 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1-reports.json
@@ -6,8 +6,24 @@
"hostname": "dockerhost1.yahoo.com",
"flavor": "large",
"cpuCores": 4.0,
- "resources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"owner": {
"tenant": "zoneapp",
@@ -32,7 +48,7 @@
"bandwidthGbps": 20.0,
"diskSpeed": "fast",
"storageType": "remote",
- "architecture":"x86_64"
+ "architecture": "x86_64"
},
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -107,15 +123,8 @@
"agent": "system"
}
],
- "ipAddresses": [
- "127.0.100.1",
- "::100:1"
- ],
- "additionalIpAddresses": [
- "::100:2",
- "::100:3",
- "::100:4"
- ],
+ "ipAddresses": ["127.0.100.1", "::100:1"],
+ "additionalIpAddresses": ["::100:2", "::100:3", "::100:4"],
"reports": {
"actualCpuCores": {
"createdMillis": 1,
@@ -129,12 +138,9 @@
"type": "HARD_FAIL",
"details": {
"inGib": 3,
- "disks": [
- "/dev/sda1",
- "/dev/sdb3"
- ]
+ "disks": ["/dev/sda1", "/dev/sdb3"]
}
}
},
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1.json
index b5c61780c51..7327d003329 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node1.json
@@ -6,8 +6,24 @@
"hostname": "dockerhost1.yahoo.com",
"flavor": "large",
"cpuCores": 4.0,
- "resources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"owner": {
"tenant": "zoneapp",
@@ -25,7 +41,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":4.0, "memoryGb":32.0, "diskGb":1600.0, "bandwidthGbps":20.0, "diskSpeed":"fast", "storageType":"remote","architecture":"x86_64" },
+ "requestedResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"deferOsUpgrade": true,
@@ -89,14 +113,7 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.100.1",
- "::100:1"
- ],
- "additionalIpAddresses": [
- "::100:2",
- "::100:3",
- "::100:4"
- ],
- "cloudAccount": "111222333444"
+ "ipAddresses": ["127.0.100.1", "::100:1"],
+ "additionalIpAddresses": ["::100:2", "::100:3", "::100:4"],
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node2.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node2.json
index f7e02261065..61b664aeba4 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node2.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node2.json
@@ -6,8 +6,24 @@
"hostname": "dockerhost2.yahoo.com",
"flavor": "large",
"cpuCores": 4.0,
- "resources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"owner": {
"tenant": "zoneapp",
@@ -25,7 +41,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":4.0, "memoryGb":32.0, "diskGb":1600.0, "bandwidthGbps":20.0, "diskSpeed":"fast", "storageType":"remote","architecture":"x86_64" },
+ "requestedResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"deferOsUpgrade": true,
@@ -89,15 +113,8 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.101.1",
- "::101:1"
- ],
- "additionalIpAddresses": [
- "::101:2",
- "::101:3",
- "::101:4"
- ],
- "cloudAccount": "777888999000",
- "wireguardPubkey":"000011112222333344445555666677778888999900c="
+ "ipAddresses": ["127.0.101.1", "::101:1"],
+ "additionalIpAddresses": ["::101:2", "::101:3", "::101:4"],
+ "cloudAccount": "aws:777888999000",
+ "wireguardPubkey": "000011112222333344445555666677778888999900c="
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node3.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node3.json
index 480e8f7f910..af523551bfa 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node3.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node3.json
@@ -6,8 +6,24 @@
"hostname": "dockerhost3.yahoo.com",
"flavor": "large",
"cpuCores": 4.0,
- "resources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"owner": {
"tenant": "zoneapp",
@@ -25,7 +41,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":4.0, "memoryGb":32.0, "diskGb":1600.0, "bandwidthGbps":20.0, "diskSpeed":"fast", "storageType":"remote","architecture":"x86_64" },
+ "requestedResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"deferOsUpgrade": true,
@@ -89,14 +113,7 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.102.1",
- "::102:1"
- ],
- "additionalIpAddresses": [
- "::102:2",
- "::102:3",
- "::102:4"
- ],
- "cloudAccount": "111222333444"
+ "ipAddresses": ["127.0.102.1", "::102:1"],
+ "additionalIpAddresses": ["::102:2", "::102:3", "::102:4"],
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node4.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node4.json
index 163a3d7c244..826ee793b22 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node4.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node4.json
@@ -6,8 +6,24 @@
"hostname": "dockerhost4.yahoo.com",
"flavor": "large",
"cpuCores": 4.0,
- "resources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"owner": {
"tenant": "zoneapp",
@@ -25,7 +41,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":4.0, "memoryGb":32.0, "diskGb":1600.0, "bandwidthGbps":20.0, "diskSpeed":"fast", "storageType":"remote","architecture":"x86_64" },
+ "requestedResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"deferOsUpgrade": true,
@@ -89,14 +113,7 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.103.1",
- "::103:1"
- ],
- "additionalIpAddresses": [
- "::103:2",
- "::103:3",
- "::103:4"
- ],
- "cloudAccount": "111222333444"
+ "ipAddresses": ["127.0.103.1", "::103:1"],
+ "additionalIpAddresses": ["::103:2", "::103:3", "::103:4"],
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node5.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node5.json
index c160c5dcdfe..459d51ce5bc 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node5.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/docker-node5.json
@@ -6,8 +6,24 @@
"hostname": "dockerhost5.yahoo.com",
"flavor": "large",
"cpuCores": 4.0,
- "resources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"owner": {
"tenant": "zoneapp",
@@ -25,7 +41,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":4.0, "memoryGb":32.0, "diskGb":1600.0, "bandwidthGbps":20.0, "diskSpeed":"fast", "storageType":"remote","architecture":"x86_64" },
+ "requestedResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"deferOsUpgrade": true,
@@ -89,14 +113,7 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.104.1",
- "::104:1"
- ],
- "additionalIpAddresses": [
- "::104:2",
- "::104:3",
- "::104:4"
- ],
- "cloudAccount": "111222333444"
+ "ipAddresses": ["127.0.104.1", "::104:1"],
+ "additionalIpAddresses": ["::104:2", "::104:3", "::104:4"],
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost1-with-firmware-data.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost1-with-firmware-data.json
index 6d62c31ce56..8bdcd8c44c5 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost1-with-firmware-data.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost1-with-firmware-data.json
@@ -6,8 +6,24 @@
"hostname": "dockerhost1.yahoo.com",
"flavor": "large",
"cpuCores": 4.0,
- "resources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"owner": {
"tenant": "zoneapp",
@@ -25,7 +41,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":4.0, "memoryGb":32.0, "diskGb":1600.0, "bandwidthGbps":20.0, "diskSpeed":"fast", "storageType":"remote","architecture":"x86_64" },
+ "requestedResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"deferOsUpgrade": true,
@@ -101,14 +125,7 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.100.1",
- "::100:1"
- ],
- "additionalIpAddresses": [
- "::100:2",
- "::100:3",
- "::100:4"
- ],
- "cloudAccount": "111222333444"
+ "ipAddresses": ["127.0.100.1", "::100:1"],
+ "additionalIpAddresses": ["::100:2", "::100:3", "::100:4"],
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost6.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost6.json
index add2fcf87a8..b4be3fe418c 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost6.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/dockerhost6.json
@@ -6,8 +6,24 @@
"hostname": "dockerhost6.yahoo.com",
"flavor": "arm64",
"cpuCores": 4.0,
- "resources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"arm64"},
- "realResources":{"vcpu":4.0,"memoryGb":32.0,"diskGb":1600.0,"bandwidthGbps":20.0,"diskSpeed":"fast","storageType":"remote","architecture":"arm64"},
+ "resources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "arm64"
+ },
+ "realResources": {
+ "vcpu": 4.0,
+ "memoryGb": 32.0,
+ "diskGb": 1600.0,
+ "bandwidthGbps": 20.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "arm64"
+ },
"environment": "BARE_METAL",
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -69,5 +85,5 @@
],
"ipAddresses": [],
"additionalIpAddresses": [],
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/maintenance.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/maintenance.json
index 4c8c5d80018..f39a086e97a 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/maintenance.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/maintenance.json
@@ -4,6 +4,9 @@
"name": "AutoscalingMaintainer"
},
{
+ "name": "DeprovisionedExpirer"
+ },
+ {
"name": "DirtyExpirer"
},
{
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node1.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node1.json
index d90ed692f1c..cddf865361a 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node1.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node1.json
@@ -4,9 +4,25 @@
"state": "active",
"type": "tenant",
"hostname": "host1.yahoo.com",
- "flavor": "[vcpu: 2.0, memory: 8.0 Gb, disk 50.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
- "resources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":50.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
- "realResources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":50.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
+ "flavor": "[vcpu: 2.0, memory: 8.0 Gb, disk: 50.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
+ "resources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"owner": {
"tenant": "tenant1",
@@ -24,7 +40,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":2.0, "memoryGb":8.0, "diskGb":50.0, "bandwidthGbps":1.0, "diskSpeed":"fast", "storageType":"any","architecture":"any" },
+ "requestedResources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "any",
+ "architecture": "any"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"failCount": 0,
@@ -52,7 +76,8 @@
{
"event": "activated",
"at": 123,
- "agent": "application"}
+ "agent": "application"
+ }
],
"log": [
{
@@ -86,10 +111,7 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.1.1",
- "::1:1"
- ],
+ "ipAddresses": ["127.0.1.1", "::1:1"],
"additionalIpAddresses": [],
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node10.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node10.json
index bec194ea325..7ccc0660548 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node10.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node10.json
@@ -5,9 +5,25 @@
"type": "tenant",
"hostname": "host10.yahoo.com",
"parentHostname": "parent1.yahoo.com",
- "flavor": "[vcpu: 2.0, memory: 8.0 Gb, disk 50.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
- "resources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":50.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
- "realResources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":50.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
+ "flavor": "[vcpu: 2.0, memory: 8.0 Gb, disk: 50.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
+ "resources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"owner": {
"tenant": "tenant1",
@@ -25,7 +41,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":2.0, "memoryGb":8.0, "diskGb":50.0, "bandwidthGbps":1.0, "diskSpeed":"fast", "storageType":"any","architecture":"any" },
+ "requestedResources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "any",
+ "architecture": "any"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"vespaVersion": "5.104.142",
@@ -90,10 +114,7 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.10.1",
- "::10:1"
- ],
+ "ipAddresses": ["127.0.10.1", "::10:1"],
"additionalIpAddresses": [],
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node11.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node11.json
index d7e07f02f3a..60c55713b03 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node11.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node11.json
@@ -5,9 +5,25 @@
"type": "tenant",
"hostname": "host11.yahoo.com",
"parentHostname": "parent.host.yahoo.com",
- "flavor": "[vcpu: 1.0, memory: 1.0 Gb, disk 100.0 Gb, bandwidth: 0.3 Gbps, architecture: any]",
- "resources":{"vcpu":1.0,"memoryGb":1.0,"diskGb":100.0,"bandwidthGbps":0.3,"diskSpeed":"fast","storageType":"any","architecture":"any"},
- "realResources":{"vcpu":1.0,"memoryGb":1.0,"diskGb":100.0,"bandwidthGbps":0.3,"diskSpeed":"fast","storageType":"any","architecture":"any"},
+ "flavor": "[vcpu: 1.0, memory: 1.0 Gb, disk: 100.0 Gb, bandwidth: 0.3 Gbps, architecture: any]",
+ "resources": {
+ "vcpu": 1.0,
+ "memoryGb": 1.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 0.3,
+ "diskSpeed": "fast",
+ "storageType": "any",
+ "architecture": "any"
+ },
+ "realResources": {
+ "vcpu": 1.0,
+ "memoryGb": 1.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 0.3,
+ "diskSpeed": "fast",
+ "storageType": "any",
+ "architecture": "any"
+ },
"environment": "DOCKER_CONTAINER",
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -31,10 +47,7 @@
"agent": "operator"
}
],
- "ipAddresses": [
- "::11"
- ],
- "additionalIpAddresses": [
- ],
- "cloudAccount":"111222333444"
+ "ipAddresses": ["::11"],
+ "additionalIpAddresses": [],
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node13.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node13.json
index 73c34a7fa9e..f5152efd7cb 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node13.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node13.json
@@ -4,7 +4,7 @@
"state": "active",
"type": "tenant",
"hostname": "host13.yahoo.com",
- "flavor": "[vcpu: 10.0, memory: 48.0 Gb, disk 500.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
+ "flavor": "[vcpu: 10.0, memory: 48.0 Gb, disk: 500.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
"resources":{"vcpu":10.0,"memoryGb":48.0,"diskGb":500.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
"realResources":{"vcpu":10.0,"memoryGb":48.0,"diskGb":500.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
"environment": "DOCKER_CONTAINER",
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node14.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node14.json
index abb0ba57e49..f48e52b18bf 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node14.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node14.json
@@ -4,7 +4,7 @@
"state": "active",
"type": "tenant",
"hostname": "host14.yahoo.com",
- "flavor": "[vcpu: 10.0, memory: 48.0 Gb, disk 500.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
+ "flavor": "[vcpu: 10.0, memory: 48.0 Gb, disk: 500.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
"resources":{"vcpu":10.0,"memoryGb":48.0,"diskGb":500.0,"bandwidthGbps":1.0, "diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
"realResources":{"vcpu":10.0,"memoryGb":48.0,"diskGb":500.0,"bandwidthGbps":1.0, "diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
"environment": "DOCKER_CONTAINER",
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node2.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node2.json
index 9cd675163f0..7266343069e 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node2.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node2.json
@@ -4,9 +4,25 @@
"state": "active",
"type": "tenant",
"hostname": "host2.yahoo.com",
- "flavor": "[vcpu: 2.0, memory: 8.0 Gb, disk 50.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
- "resources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":50.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
- "realResources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":50.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
+ "flavor": "[vcpu: 2.0, memory: 8.0 Gb, disk: 50.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
+ "resources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"owner": {
"tenant": "tenant2",
@@ -24,7 +40,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":2.0, "memoryGb":8.0, "diskGb":50.0, "bandwidthGbps":1.0, "diskSpeed":"fast", "storageType":"any","architecture":"any" },
+ "requestedResources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "any",
+ "architecture": "any"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"failCount": 0,
@@ -87,10 +111,7 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.2.1",
- "::2:1"
- ],
+ "ipAddresses": ["127.0.2.1", "::2:1"],
"additionalIpAddresses": [],
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node3.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node3.json
index 1c560c2f95b..1c7162f64d4 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node3.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node3.json
@@ -4,9 +4,25 @@
"state": "ready",
"type": "tenant",
"hostname": "host3.yahoo.com",
- "flavor": "[vcpu: 0.5, memory: 48.0 Gb, disk 500.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
- "resources":{"vcpu":0.5,"memoryGb":48.0,"diskGb":500.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
- "realResources":{"vcpu":0.5,"memoryGb":48.0,"diskGb":500.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
+ "flavor": "[vcpu: 0.5, memory: 48.0 Gb, disk: 500.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
+ "resources": {
+ "vcpu": 0.5,
+ "memoryGb": 48.0,
+ "diskGb": 500.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 0.5,
+ "memoryGb": 48.0,
+ "diskGb": 500.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -45,10 +61,7 @@
"agent": "system"
}
],
- "ipAddresses": [
- "127.0.3.1",
- "::3:1"
- ],
+ "ipAddresses": ["127.0.3.1", "::3:1"],
"additionalIpAddresses": [],
- "cloudAccount": "777888999000"
+ "cloudAccount": "aws:777888999000"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-after-changes.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-after-changes.json
index 03621c40f67..950a69958d0 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-after-changes.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-after-changes.json
@@ -7,8 +7,24 @@
"parentHostname": "parent.yahoo.com",
"flavor": "d-2-8-100",
"cpuCores": 2.0,
- "resources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"owner": {
"tenant": "tenant3",
@@ -26,7 +42,15 @@
"currentRestartGeneration": 1,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":1.0, "memoryGb":4.0, "diskGb":100.0, "bandwidthGbps":1.0, "diskSpeed":"fast", "storageType":"any","architecture":"any" },
+ "requestedResources": {
+ "vcpu": 1.0,
+ "memoryGb": 4.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "any",
+ "architecture": "any"
+ },
"orchestratorStatus": "ALLOWED_TO_BE_DOWN",
"suspendedSinceMillis": 0,
"rebootGeneration": 2,
@@ -133,10 +157,7 @@
"agent": "operator"
}
],
- "ipAddresses": [
- "127.0.0.1",
- "::1"
- ],
+ "ipAddresses": ["127.0.0.1", "::1"],
"additionalIpAddresses": [],
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-wg.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-wg.json
index a1883ba4b25..7961fb08719 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-wg.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-wg.json
@@ -5,9 +5,25 @@
"type": "tenant",
"hostname": "host4.yahoo.com",
"parentHostname": "dockerhost1.yahoo.com",
- "flavor": "[vcpu: 1.0, memory: 4.0 Gb, disk 100.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
- "resources":{"vcpu":1.0,"memoryGb":4.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
- "realResources":{"vcpu":1.0,"memoryGb":4.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
+ "flavor": "[vcpu: 1.0, memory: 4.0 Gb, disk: 100.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
+ "resources": {
+ "vcpu": 1.0,
+ "memoryGb": 4.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 1.0,
+ "memoryGb": 4.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"owner": {
"tenant": "tenant3",
@@ -25,7 +41,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":1.0, "memoryGb":4.0, "diskGb":100.0, "bandwidthGbps":1.0, "diskSpeed":"fast", "storageType":"any","architecture":"any" },
+ "requestedResources": {
+ "vcpu": 1.0,
+ "memoryGb": 4.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "any",
+ "architecture": "any"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"vespaVersion": "6.41.0",
@@ -90,11 +114,8 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.4.1",
- "::4:1"
- ],
+ "ipAddresses": ["127.0.4.1", "::4:1"],
"additionalIpAddresses": [],
- "cloudAccount": "111222333444",
+ "cloudAccount": "aws:111222333444",
"wireguardPubkey": "lololololololololololololololololololololoo="
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-with-hostnames.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-with-hostnames.json
index 50007fd6610..ca9cf44df80 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-with-hostnames.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4-with-hostnames.json
@@ -5,9 +5,25 @@
"type": "tenant",
"hostname": "host4.yahoo.com",
"parentHostname": "dockerhost1.yahoo.com",
- "flavor": "[vcpu: 1.0, memory: 4.0 Gb, disk 100.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
- "resources":{"vcpu":1.0,"memoryGb":4.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
- "realResources":{"vcpu":1.0,"memoryGb":4.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
+ "flavor": "[vcpu: 1.0, memory: 4.0 Gb, disk: 100.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
+ "resources": {
+ "vcpu": 1.0,
+ "memoryGb": 4.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 1.0,
+ "memoryGb": 4.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"owner": {
"tenant": "tenant3",
@@ -25,7 +41,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":1.0, "memoryGb":4.0, "diskGb":100.0, "bandwidthGbps":1.0, "diskSpeed":"fast", "storageType":"any","architecture":"any" },
+ "requestedResources": {
+ "vcpu": 1.0,
+ "memoryGb": 4.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "any",
+ "architecture": "any"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"vespaVersion": "6.41.0",
@@ -90,11 +114,8 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.4.1",
- "::4:1"
- ],
+ "ipAddresses": ["127.0.4.1", "::4:1"],
"additionalIpAddresses": [],
- "additionalHostnames": ["a","b"],
- "cloudAccount": "111222333444"
+ "additionalHostnames": ["a", "b"],
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4.json
index f206adf4366..626765239e6 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node4.json
@@ -5,9 +5,25 @@
"type": "tenant",
"hostname": "host4.yahoo.com",
"parentHostname": "dockerhost1.yahoo.com",
- "flavor": "[vcpu: 1.0, memory: 4.0 Gb, disk 100.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
- "resources":{"vcpu":1.0,"memoryGb":4.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
- "realResources":{"vcpu":1.0,"memoryGb":4.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
+ "flavor": "[vcpu: 1.0, memory: 4.0 Gb, disk: 100.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
+ "resources": {
+ "vcpu": 1.0,
+ "memoryGb": 4.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 1.0,
+ "memoryGb": 4.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"owner": {
"tenant": "tenant3",
@@ -25,7 +41,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":1.0, "memoryGb":4.0, "diskGb":100.0, "bandwidthGbps":1.0, "diskSpeed":"fast", "storageType":"any","architecture":"any" },
+ "requestedResources": {
+ "vcpu": 1.0,
+ "memoryGb": 4.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "any",
+ "architecture": "any"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"vespaVersion": "6.41.0",
@@ -90,10 +114,7 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.4.1",
- "::4:1"
- ],
+ "ipAddresses": ["127.0.4.1", "::4:1"],
"additionalIpAddresses": [],
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5-after-changes.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5-after-changes.json
index 77dd81c736a..bf2f37d7c50 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5-after-changes.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5-after-changes.json
@@ -5,9 +5,25 @@
"type": "tenant",
"hostname": "host5.yahoo.com",
"parentHostname": "dockerhost2.yahoo.com",
- "flavor": "[vcpu: 1.0, memory: 8.0 Gb, disk 100.0 Gb, bandwidth: 1.0 Gbps, disk speed: slow, storage type: remote, architecture: x86_64]",
- "resources":{"vcpu":1.0,"memoryGb":8.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"slow","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":1.0,"memoryGb":8.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"slow","storageType":"remote","architecture":"x86_64"},
+ "flavor": "[vcpu: 1.0, memory: 8.0 Gb, disk: 100.0 Gb, bandwidth: 1.0 Gbps, disk speed: slow, storage type: remote, architecture: x86_64]",
+ "resources": {
+ "vcpu": 1.0,
+ "memoryGb": 8.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "slow",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 1.0,
+ "memoryGb": 8.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "slow",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -56,10 +72,7 @@
"agent": "system"
}
],
- "ipAddresses": [
- "127.0.5.1",
- "::5:1"
- ],
+ "ipAddresses": ["127.0.5.1", "::5:1"],
"additionalIpAddresses": [],
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5.json
index 8a397fe5faa..2d74768e53c 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node5.json
@@ -5,9 +5,25 @@
"type": "tenant",
"hostname": "host5.yahoo.com",
"parentHostname": "dockerhost2.yahoo.com",
- "flavor": "[vcpu: 1.0, memory: 8.0 Gb, disk 100.0 Gb, bandwidth: 1.0 Gbps, disk speed: slow, storage type: remote, architecture: x86_64]",
- "resources":{"vcpu":1.0,"memoryGb":8.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"slow","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":1.0,"memoryGb":8.0,"diskGb":100.0,"bandwidthGbps":1.0,"diskSpeed":"slow","storageType":"remote","architecture":"x86_64"},
+ "flavor": "[vcpu: 1.0, memory: 8.0 Gb, disk: 100.0 Gb, bandwidth: 1.0 Gbps, disk speed: slow, storage type: remote, architecture: x86_64]",
+ "resources": {
+ "vcpu": 1.0,
+ "memoryGb": 8.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "slow",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 1.0,
+ "memoryGb": 8.0,
+ "diskGb": 100.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "slow",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -58,10 +74,7 @@
"agent": "system"
}
],
- "ipAddresses": [
- "127.0.5.1",
- "::5:1"
- ],
+ "ipAddresses": ["127.0.5.1", "::5:1"],
"additionalIpAddresses": [],
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node55.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node55.json
index 2bbe4a3024e..2961434af8f 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node55.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node55.json
@@ -4,9 +4,25 @@
"state": "dirty",
"type": "tenant",
"hostname": "host55.yahoo.com",
- "flavor": "[vcpu: 2.0, memory: 8.0 Gb, disk 50.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
- "resources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":50.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
- "realResources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":50.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
+ "flavor": "[vcpu: 2.0, memory: 8.0 Gb, disk: 50.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
+ "resources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -40,10 +56,7 @@
"agent": "system"
}
],
- "ipAddresses": [
- "127.0.55.1",
- "::55:1"
- ],
+ "ipAddresses": ["127.0.55.1", "::55:1"],
"additionalIpAddresses": [],
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node6.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node6.json
index 69316b1ca7f..a304de951ed 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node6.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node6.json
@@ -4,9 +4,25 @@
"state": "active",
"type": "tenant",
"hostname": "host6.yahoo.com",
- "flavor": "[vcpu: 2.0, memory: 8.0 Gb, disk 50.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
- "resources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":50.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
- "realResources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":50.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
+ "flavor": "[vcpu: 2.0, memory: 8.0 Gb, disk: 50.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
+ "resources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"owner": {
"tenant": "tenant2",
@@ -24,7 +40,15 @@
"currentRestartGeneration": 0,
"wantedDockerImage": "docker-registry.domain.tld:8080/dist/vespa:6.42.0",
"wantedVespaVersion": "6.42.0",
- "requestedResources": { "vcpu":2.0, "memoryGb":8.0, "diskGb":50.0, "bandwidthGbps":1.0, "diskSpeed":"fast", "storageType":"any","architecture":"any" },
+ "requestedResources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "any",
+ "architecture": "any"
+ },
"rebootGeneration": 0,
"currentRebootGeneration": 0,
"failCount": 0,
@@ -87,10 +111,7 @@
"agent": "application"
}
],
- "ipAddresses": [
- "127.0.6.1",
- "::6:1"
- ],
+ "ipAddresses": ["127.0.6.1", "::6:1"],
"additionalIpAddresses": [],
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node7.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node7.json
index 19fa81b82e0..9c77c7778e0 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node7.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node7.json
@@ -4,9 +4,25 @@
"state": "provisioned",
"type": "tenant",
"hostname": "host7.yahoo.com",
- "flavor": "[vcpu: 2.0, memory: 8.0 Gb, disk 50.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
- "resources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":50.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
- "realResources":{"vcpu":2.0,"memoryGb":8.0,"diskGb":50.0,"bandwidthGbps":1.0,"diskSpeed":"fast","storageType":"local","architecture":"x86_64"},
+ "flavor": "[vcpu: 2.0, memory: 8.0 Gb, disk: 50.0 Gb, bandwidth: 1.0 Gbps, storage type: local, architecture: x86_64]",
+ "resources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 2.0,
+ "memoryGb": 8.0,
+ "diskGb": 50.0,
+ "bandwidthGbps": 1.0,
+ "diskSpeed": "fast",
+ "storageType": "local",
+ "architecture": "x86_64"
+ },
"environment": "DOCKER_CONTAINER",
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -30,10 +46,7 @@
"agent": "system"
}
],
- "ipAddresses": [
- "127.0.7.1",
- "::7:1"
- ],
+ "ipAddresses": ["127.0.7.1", "::7:1"],
"additionalIpAddresses": [],
- "cloudAccount": "111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node8.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node8.json
index bbef88ca1b0..08c5c0a13c6 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node8.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node8.json
@@ -50,5 +50,5 @@
],
"ipAddresses": ["127.0.8.1"],
"additionalIpAddresses": ["127.0.8.2"],
- "cloudAccount":"111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node9.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node9.json
index e9199905b21..0285975f9af 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node9.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/node9.json
@@ -6,8 +6,24 @@
"hostname": "host9.yahoo.com",
"flavor": "large-variant",
"cpuCores": 64.0,
- "resources":{"vcpu":64.0,"memoryGb":128.0,"diskGb":2000.0,"bandwidthGbps":15.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources":{"vcpu":64.0,"memoryGb":128.0,"diskGb":2000.0,"bandwidthGbps":15.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 64.0,
+ "memoryGb": 128.0,
+ "diskGb": 2000.0,
+ "bandwidthGbps": 15.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 64.0,
+ "memoryGb": 128.0,
+ "diskGb": 2000.0,
+ "bandwidthGbps": 15.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -32,11 +48,8 @@
"agent": "operator"
}
],
- "ipAddresses": [
- "127.0.9.1",
- "::9:1"
- ],
+ "ipAddresses": ["127.0.9.1", "::9:1"],
"additionalIpAddresses": [],
"additionalHostnames": ["node9-1.yahoo.com"],
- "cloudAccount":"111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/parent2.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/parent2.json
index cfcc59a3454..a8759423ecd 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/parent2.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/parent2.json
@@ -8,8 +8,24 @@
"reservedTo": "myTenant",
"exclusiveTo": "tenant1:app1:instance1",
"cpuCores": 64.0,
- "resources": {"vcpu":64.0,"memoryGb":128.0,"diskGb":2000.0,"bandwidthGbps":15.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
- "realResources": {"vcpu":64.0,"memoryGb":128.0,"diskGb":2000.0,"bandwidthGbps":15.0,"diskSpeed":"fast","storageType":"remote","architecture":"x86_64"},
+ "resources": {
+ "vcpu": 64.0,
+ "memoryGb": 128.0,
+ "diskGb": 2000.0,
+ "bandwidthGbps": 15.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
+ "realResources": {
+ "vcpu": 64.0,
+ "memoryGb": 128.0,
+ "diskGb": 2000.0,
+ "bandwidthGbps": 15.0,
+ "diskSpeed": "fast",
+ "storageType": "remote",
+ "architecture": "x86_64"
+ },
"environment": "BARE_METAL",
"rebootGeneration": 0,
"currentRebootGeneration": 0,
@@ -34,10 +50,7 @@
"agent": "operator"
}
],
- "ipAddresses": [
- "127.0.127.1",
- "::127:1"
- ],
+ "ipAddresses": ["127.0.127.1", "::127:1"],
"additionalIpAddresses": [],
- "cloudAccount":"111222333444"
+ "cloudAccount": "aws:111222333444"
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/wireguard.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/wireguard.json
index 660b92d92ba..5369229bd75 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/wireguard.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/wireguard.json
@@ -1,10 +1,9 @@
{
- "configservers":
- [
+ "configservers": [
{
- "hostname":"cfg1.yahoo.com",
- "wireguardPubkey":"lololololololololololololololololololololoo=",
- "ipAddresses":["127.0.201.1","::201:1"]
+ "hostname": "cfg1.yahoo.com",
+ "wireguardPubkey": "lololololololololololololololololololololoo=",
+ "ipAddresses": ["::201:1"]
}
]
}