mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
## What this PR does The SeaweedFS chart refused any storage pool named `public` or ending in `-lock`, `-readonly` or `-public`. A second check in the same template compares the class names each pool actually renders, against each other and against the instance's base classes, and it already refuses every one of those names that clashes with something. `public`, `lock` and `readonly` clash with the base classes. `x-public`, `x-lock` and `x-readonly` clash only when a pool `x` exists. The suffix list therefore refused only names that clash with nothing, such as `cdn-public` with no pool `cdn`, and it would have needed another breaking change for every new class variant. I removed the suffix list and kept the rendered-name check as the only rule. Every values set that rendered before renders the same objects now. Names that were refused without a real clash are now accepted. Nothing that was accepted is refused, so this is not a breaking change. The tests now cover both sides of the rule. `cdn-public`, `cdn-lock` and `cdn-readonly` without a `cdn` pool are accepted, in `volume.pools` and in a zone. A pool next to its own `-public`, `-readonly` or `-lock` variant is refused with the clash message, and so is a pool named `public`. Related: #5316 is already handled on main by the rendered-name check (pools named exactly `lock` or `readonly` are refused there). #5412 takes the opposite approach and extends the reserved-name list in the same files. ### Screenshots Not a UI change. ### Downstream repositories - [ ] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: the storage pools page says pool names ending in `-lock` or `-readonly` are reserved; it should say a pool name must not render a class name another pool or the base classes already use. - [ ] [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(seaweedfs): storage pool names are no longer refused for a reserved suffix; a pool is refused only when one of its BucketClass or BucketAccessClass names is already rendered by another pool or by the instance's base classes. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Pool names ending in `-public`, `-lock`, or `-readonly` are now accepted when their rendered class names don’t conflict with another pool or a base class. * Name collisions are still rejected with errors that identify the conflicting rendered class. <!-- end of auto-generated comment: release notes by coderabbit.ai -->