aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configdefinitions/src/vespa/orchestrator.def9
-rw-r--r--flags/src/main/java/com/yahoo/vespa/flags/Flags.java10
-rw-r--r--orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorImpl.java9
-rw-r--r--orchestrator/src/main/java/com/yahoo/vespa/orchestrator/model/ApplicationApiFactory.java6
-rw-r--r--orchestrator/src/test/java/com/yahoo/vespa/orchestrator/OrchestratorImplTest.java2
-rw-r--r--orchestrator/src/test/java/com/yahoo/vespa/orchestrator/OrchestratorTest.java2
-rw-r--r--orchestrator/src/test/java/com/yahoo/vespa/orchestrator/model/ModelTestUtils.java5
-rw-r--r--orchestrator/src/test/java/com/yahoo/vespa/orchestrator/policy/HostedVespaPolicyTest.java2
-rw-r--r--orchestrator/src/test/java/com/yahoo/vespa/orchestrator/resources/HostRequestHandlerTest.java2
9 files changed, 23 insertions, 24 deletions
diff --git a/configdefinitions/src/vespa/orchestrator.def b/configdefinitions/src/vespa/orchestrator.def
index 9d524065a55..54a87467bfc 100644
--- a/configdefinitions/src/vespa/orchestrator.def
+++ b/configdefinitions/src/vespa/orchestrator.def
@@ -4,12 +4,5 @@ namespace=vespa.orchestrator.config
# TODO: Change the default to actual latency in real setup.
serviceMonitorConvergenceLatencySeconds int default=0
+# The number of services in the routing/container cluster of hosted-vespa.routing.default.
numProxies int default=0
-
-# Application ID of the form TENANT:NAME:INSTANCE.
-application[].applicationId string
-application[].cluster[].clusterId string
-application[].cluster[].serviceType string
-# The expected number of services in the cluster: If the number of services is less than this count, the missing
-# services must be assumed to be down.
-application[].cluster[].clusterSize int
diff --git a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java
index c9d8c601927..8c3d7c4b023 100644
--- a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java
+++ b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java
@@ -13,9 +13,7 @@ import java.util.Optional;
import java.util.TreeMap;
import static com.yahoo.vespa.flags.FetchVector.Dimension.APPLICATION_ID;
-import static com.yahoo.vespa.flags.FetchVector.Dimension.CLUSTER_TYPE;
import static com.yahoo.vespa.flags.FetchVector.Dimension.HOSTNAME;
-import static com.yahoo.vespa.flags.FetchVector.Dimension.TENANT_ID;
import static com.yahoo.vespa.flags.FetchVector.Dimension.VESPA_VERSION;
import static com.yahoo.vespa.flags.FetchVector.Dimension.ZONE_ID;
@@ -122,6 +120,12 @@ public class Flags {
"Takes effect at redeployment",
ZONE_ID, APPLICATION_ID);
+ public static final UnboundBooleanFlag ORCHESTRATE_MISSING_PROXIES = defineFeatureFlag(
+ "orchestrate-missing-proxies", false,
+ List.of("hakonhall"), "2020-08-05", "2020-10-05",
+ "Whether the Orchestrator can assume any missing proxy services are down.",
+ "Takes effect immediately");
+
public static final UnboundBooleanFlag GROUP_SUSPENSION = defineFeatureFlag(
"group-suspension", true,
List.of("hakon"), "2021-01-22", "2021-08-22",
@@ -131,7 +135,7 @@ public class Flags {
public static final UnboundBooleanFlag ENCRYPT_DIRTY_DISK = defineFeatureFlag(
"encrypt-dirty-disk", false,
- List.of("hakonhall"), "2021-05-14", "2021-08-05",
+ List.of("hakonhall"), "2021-05-14", "2021-10-05",
"Allow migrating an unencrypted data partition to being encrypted when (de)provisioned.",
"Takes effect on next host-admin tick.");
diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorImpl.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorImpl.java
index f54f6606000..061b3f706a5 100644
--- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorImpl.java
+++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorImpl.java
@@ -13,6 +13,7 @@ import com.yahoo.vespa.applicationmodel.HostName;
import com.yahoo.vespa.applicationmodel.ServiceCluster;
import com.yahoo.vespa.applicationmodel.ServiceInstance;
import com.yahoo.vespa.flags.FlagSource;
+import com.yahoo.vespa.flags.Flags;
import com.yahoo.vespa.orchestrator.config.OrchestratorConfig;
import com.yahoo.vespa.orchestrator.controller.ClusterControllerClient;
import com.yahoo.vespa.orchestrator.controller.ClusterControllerClientFactory;
@@ -85,11 +86,17 @@ public class OrchestratorImpl implements Orchestrator {
zone,
Clock.systemUTC(),
new ApplicationApiFactory(configServerConfig.zookeeperserver().size(),
- orchestratorConfig.numProxies(),
+ resolveNumProxies(orchestratorConfig, flagSource),
Clock.systemUTC()),
orchestratorConfig.serviceMonitorConvergenceLatencySeconds());
}
+ private static int resolveNumProxies(OrchestratorConfig orchestratorConfig, FlagSource flagSource) {
+ return Flags.ORCHESTRATE_MISSING_PROXIES.bindTo(flagSource).value() ?
+ orchestratorConfig.numProxies() :
+ 0;
+ }
+
private OrchestratorImpl(ClusterControllerClientFactory clusterControllerClientFactory,
StatusService statusService,
ServiceMonitor serviceMonitor,
diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/model/ApplicationApiFactory.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/model/ApplicationApiFactory.java
index 82791d3b305..35dd9c5051a 100644
--- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/model/ApplicationApiFactory.java
+++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/model/ApplicationApiFactory.java
@@ -18,12 +18,6 @@ public class ApplicationApiFactory {
private final OrchestrationParams orchestrationParams;
private final Clock clock;
- // TODO: REMOVE
- public ApplicationApiFactory(int numberOfConfigServers, Clock clock) {
- this.orchestrationParams = HostedVespaOrchestration.create(numberOfConfigServers, 0);
- this.clock = clock;
- }
-
public ApplicationApiFactory(int numberOfConfigServers, int numProxies, Clock clock) {
this.orchestrationParams = HostedVespaOrchestration.create(numberOfConfigServers, numProxies);
this.clock = clock;
diff --git a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/OrchestratorImplTest.java b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/OrchestratorImplTest.java
index 7d1b69d7171..957c748d0b3 100644
--- a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/OrchestratorImplTest.java
+++ b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/OrchestratorImplTest.java
@@ -81,7 +81,7 @@ public class OrchestratorImplTest {
private static final Zone zone = Zone.defaultZone();
private final ManualClock clock = new ManualClock();
- private final ApplicationApiFactory applicationApiFactory = new ApplicationApiFactory(3, clock);
+ private final ApplicationApiFactory applicationApiFactory = new ApplicationApiFactory(3, 5, clock);
private final InMemoryFlagSource flagSource = new InMemoryFlagSource();
private final MockCurator curator = new MockCurator();
private final ZkStatusService statusService = new ZkStatusService(
diff --git a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/OrchestratorTest.java b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/OrchestratorTest.java
index 193798d35fc..83c902ed981 100644
--- a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/OrchestratorTest.java
+++ b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/OrchestratorTest.java
@@ -57,7 +57,7 @@ public class OrchestratorTest {
var flagSource = new InMemoryFlagSource();
var timer = new TestTimer();
var clustercontroller = new ClusterControllerClientFactoryMock();
- var applicationApiFactory = new ApplicationApiFactory(3, timer.toUtcClock());
+ var applicationApiFactory = new ApplicationApiFactory(3, 5, timer.toUtcClock());
var policy = new HostedVespaPolicy(new HostedVespaClusterPolicy(flagSource, zone), clustercontroller, applicationApiFactory);
var zone = new Zone(SystemName.cd, Environment.prod, RegionName.from("cd-us-east-1"));
this.superModelManager = new MySuperModelProvider();
diff --git a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/model/ModelTestUtils.java b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/model/ModelTestUtils.java
index 6ec03ba3c44..ac7b10c034e 100644
--- a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/model/ModelTestUtils.java
+++ b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/model/ModelTestUtils.java
@@ -63,8 +63,9 @@ class ModelTestUtils {
new ApplicationInstanceId("application-name:foo:bar:default");
public static final int NUMBER_OF_CONFIG_SERVERS = 3;
+ public static final int NUMBER_OF_PROXIES = 5;
public static final OrchestrationParams ORCHESTRATION_PARAMS =
- HostedVespaOrchestration.create(NUMBER_OF_CONFIG_SERVERS, 0);
+ HostedVespaOrchestration.create(NUMBER_OF_CONFIG_SERVERS, NUMBER_OF_PROXIES);
public static final ApplicationParams APPLICATION_PARAMS = ORCHESTRATION_PARAMS
.getApplicationParams(OrchestratorUtil.toApplicationId(
new ApplicationInstanceReference(TENANT_ID, APPLICATION_INSTANCE_ID)));
@@ -92,7 +93,7 @@ class ModelTestUtils {
private final ManualClock clock = new ManualClock();
ApplicationApiFactory applicationApiFactory() {
- return new ApplicationApiFactory(NUMBER_OF_CONFIG_SERVERS, clock);
+ return new ApplicationApiFactory(NUMBER_OF_CONFIG_SERVERS, NUMBER_OF_PROXIES, clock);
}
HostInfos getHostInfos() {
diff --git a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/policy/HostedVespaPolicyTest.java b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/policy/HostedVespaPolicyTest.java
index 385f7b238af..37b1615abbd 100644
--- a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/policy/HostedVespaPolicyTest.java
+++ b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/policy/HostedVespaPolicyTest.java
@@ -36,7 +36,7 @@ public class HostedVespaPolicyTest {
private final ClusterControllerClientFactory clientFactory = mock(ClusterControllerClientFactory.class);
private final ClusterControllerClient client = mock(ClusterControllerClient.class);
private final ManualClock clock = new ManualClock();
- private final ApplicationApiFactory applicationApiFactory = new ApplicationApiFactory(3, clock);
+ private final ApplicationApiFactory applicationApiFactory = new ApplicationApiFactory(3, 5, clock);
@Before
public void setUp() {
diff --git a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/resources/HostRequestHandlerTest.java b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/resources/HostRequestHandlerTest.java
index f6dc6d7676c..3f1aa2d5a2e 100644
--- a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/resources/HostRequestHandlerTest.java
+++ b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/resources/HostRequestHandlerTest.java
@@ -79,7 +79,7 @@ class HostRequestHandlerTest {
private static final ServiceMonitor serviceMonitor = mock(ServiceMonitor.class);
private static final StatusService EVERY_HOST_IS_UP_HOST_STATUS_SERVICE = new ZkStatusService(
new MockCurator(), mock(Metric.class), new TestTimer(), new DummyAntiServiceMonitor());
- private static final ApplicationApiFactory applicationApiFactory = new ApplicationApiFactory(3, clock);
+ private static final ApplicationApiFactory applicationApiFactory = new ApplicationApiFactory(3, 5, clock);
static {
when(serviceMonitor.getApplication(any(HostName.class)))