Skip to content

Commit 45bac9f

Browse files
committed
operations: add per-zone config for enabling "ingester multi-az"
When enabling `multi_zone_ingester_multi_az_enabled` in the step-3 of the migration, we change the spec of the ingester-zone-a to add the `nodeAffinity` and that cause a rollout. Since zone-b isn't restarted at this point, it can cause a period in which a ingester shard isn't available. This is only true when not using ingester-zone-c for the migrations. We add new configs that allows a more fine grain control and update the migration process to set those specs, before we stop the zone-b, preventing a zone-a rollout when we enable `multi_zone_ingester_multi_az_enabled`. Signed-off-by: Laurent Dufresne <laurent.dufresne@grafana.com>
1 parent e9f81db commit 45bac9f

11 files changed

+117
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@
375375
* [ENHANCEMENT] Multi-zone: Add config validation for `-querier.prefer-availability-zones` flag on querier and ruler-querier deployments. #14539
376376
* [ENHANCEMENT] Distributor: render the experimental `-distributor.max-active-series-per-user` flag on distributor if `$._config.limits.max_active_series_per_user` is set. #14636
377377
* [ENHANCEMENT] Ingester: Add `$._config.ingest_storage_set_client_rack` to pass `-ingest-storage.kafka.client-rack` when zone-aware replication is enabled. #14654
378+
* [ENHANCEMENT] Ingester: Add `$._config.multi_zone_ingester_multi_az_zone_(a|b|c)_enabled` to simplify migrations not using a temporary zone-c. #15000
378379
* [BUGFIX] Ingester: Fix `$._config.ingest_storage_ingester_autoscaling_max_owned_series_threshold` default value, to compute it based on the configured `$._config.ingester_instance_limits.max_series`. #13448
379380

380381
### Documentation

operations/mimir-tests/test-multi-az-read-path-migration-step-1-generated.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4374,6 +4374,14 @@ spec:
43744374
rollout-group: ingester
43754375
spec:
43764376
affinity:
4377+
nodeAffinity:
4378+
requiredDuringSchedulingIgnoredDuringExecution:
4379+
nodeSelectorTerms:
4380+
- matchExpressions:
4381+
- key: topology.kubernetes.io/zone
4382+
operator: In
4383+
values:
4384+
- us-east-2a
43774385
podAntiAffinity:
43784386
requiredDuringSchedulingIgnoredDuringExecution:
43794387
- labelSelector:
@@ -4468,6 +4476,11 @@ spec:
44684476
securityContext:
44694477
runAsUser: 0
44704478
terminationGracePeriodSeconds: 1200
4479+
tolerations:
4480+
- effect: NoSchedule
4481+
key: topology
4482+
operator: Equal
4483+
value: secondary-az
44714484
volumes:
44724485
- configMap:
44734486
name: overrides

operations/mimir-tests/test-multi-az-read-path-migration-step-1.jsonnet

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@
1818
multi_zone_query_frontend_routing_enabled: false,
1919
multi_zone_ruler_routing_enabled: false,
2020
multi_zone_memcached_routing_enabled: false,
21+
22+
// Enable multi-az config for the ingester zone-a to prevent a rollout
23+
// of zone-a when `multi_zone_ingester_multi_az_enabled` is set to true.
24+
multi_zone_ingester_zone_a_multi_az_enabled: true,
2125
},
2226
}

operations/mimir-tests/test-multi-az-read-path-migration-step-2-generated.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4426,6 +4426,14 @@ spec:
44264426
rollout-group: ingester
44274427
spec:
44284428
affinity:
4429+
nodeAffinity:
4430+
requiredDuringSchedulingIgnoredDuringExecution:
4431+
nodeSelectorTerms:
4432+
- matchExpressions:
4433+
- key: topology.kubernetes.io/zone
4434+
operator: In
4435+
values:
4436+
- us-east-2a
44294437
podAntiAffinity:
44304438
requiredDuringSchedulingIgnoredDuringExecution:
44314439
- labelSelector:
@@ -4520,6 +4528,11 @@ spec:
45204528
securityContext:
45214529
runAsUser: 0
45224530
terminationGracePeriodSeconds: 1200
4531+
tolerations:
4532+
- effect: NoSchedule
4533+
key: topology
4534+
operator: Equal
4535+
value: secondary-az
45234536
volumes:
45244537
- configMap:
45254538
name: overrides

operations/mimir-tests/test-multi-az-read-path-migration-step-2a-generated.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4426,6 +4426,14 @@ spec:
44264426
rollout-group: ingester
44274427
spec:
44284428
affinity:
4429+
nodeAffinity:
4430+
requiredDuringSchedulingIgnoredDuringExecution:
4431+
nodeSelectorTerms:
4432+
- matchExpressions:
4433+
- key: topology.kubernetes.io/zone
4434+
operator: In
4435+
values:
4436+
- us-east-2a
44294437
podAntiAffinity:
44304438
requiredDuringSchedulingIgnoredDuringExecution:
44314439
- labelSelector:
@@ -4520,6 +4528,11 @@ spec:
45204528
securityContext:
45214529
runAsUser: 0
45224530
terminationGracePeriodSeconds: 1200
4531+
tolerations:
4532+
- effect: NoSchedule
4533+
key: topology
4534+
operator: Equal
4535+
value: secondary-az
45234536
volumes:
45244537
- configMap:
45254538
name: overrides

