Skip to content

[mariadb] multiple template key in backup-cronjob.yaml #2293

Closed as not planned

Description

Describe the bug

The MariaDB package fails to install when backup is enabled

Environment

  • v1.2.0
  • Provider: on-prem

To Reproduce
Steps to reproduce the behavior:

  1. Go to a Tenant dashboard
  2. Create a Managed MariaDB service
  3. Set backup enabled
  4. Submit

Expected behaviour
The HelmRelease install is successful

Actual behaviour
The HelpRelease fails to install

Logs

Helm install failed for release tenant-example/mariadb-example with chart [email protected]+5c35e21515d9: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors: line 17: mapping key "template" already defined at line 14

template:
spec:
restartPolicy: OnFailure
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/backup-script.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/backup-secret.yaml") . | sha256sum }}
spec:
imagePullSecrets:
- name: {{ .Release.Name }}-regsecret
restartPolicy: Never

I'd create a PR, but I'm unsure which restartPolicy should be used

Checklist

  • I have checked the documentation
  • I have searched for similar issues
  • I have included all required information
  • I have provided clear steps to reproduce
  • I have included relevant logs

Activity

  1. dosubot commented on Mar 29, 2026

    @dosubot

    Hi Jonathan Haines (@BarryThePenguin)! I'm Dosu and I’m helping the cozystack team.

    Thanks for the detailed report! This is a known issue — there's a duplicate template key in packages/apps/mariadb/templates/backup-cronjob.yaml at lines 14-17 .

    PR #2279 has the fix for this, but it hasn't been merged yet. Until then, you'll need to either manually patch the template or deploy MariaDB without backup enabled.

    This same bug pattern also affects PostgreSQL (#869) [1].

    To reply, just mention @dosu.


    How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

    Chat with Dosu Open in Cursor Join Discord Share on X

  2. added
    area/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)
    triage/not-reproducibleIndicates an issue can not be reproduced as described
    on Apr 27, 2026
  3. lexfrei commented on Apr 27, 2026

    @lexfrei
    Contributor

    Verified against current main: this is already fixed. The duplicate template: key was removed in commit d2030be (fix(mariadb): always enable replication for consistent service naming, 2026-03-27) — two days before this issue was filed, so the report was against an older version. Current packages/apps/mariadb/templates/backup-cronjob.yaml has only one template: block at line 16. Marking triage/not-reproducible; safe to close once confirmed.

  4. lexfrei commented on Apr 27, 2026

    @lexfrei
    Contributor

    Closing as not reproducible — fix landed in d2030be before this report was filed (see prior comment for details).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)kind/bugCategorizes issue or PR as related to a bugtriage/not-reproducibleIndicates an issue can not be reproduced as described

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions