diff options
4 files changed, 10 insertions, 11 deletions
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/ClusterMembership.java b/config-provisioning/src/main/java/com/yahoo/config/provision/ClusterMembership.java index 9fb1689782f..031fce88354 100644 --- a/config-provisioning/src/main/java/com/yahoo/config/provision/ClusterMembership.java +++ b/config-provisioning/src/main/java/com/yahoo/config/provision/ClusterMembership.java @@ -72,8 +72,7 @@ public class ClusterMembership { "/" + index + ( cluster.isExclusive() ? "/exclusive" : "") + ( retired ? "/retired" : "") + - // TODO(mpolden): Write stateful tag once all nodes can read it - // ( cluster.isStateful() ? "/stateful" : "") + + ( cluster.isStateful() ? "/stateful" : "") + ( cluster.combinedId().isPresent() ? "/" + cluster.combinedId().get().value() : ""); } diff --git a/config-provisioning/src/test/java/com/yahoo/config/provision/ClusterMembershipTest.java b/config-provisioning/src/test/java/com/yahoo/config/provision/ClusterMembershipTest.java index 1f170cca9a0..fc1cdd74169 100644 --- a/config-provisioning/src/test/java/com/yahoo/config/provision/ClusterMembershipTest.java +++ b/config-provisioning/src/test/java/com/yahoo/config/provision/ClusterMembershipTest.java @@ -48,10 +48,10 @@ public class ClusterMembershipTest { assertEquals(dockerImageRepo.get(), instance.cluster().dockerImageRepo().get()); } { - ClusterMembership instance = ClusterMembership.from("container/id1/4/37", Vtag.currentVersion, Optional.empty()); + ClusterMembership instance = ClusterMembership.from("container/id1/4/37/stateful", Vtag.currentVersion, Optional.empty()); ClusterMembership serialized = ClusterMembership.from(instance.stringValue(), Vtag.currentVersion, Optional.empty()); assertEquals(instance, serialized); - assertFalse("Skips serialization of stateful property", instance.cluster().isStateful()); + assertTrue(instance.cluster().isStateful()); } } @@ -117,7 +117,7 @@ public class ClusterMembershipTest { assertFalse(instance.cluster().group().isPresent()); assertEquals(37, instance.index()); assertFalse(instance.retired()); - assertEquals("content/id1/37", instance.stringValue()); + assertEquals("content/id1/37/stateful", instance.stringValue()); } private void assertContentServiceWithGroup(ClusterMembership instance) { @@ -126,7 +126,7 @@ public class ClusterMembershipTest { assertEquals(4, instance.cluster().group().get().index()); assertEquals(37, instance.index()); assertFalse(instance.retired()); - assertEquals("content/id1/4/37", instance.stringValue()); + assertEquals("content/id1/4/37/stateful", instance.stringValue()); } /** Serializing a spec without a group assigned works, but not deserialization */ @@ -135,7 +135,7 @@ public class ClusterMembershipTest { assertEquals("id1", instance.cluster().id().value()); assertEquals(37, instance.index()); assertTrue(instance.retired()); - assertEquals("content/id1/37/retired", instance.stringValue()); + assertEquals("content/id1/37/retired/stateful", instance.stringValue()); } private void assertContentServiceWithGroupAndRetire(ClusterMembership instance) { @@ -144,7 +144,7 @@ public class ClusterMembershipTest { assertEquals(4, instance.cluster().group().get().index()); assertEquals(37, instance.index()); assertTrue(instance.retired()); - assertEquals("content/id1/4/37/retired", instance.stringValue()); + assertEquals("content/id1/4/37/retired/stateful", instance.stringValue()); } } 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 86427fe30ae..3945c518a77 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 @@ -485,7 +485,7 @@ public class NodesV2ApiTest { "{\"message\":\"Moved host2.yahoo.com to parked\"}"); tester.assertResponse(new Request("http://localhost:8080/nodes/v2/state/ready/host2.yahoo.com", new byte[0], Request.Method.PUT), - 400, "{\"error-code\":\"BAD_REQUEST\",\"message\":\"Cannot make parked host host2.yahoo.com allocated to tenant2.application2.instance2 as 'content/id2/0/0' available for new allocation as it is not in state [dirty]\"}"); + 400, "{\"error-code\":\"BAD_REQUEST\",\"message\":\"Cannot make parked host host2.yahoo.com allocated to tenant2.application2.instance2 as 'content/id2/0/0/stateful' available for new allocation as it is not in state [dirty]\"}"); // (... while dirty then ready works (the ready move will be initiated by node maintenance)) assertResponse(new Request("http://localhost:8080/nodes/v2/state/dirty/host2.yahoo.com", new byte[0], Request.Method.PUT), @@ -502,7 +502,7 @@ public class NodesV2ApiTest { // Attempt to DELETE allocated node tester.assertResponse(new Request("http://localhost:8080/nodes/v2/node/host4.yahoo.com", new byte[0], Request.Method.DELETE), - 400, "{\"error-code\":\"BAD_REQUEST\",\"message\":\"active child node host4.yahoo.com allocated to tenant3.application3.instance3 as 'content/id3/0/0' is currently allocated and cannot be removed\"}"); + 400, "{\"error-code\":\"BAD_REQUEST\",\"message\":\"active child node host4.yahoo.com allocated to tenant3.application3.instance3 as 'content/id3/0/0/stateful' is currently allocated and cannot be removed\"}"); // PUT current restart generation with string instead of long tester.assertResponse(new Request("http://localhost:8080/nodes/v2/node/host4.yahoo.com", 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 7104957ba98..c3857e9c8ee 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 @@ -4,7 +4,7 @@ "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]", - "failedTenantAllocation": "allocated to tenant3.application3.instance3 as 'content/id3/0/0'", + "failedTenantAllocation": "allocated to tenant3.application3.instance3 as 'content/id3/0/0/stateful'", "hostCandidateRejectionReasons": { "singularReasonFailures": { "insufficientVcpu": 0, |