operations/mimir-tests/test-multi-az-read-path-migration-step-2b-generated.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4426,6 +4426,14 @@ spec:
44264426
rollout-group: ingester
44274427
spec:
44284428
affinity:
4429+
nodeAffinity:
4430+
requiredDuringSchedulingIgnoredDuringExecution:
4431+
nodeSelectorTerms:
4432+
- matchExpressions:
4433+
- key: topology.kubernetes.io/zone
4434+
operator: In
4435+
values:
4436+
- us-east-2a
44294437
podAntiAffinity:
44304438
requiredDuringSchedulingIgnoredDuringExecution:
44314439
- labelSelector:
@@ -4520,6 +4528,11 @@ spec:
45204528
securityContext:
45214529
runAsUser: 0
45224530
terminationGracePeriodSeconds: 1200
4531+
tolerations:
4532+
- effect: NoSchedule
4533+
key: topology
4534+
operator: Equal
4535+
value: secondary-az
45234536
volumes:
45244537
- configMap:
45254538
name: overrides

operations/mimir-tests/test-multi-az-read-path-migration-step-2c-generated.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4426,6 +4426,14 @@ spec:
44264426
rollout-group: ingester
44274427
spec:
44284428
affinity:
4429+
nodeAffinity:
4430+
requiredDuringSchedulingIgnoredDuringExecution:
4431+
nodeSelectorTerms:
4432+
- matchExpressions:
4433+
- key: topology.kubernetes.io/zone
4434+
operator: In
4435+
values:
4436+
- us-east-2a
44294437
podAntiAffinity:
44304438
requiredDuringSchedulingIgnoredDuringExecution:
44314439
- labelSelector:
@@ -4520,6 +4528,11 @@ spec:
45204528
securityContext:
45214529
runAsUser: 0
45224530
terminationGracePeriodSeconds: 1200
4531+
tolerations:
4532+
- effect: NoSchedule
4533+
key: topology
4534+
operator: Equal
4535+
value: secondary-az
45234536
volumes:
45244537
- configMap:
45254538
name: overrides

operations/mimir-tests/test-multi-az-read-path-migration-step-2d-generated.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4426,6 +4426,14 @@ spec:
44264426
rollout-group: ingester
44274427
spec:
44284428
affinity:
4429+
nodeAffinity:
4430+
requiredDuringSchedulingIgnoredDuringExecution:
4431+
nodeSelectorTerms:
4432+
- matchExpressions:
4433+
- key: topology.kubernetes.io/zone
4434+
operator: In
4435+
values:
4436+
- us-east-2a
44294437
podAntiAffinity:
44304438
requiredDuringSchedulingIgnoredDuringExecution:
44314439
- labelSelector:
@@ -4520,6 +4528,11 @@ spec:
45204528
securityContext:
45214529
runAsUser: 0
45224530
terminationGracePeriodSeconds: 1200
4531+
tolerations:
4532+
- effect: NoSchedule
4533+
key: topology
4534+
operator: Equal
4535+
value: secondary-az
45234536
volumes:
45244537
- configMap:
45254538
name: overrides

operations/mimir-tests/test-multi-az-read-path-migration-step-2e-generated.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4403,6 +4403,14 @@ spec:
44034403
rollout-group: ingester
44044404
spec:
44054405
affinity:
4406+
nodeAffinity:
4407+
requiredDuringSchedulingIgnoredDuringExecution:
4408+
nodeSelectorTerms:
4409+
- matchExpressions:
4410+
- key: topology.kubernetes.io/zone
4411+
operator: In
4412+
values:
4413+
- us-east-2a
44064414
podAntiAffinity:
44074415
requiredDuringSchedulingIgnoredDuringExecution:
44084416
- labelSelector:
@@ -4497,6 +4505,11 @@ spec:
44974505
securityContext:
44984506
runAsUser: 0
44994507
terminationGracePeriodSeconds: 1200
4508+
tolerations:
4509+
- effect: NoSchedule
4510+
key: topology
4511+
operator: Equal
4512+
value: secondary-az
45004513
volumes:
45014514
- configMap:
45024515
name: overrides

operations/mimir-tests/test-multi-az-read-path-migration-step-2f-generated.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4403,6 +4403,14 @@ spec:
44034403
rollout-group: ingester
44044404
spec:
44054405
affinity:
4406+
nodeAffinity:
4407+
requiredDuringSchedulingIgnoredDuringExecution:
4408+
nodeSelectorTerms:
4409+
- matchExpressions:
4410+
- key: topology.kubernetes.io/zone
4411+
operator: In
4412+
values:
4413+
- us-east-2a
44064414
podAntiAffinity:
44074415
requiredDuringSchedulingIgnoredDuringExecution:
44084416
- labelSelector:
@@ -4497,6 +4505,11 @@ spec:
44974505
securityContext:
44984506
runAsUser: 0
44994507
terminationGracePeriodSeconds: 1200
4508+
tolerations:
4509+
- effect: NoSchedule
4510+
key: topology
4511+
operator: Equal
4512+
value: secondary-az
45004513
volumes:
45014514
- configMap:
45024515
name: overrides

0 commit comments

Comments
 (0)