mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 12:13:55 +09:00
## What this PR does Updates the LINSTOR stack to the current stable piraeus-operator release: operator v2.12.1, LINSTOR server 1.35.3 and LINSTOR CSI v1.13.2, the last two built here with our patches. This started as a fix for the NFS server image hanging up the host console on bare-metal storage nodes (Ubuntu 24.04, Cozystack 1.6.5 and 1.7.0). That needed nfs-server v1.10.6 or later. Operators also asked for per-volume IO limits, which need linstor-csi v1.11.3 or later and piraeus-operator v2.10.8 or later, so the update goes to the current release rather than the minimum. The first commit fixes a problem the update exposed. The operator runs the LINSTOR database migration in a `run-migration` init container, and this package pinned only the main controller container to our build. With the operator update, that init container ran the operator's default LINSTOR 1.35.3 and migrated the database before the controller image changed. The 1.33.3 controller then crash-looped until the linstor release caught up. Both init containers that run the LINSTOR server image (`run-migration` and the satellite's `setup-lvm-configuration`) now use the platform image, with a test pinning it. This protects later upgrades where the operator default is newer than our build. It does not help this upgrade: the pin ships in the linstor release, and Flux reconciles piraeus-operator first. Patches: - linstor-csi: the Protocol C override for dual attach is dropped. Since v1.12 the driver asks LINSTOR to manage dual-primary, and LINSTOR 1.35 sets protocol C on the connections that need it. Upstream closed the same change as superseded (piraeusdatastore/linstor-csi#435). The relocate-after-clone patch is carried forward. - LINSTOR server: six of the nine patches are in upstream by 1.35.3 and are removed. `fix-k8s-create-already-exists`, `retry-adjust-after-stale-bitmap` and `native-protoc` are carried forward. LINSTOR 1.34 requires Java 21, so the image moves from bookworm to trixie. Behaviour that changes for users: - No downgrade. LINSTOR 1.35 migrates the database and drops the `SEC_*` tables, so a cluster that has run this version cannot go back to 1.33. - The LINSTOR controller is down for a short time during this upgrade. piraeus-operator is reconciled before the linstor release, so the database is migrated to 1.35 while the old controller still runs. That controller crash-loops until the linstor release rolls out, and if the rollout fails there is no way back. - A volume on a Protocol A or B resource group that was attached to two nodes while the CSI driver was updated (a live migration in progress) keeps the Protocol C override the old driver set on its resource definition. The new driver does not remove it. Data is not affected, the resource just stays on protocol C. Such resource definitions have the `Aux/csi-protocol-override` property. To remove the override, run `linstor resource-definition set-property <rd> DrbdOptions/Net/protocol` and `linstor resource-definition set-property --aux <rd> csi-protocol-override`. - The CSIDriver moves to `fsGroupPolicy: File`, so `fsGroup` is also applied to ReadWriteMany filesystem volumes. - The operator manages Secrets only in its own namespace, and the CSI controller loses cluster-wide read access to Secrets. Nothing in this repository references snapshotter Secrets. - The csi-health-monitor sidecar is removed. - LINSTOR's default evict timeout goes from 1h to 12h; this package does not set it. - Volume group snapshots turn on only when `groupsnapshot.storage.k8s.io/v1` is served. The snapshot controller here still serves v1alpha1, so they stay off; #5239 changes that. - IO limits can be set through `qos.linbit.com/{rbps,wbps,riops,wiops}` StorageClass parameters. Enforcing them needs NRI enabled on the nodes and the nri-volume-qos plugin, neither of which this PR adds. Tested on a three-node Talos cluster, upgrading from the current main packages to this branch: - LINSTOR database migrated to 1.35.3, no faulty resources, no error reports. - Data written before the upgrade is intact, checked by checksum. - A snapshot taken before the upgrade restores, and all three replicas come up `UpToDate`; cloning and new snapshots work. - KubeVirt live migration works for a ReplicatedBlock volume, including one on a Protocol A resource group: LINSTOR switches the connection to protocol C for the migration and restores A afterwards. - A StorageClass with QoS parameters provisions, and the limits reach the resource definition and the VolumeAttachment metadata. - ZFS userspace in the satellite is now 2.4.4, matching the kernel module. Not tested: an arm64 build. ### Screenshots No UI change. ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note fix(linstor): update piraeus-operator to v2.12.1, LINSTOR to 1.35.3 and LINSTOR CSI to v1.13.2. Fixes the NFS server breaking console login on storage nodes and adds IO QoS StorageClass parameters. LINSTOR 1.35 migrates its database, and a downgrade to an earlier version is not possible after the upgrade. ```