mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-01 20:56:02 +09:00
fix(linstor): give the blockstor controller and apiserver 21s to stop
Their REST servers hold a shutdown window derived from the detached rollback budget, and blockstor v0.2.0 sets the pods' grace to 21s so a SIGTERM does not kill a compensation mid-cascade. Assisted-by: LLM Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
3 files changed
+32
No files matched your search
@@ -112,6 +112,11 @@ spec:
|
||||
app.kubernetes.io/component: blockstor-apiserver
|
||||
spec:
|
||||
serviceAccountName: blockstor-apiserver
|
||||
{{- /*
|
||||
The REST server's graceful-shutdown window is derived from its
|
||||
detached rollback budget; this has to outlive it, or a SIGTERM kills
|
||||
a compensation mid-cascade. */}}
|
||||
terminationGracePeriodSeconds: 21
|
||||
topologySpreadConstraints:
|
||||
- maxSkew: 1
|
||||
topologyKey: kubernetes.io/hostname
|
||||
|
||||
@@ -131,6 +131,11 @@ spec:
|
||||
app.kubernetes.io/component: blockstor-controller
|
||||
spec:
|
||||
serviceAccountName: blockstor-controller
|
||||
{{- /*
|
||||
The REST server's graceful-shutdown window is derived from its
|
||||
detached rollback budget; this has to outlive it, or a SIGTERM kills
|
||||
a compensation mid-cascade. */}}
|
||||
terminationGracePeriodSeconds: 21
|
||||
containers:
|
||||
- name: manager
|
||||
image: {{ .Values.blockstorController.image.repository }}:{{ .Values.blockstorController.image.tag }}
|
||||
|
||||
@@ -340,3 +340,25 @@ tests:
|
||||
- matchRegex:
|
||||
path: spec.template.metadata.annotations["checksum/drbd-conf"]
|
||||
pattern: '^[0-9a-f]{64}$'
|
||||
|
||||
# A SIGTERM must not cut a detached rollback short: the pod outlives the
|
||||
# REST server's shutdown window.
|
||||
- it: gives the controller time to finish a rollback on shutdown
|
||||
template: templates/blockstor-controller.yaml
|
||||
documentSelector:
|
||||
path: kind
|
||||
value: Deployment
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.terminationGracePeriodSeconds
|
||||
value: 21
|
||||
|
||||
- it: gives the apiserver time to finish a rollback on shutdown
|
||||
template: templates/blockstor-apiserver.yaml
|
||||
documentSelector:
|
||||
path: kind
|
||||
value: Deployment
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.terminationGracePeriodSeconds
|
||||
value: 21
|
||||
Reference in new issue
Block a user