Files
cozystack/packages/system/linstor/values.yaml
T
Andrei Kvapil 944fbc8e7d fix(linstor): leave piraeus untouched while blockstor adopts volumes
The migration runbook freezes CSI and stops LINSTOR before blockstor
adopts the volumes, and repoints CSI only after adoption converges.
One backend flip cannot express that order: piraeus-operator goes to
external mode at once, deletes linstor-controller and repoints
linstor-csi before a single volume is adopted.

blockstorMigration splits the switch into steps. Under hold and adopt
every piraeus object renders exactly as under backend linstor, so
piraeus-operator, which keeps running as in blockstor's runbook, finds
LINSTOR's shape and keeps linstor-csi on LINSTOR until adoption has
converged. It does not undo the freeze either: it applies its
Deployments without a replica count, since the LinstorCluster sets
none, so linstor-controller and linstor-csi-controller stay at zero.
Keeping the operator up rather than stopping it also keeps its
validating webhooks served, so the release passes them at every step
without relaxing their failurePolicy.

hold also keeps the blockstor controller at zero replicas until the
converted manifests are in: a scale by hand did not survive the next
upgrade. Clearing the value is the only step that changes piraeus.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-11-29 23:03:55 +01:00

246 lines
13 KiB
YAML

# Which storage control plane this package deploys.
#
# linstor — the Java linstor-controller driven by piraeus-operator
# (the default, and what every existing cluster runs).
# blockstor — blockstor's controller/apiserver/satellite, with
# piraeus-operator in EXTERNAL mode so it only drives
# linstor-csi. EXPERIMENTAL.
#
# Both backends serve the same CSI wire shape through the same
# linstor-csi build, so the StorageClasses (provisioner
# linstor.csi.linbit.com) are the same under either.
#
# A new cluster selects blockstor here. A cluster that already holds
# LINSTOR volumes moves only through blockstorMigration below, in the
# order README.md gives; switching backend alone does not adopt them.
backend: linstor
# Set only while a cluster that holds LINSTOR volumes moves to blockstor,
# with backend blockstor. The runbook freezes CSI and stops LINSTOR before
# blockstor adopts the volumes, and repoints CSI only once adoption has
# converged; one backend flip cannot express that order. Each step is a
# value:
#
# hold — blockstor is deployed with its controller stopped. Every
# piraeus object renders as under backend linstor, so the
# operator keeps linstor-csi on LINSTOR. Apply the converted
# manifests in this step.
# adopt — the blockstor controller runs and adopts the volumes. piraeus
# is still untouched.
# "" — migration done: LinstorCluster goes external and the operator
# repoints linstor-csi at blockstor-apiserver.
#
# piraeus stays untouched because piraeus-operator keeps running through
# the migration, as blockstor's runbook has it: given LINSTOR's shape it
# has nothing to change, leaves linstor-controller and linstor-csi-controller
# at the zero replicas the freeze set, and keeps linstor-csi on LINSTOR.
# Clearing this value is the one step that changes piraeus. README.md has
# the order.
blockstorMigration: ""
piraeusServer:
image:
repository: ghcr.io/cozystack/cozystack/piraeus-server
tag: v1.6.0@sha256:70ddd1a66fbc1ea58078f4645fc572ab8e2e189dbb4d9a5f9ca43d5663106483
# Blockstor images are component-versioned: they are released from the
# blockstor repository and carry ITS version, so a cozystack release
# must not retag them to the cozystack version.
#
# None of the three sets a CPU limit, as the LINSTOR controller and
# satellite do not. CFS throttling under a limit stretches every
# reconcile pass: with 500m the controller and the satellites sat at the
# limit through a burst of volume creates, idle satellites were throttled
# in most CPU periods, and each create took tens of seconds. Memory stays
# limited. A key set here is merged over the default; set it to null to
# drop a default.
blockstorController:
image:
repository: ghcr.io/cozystack/blockstor-controller
tag: 0.4.0@sha256:b7526472c26475abba333b2f6d3a6a2b5c51b90ef878752490c8de85a0799075
resources:
requests: {cpu: 100m, memory: 64Mi}
limits: {memory: 256Mi}
blockstorApiserver:
image:
repository: ghcr.io/cozystack/blockstor-apiserver
tag: 0.4.0@sha256:7b869c114cee4fea9092be03758749df2e19096d99791336f0ee94d5d3de16d0
resources:
requests: {cpu: 50m, memory: 128Mi}
limits: {memory: 512Mi}
blockstorSatellite:
image:
repository: ghcr.io/cozystack/blockstor-satellite
tag: 0.4.0@sha256:36670bf2e50a845bcb40dc3f2dd2fb64f4fe6e3671a07865a423a169b3da190e
# The LINSTOR satellite's requests and memory limit.
resources:
requests: {cpu: 100m, memory: 128Mi}
limits: {memory: 2Gi}
# Lets the satellite act on a stalled resync (LINBIT/drbd#149) instead
# of only reporting it as a Warning Event: after the stall has lasted
# several passes it disconnects the peer whose resync waits on the
# stalled one, on a replica that is an Inconsistent SyncTarget. With a
# Primary in sight it never reconnects a peer to break the stall, since
# such a reconnect left two Secondaries with different data while DRBD
# reported both UpToDate. On by default: a replica stuck Inconsistent
# does not recover without it. The flag exists from blockstor 0.4.0 on;
# an older satellite exits on it.
stalledResyncAct: true
# How a change to the satellite pod template reaches the nodes. The
# satellite turns Ready once its caches have synced, seconds after
# start; its first pass over the node's DRBD resources ends later and
# does not show in readiness. minReadySeconds holds the rollout on each
# node for that long after Ready, so that first passes on two nodes do
# not overlap. 180 covers the passes measured on a test cluster, 1.5 to
# 2.7 minutes after Ready for about 110 resources per node; a node with
# more resources needs longer.
# The pause stops the rollout only if the satellite exits or restarts
# within it. A satellite that keeps running while resources fail to
# adjust stays Ready, and the next node follows. For an upgrade that
# changes how resources are rendered, use OnDelete and the per-node
# checks in "Upgrading the blockstor satellites" in README.md.
# Every node adds the pause to the rollout, and the HelmRelease upgrade
# waits for the whole rollout: see the same section before raising it.
minReadySeconds: 180
updateStrategy:
# RollingUpdate replaces one node at a time; OnDelete replaces a pod
# only when it is deleted, for an upgrade checked node by node.
# rollingUpdate may be left out: maxUnavailable can only be 1, since
# several nodes would run their first passes at once, and maxSurge
# only 0, since two satellites on one node would both drive its DRBD
# resources. The chart refuses other values.
type: RollingUpdate
# The Secret, in this namespace, whose MASTER_PASSPHRASE key unlocks the
# blockstor master key that wraps every LUKS volume password. It is the
# Secret piraeus reads for LINSTOR, so a cluster migrated from LINSTOR keeps
# its passphrase. blockstor only reads it; the operator creates it. The
# chart renders it into ControllerConfig.spec.passphraseSecretRef and into
# the Secret names the blockstor Roles grant.
blockstorPassphraseSecret: linstor-passphrase
# Runs the hook Job that writes blockstorPassphraseSecret into
# ControllerConfig/default. The same pin the other cozystack hook Jobs use.
kubectl:
image:
repository: docker.io/alpine/k8s
tag: 1.33.4@sha256:b0523f0a244ddc4c8e055aa335c040d3d78b3ead5528f4544395f7f9f69c7b68
# Talos-specific workarounds (disable for generic Linux like Ubuntu/Debian)
talos:
enabled: true
gracefulShutdown:
# Release unused Secondary DRBD resources before satellite termination so
# ZFS can release their backing zvols during normal Talos shutdown.
# The hook also runs on satellite pod restarts. Enable only when satellite
# and node restarts are serialized: Piraeus has one DaemonSet per node, so
# a shared configuration change can otherwise stop several replicas at once.
enabled: false
# Whether the node substrate can run DRBD at all.
#
# Disable on any substrate where the DRBD kernel module is unavailable or
# unusable. The concrete case is Talos nodes running as containers: DRBD's
# resource registry is global per kernel, so three containers sharing one kernel
# cannot represent three DRBD nodes — the second `new-resource` for a given name
# silently aliases the first instead of failing, which is worse than an error
# because LINSTOR records a replica it does not have.
#
# What this flag does, and all it does: the `drbd-logger` sidecar is omitted from
# Cozystack's sparse pod template and deleted explicitly from the effective
# DaemonSet. Omission alone is not enough because piraeus strategically merges
# satellite configurations. That sidecar tails DRBD state and exits immediately
# when the module is absent, and because the whole satellite pod is then never
# Ready, piraeus never registers the node: LINSTOR reports zero nodes,
# `linstor-csi-node` hangs in Init polling for a node that does not exist, and
# every PVC stays Pending. So this flag is the difference between working storage
# and no storage at all on such a substrate, not a cosmetic reduction in logging.
#
# What it does NOT do: it does not touch a StorageClass. Cozystack does not own
# them — an operator writes them by hand from the install guide — so a class
# carrying `linstor.csi.linbit.com/layerList: "drbd storage"` still exists after
# setting this false, and volumes on it will never provision. On such a substrate
# create only storage-only, node-pinned classes (`layerList: "storage"`,
# `allowRemoteVolumeAccess: "false"`); the install docs say so beside the
# examples.
#
# What it REQUIRES: talos.enabled must stay true. Removing the sidecar is not the
# whole job — the satellite DaemonSet also carries two DRBD-only initContainers
# that piraeus-operator contributes unconditionally (drbd-module-loader, which
# fails outright when the module is absent, and drbd-shutdown-guard), and the
# only configuration that deletes them is the Talos one. On generic Linux the
# satellite would therefore still never reach Ready, so the chart refuses the
# combination at render time rather than shipping a DaemonSet that cannot come
# up. A DRBD-less substrate has to be Talos today; making generic Linux work
# means moving those two deletions out from under talos.enabled, tracked in
# cozystack/cozystack#4092.
#
# Leaving it true on a DRBD-capable node is always correct; this only ever needs
# disabling where DRBD genuinely cannot work.
drbd:
enabled: true
linstor:
autoDiskful:
enabled: true
minutes: 30
allowCleanup: true
# linstor-csi is REUSED unchanged — blockstor serves the same CSI
# wire-shape, so the existing StorageClasses (provisioner
# linstor.csi.linbit.com) keep working.
linstorCSI:
## Constrain provisioning to the node the scheduler actually picked.
##
## Without it, external-provisioner passes EVERY topology segment as
## `requisite` and merely *prefers* the selected node, so when that node is out
## of space linstor-csi may legally provision the volume somewhere else. For a
## node-pinned volume (`allowRemoteVolumeAccess: false`, the `local` class that
## is the cluster default) the result is a PV whose node affinity contradicts
## the pod's other volumes, and the pod is then unschedulable FOREVER:
##
## pv "pvc-..." node affinity doesn't match node "srv1": no matching NodeSelectorTerms
##
## It bites hardest on CDI imports, because an importer pod mounts two volumes
## -- the disk and a ~21 GiB scratch volume that CDI only creates AFTER the pod
## is scheduled. The scheduler therefore sizes the node against the disk alone,
## can place two importers on a node that cannot hold both disks plus both
## scratch volumes, and the second scratch is then placed elsewhere.
##
## Measured on the wire, on a three-node dev stand: the CreateVolume request
## for a WaitForFirstConsumer volume carries `requisite` as the single segment
## the scheduler chose when the flag is set, and all three node segments when
## it is not, the chosen one merely first in `preferred`.
##
## Reproduced and fixed by measurement 2026-08-25 on a three-node cluster: with
## the flag absent the scratch PV landed on a different node than its disk and
## the import hung indefinitely at ImportScheduled with no error anywhere; with
## it set the scratch PVC stays Pending and the pod reports the actionable
## `1 node(s) did not have enough free storage`, then binds and completes on
## its own once space frees up. A silent permanent deadlock becomes a legible,
## self-correcting wait.
##
## Verified for node-pinned (`local`) volumes, which is what the cluster
## default uses. `replicated` is untouched for a sharper reason than its PV
## being remotely accessible: it binds `Immediate`, and external-provisioner
## scopes strict topology to late binding, so the flag never reaches that
## path at all. The switch stays because the flag is an upstream default this
## chart overrides, not because the other class is in doubt.
strictTopology: true
image:
repository: ghcr.io/cozystack/cozystack/linstor-csi
tag: v1.6.0@sha256:ae854423de62e94fb89b59d92c20da8939196e643e83b2d60d9f6915d5b0e55c
controller:
# Resource requests for the linstor-controller JVM. Requests (not limits) are
# set on purpose: a CPU request guarantees CPU shares so the JVM can answer its
# GET /health liveness probe under node CPU contention, while omitting limits
# avoids throttling the JVM (CPU limit) or OOM-killing it (memory limit). The
# memory value is a conservative starting estimate for the JVM heap + overhead;
# tune it to observed RSS.
resources:
requests:
cpu: 250m
memory: 700Mi
# Liveness-probe timing for the linstor-controller container. Only these timing
# fields are overridden; the httpGet target (GET /health on the api port) is
# supplied by piraeus-operator and intentionally left untouched. Relaxed from
# the operator defaults (timeoutSeconds 1, failureThreshold 3) so a JVM GC
# pause or CPU contention does not trip a kubelet liveness kill.
livenessProbe:
timeoutSeconds: 5
failureThreshold: 6