mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-02 21:30:46 +09:00
Backport of #4292 to release-1.6. Cozystack's Talos configuration removes the systemd DRBD shutdown guard without a replacement. talos.gracefulShutdown.enabled, disabled by default, releases unused Secondary DRBD resources before the satellite stops so their backing devices, including ZFS zvols, can be released during normal shutdown. The hook skips Primary resources and open devices, rechecks each candidate, and stops on ambiguous status, command failure or timeout. It uses no force, demotion, Kubernetes API calls or extra permissions. Three differences from main, all from the same cause: release-1.6 has no drbd.enabled flag, since the DRBD-less-substrate switch landed after 1.6 was cut. The hook is therefore gated on talos.gracefulShutdown.enabled alone, the values block adds only that key, and the case asserting the hook is omitted on a substrate without DRBD is left out along with the flag it sets. The README line naming both flags names talos.enabled instead. Nothing else differs. The automated backport in #4320 stopped at the same values.yaml hunk and pushed the conflict markers as its only commit, which is why this exists. Verified on this branch: 11 Helm tests and the 20 behavioural Python tests pass. Assisted-by: LLM Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>