Visitar URL original
backups: changing publishing.host leaves the old S3 endpoint in the COSI secret, the Velero BSL and the default Strategies · Issue #5205 · cozystack/cozystack · GitHub
Skip to content

backups: changing publishing.host leaves the old S3 endpoint in the COSI secret, the Velero BSL and the default Strategies #5205

Open

Description

@myasnikovdaniil

Describe the bug

After publishing.host is changed, backups keep the old S3 endpoint. The platform builds the endpoint as https://s3.<publishing.host>, and two copies of it never refresh.

First, the COSI Secret bucket-cozy-backups-system (BucketInfo) keeps secretS3.endpoint from the moment the BucketAccess was created. bucket-cozy-backups-system-credentials and the projected cozy-backups-creds.endpoint are derived from it (packages/system/bucket/templates/user-credentials.yaml, line 53).

Second, the Velero BackupStorageLocation and every default Strategy CR bake the endpoint at the render of the backupstrategy-controller release and keep it until that release is forced again.

Nothing re-renders them. The default objects gate acts only when an object is missing.

Environment

Cozystack v1.7.0, variant isp-full, platform Package with publishing.host changed from example.org to a real domain after install.

To reproduce

  1. Install with publishing.host: example.org, enable seaweedfs and ingress on the root Tenant, wait for the bucket cozy-backups.
  2. Change publishing.host in the platform component values of the Package to a real domain and wait for everything to settle (certificate for s3.<new host> is issued).
  3. kubectl -n cozy-velero get bsl cozy-default -o jsonpath='{.spec.config.s3Url}' and kubectl get cnpgs.strategy.backups.cozystack.io cozy-default-cnpg -o jsonpath='{.spec.template.barmanObjectStore.endpointURL}'.

Actual behaviour

Both still show https://s3.example.org, the BSL stays Unavailable (lookup s3.example.org ... no such host) and the BucketInfo and cozy-backups-creds carry the old host, so every driver gets the old endpoint.

Recovery that worked: delete the BucketAccess, force bucket-cozy-backups (it owns the BucketAccess, forcing only bucket-cozy-backups-system removes the credentials Secret), then force bucket-cozy-backups-system, then force backupstrategy-controller (reconcile.fluxcd.io/forceAt and requestedAt). After that BSL went Available and the strategies had the new endpoint.

Expected behaviour

Endpoint follows the host, or the docs list what to force after a host change.

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    area/platformIssues or PRs related to platform infrastructure (bundle, flux, talos, installer)
    on Nov 4, 2026
  2. dosubot commented on Nov 4, 2026

    @dosubot

    This is a separate gap from the missing-object recovery in #3247/#3524: that fix forces renders when credentials or default objects are absent, not when their endpoint is stale. It also means cozystack_backup_default_objects_missing can stay at zero during this failure, so that metric alone cannot detect it. [1] [2] [3]

    One extra recovery caveat for ClickHouse: with backup.useSystemBucket: true, the sidecar reads the projected endpoint and keys through environment variables. After refreshing cozy-backups-creds, existing ClickHouse pods may still need a restart to pick them up. #3986 reports the same stale-environment behavior on v1.7.0, including after credential rotation, so a host-change runbook should include that check rather than stop at BSL availability. [4] [5]

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about cozystack with Dosu Add Dosu to your team

  3. self-assigned this
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/platformIssues or PRs related to platform infrastructure (bundle, flux, talos, installer)kind/bugCategorizes issue or PR as related to a bugtriage/needs-triageIndicates an issue needs triage by a maintainer

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions