Skip to content

[Bug]: CNPG Kubectl Plugin fails to report Continuous Backup status #7658

Closed as duplicate

Description

@danielluke

Is there an existing issue already for this bug?

  • I have searched for an existing issue, and could not find anything. I believe this is a new bug.

I have read the troubleshooting guide

  • I have read the troubleshooting guide and I think this is a new bug.

I am running a supported version of CloudNativePG

  • I have read the troubleshooting guide and I think this is a new bug.

Contact Details

[email protected]

Version

1.26 (latest patch)

What version of Kubernetes are you using?

1.33

What is your Kubernetes environment?

Other

How did you install the operator?

YAML manifest

What happened?

Upgraded to cnpg 1.26.0 and follwed the migration instructions to switch to the plugin.

Verified that backups work and that WALs are being archived, upgraded the cnpg kubectl plugin and checked database status - and it's showing:

Continuous Backup status
Not configured

even though WALs are being archived.

I verified that I'm running the 1.26.0 kubectl pluging too:

% k cnpg version 
Build: {Version:1.26.0 Commit:1535f3c17 Date:2025-05-23}

Cluster resource

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  name: testdb
  namespace: test
spec:
  imageName: ghcr.io/cloudnative-pg/postgresql:16.6
  instances: 2
  enableSuperuserAccess: true
  primaryUpdateStrategy: unsupervised
  primaryUpdateMethod: switchover
  smartShutdownTimeout: 20
  stopDelay: 30
  switchoverDelay: 60
  storage:
    size: 10Gi
  plugins:
  - name: barman-cloud.cloudnative-pg.io
    isWALArchiver: true
    parameters:
      barmanObjectName: minio-local

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. dosubot commented on May 27, 2025

    @dosubot

    Hi @danielluke! I'm Dosu and I’m helping the cloudnative-pg team.

    Based on your description and the information available, there are currently no known issues or discussions in the CloudNativePG repository specifically about the CNPG Kubectl Plugin failing to report Continuous Backup status, even when WAL archiving is working.

    A few points to consider:

    • The official documentation for the CNPG Kubectl Plugin does show example output where "Continuous Backup status" is reported as "Not configured," which matches what you are seeing. This suggests that the plugin may only report this status as "configured" when certain conditions are met in the cluster configuration or status fields, not just when WAL archiving is active. You can review this in the plugin documentation.
    • The troubleshooting guide recommends checking your cluster's status fields, specifically lastSuccessfulBackup and firstRecoverabilityPoint, to verify that backups are recognized as configured and working. If these fields are missing or not updated, the plugin may not detect continuous backup as configured, even if WALs are being archived. See the troubleshooting guide for more details.
    • The plugin supports a --verbose option, which can provide more detailed status information and may help clarify what the plugin is (or isn't) detecting about your backup configuration. Try running:
      kubectl cnpg status <cluster-name> --verbose
      
      and review the output for any clues about backup detection.

    Your cluster spec shows the use of the barman-cloud.cloudnative-pg.io plugin with isWALArchiver: true, but does not include a .spec.backup stanza. According to the documentation, the absence of a .spec.backup section means that scheduled backups are not configured, which may be why the plugin reports "Continuous Backup status: Not configured" even though WAL archiving is working. The plugin may require both WAL archiving and scheduled backups to consider continuous backup as "configured" in its status output.

    If you want the plugin to recognize continuous backup as configured, try adding a .spec.backup section to your cluster manifest and see if the status changes after applying the update and waiting for the operator to reconcile.

    If you have already done this or if the issue persists, it may be a new bug or a limitation in how the plugin detects backup configuration. In that case, gathering the verbose output and your cluster status fields will be helpful for further investigation.

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about cloudnative-pg with Dosu Add Dosu to your team

  2. danielluke commented on May 28, 2025

    @danielluke
    Author

    From 'kubectl describe cluster`:

      Conditions:
        Last Transition Time:  2025-05-28T06:05:57Z
        Message:               Cluster is Ready
        Reason:                ClusterIsReady
        Status:                True
        Type:                  Ready
        Last Transition Time:  2025-05-28T06:04:51Z
        Message:               Continuous archiving is working
        Reason:                ContinuousArchivingSuccess
        Status:                True
        Type:                  ContinuousArchiving
        Last Transition Time:  2025-05-28T00:00:58Z
        Message:               Backup was successful
        Reason:                LastBackupSucceeded
        Status:                True
        Type:                  LastBackupSucceeded
    

    and

      Last Failed Backup:      2025-03-25T14:53:02Z
      Last Successful Backup:  2025-05-27T00:02:43Z
      Last Successful Backup By Method:
        Barman Object Store:  2025-05-27T00:02:43Z
    

    nightly backups and WAL archiving look fine.

    It's clear from code inspection that this just hasn't yet been updated for the plugin backup method:

    if cluster.Spec.Backup == nil {

  3. rofafor commented on Jun 2, 2025

    @rofafor

    As a hotfix you can circumvent the nilcheck by adding empty backup definition into your manifest:

    spec:
      backup: {}
  4. ljhanson commented on Jun 3, 2025

    @ljhanson

    As a hotfix you can circumvent the nilcheck by adding empty backup definition into your manifest:

    spec:
    backup: {}

    This works for me as well. But doesn't fix the Physical Backups or First Point of Recoverability output.

  5. haraldkoch commented on Jun 7, 2025

    @haraldkoch

    The matching prometheus metric cnpg_collector_last_available_backup_timestamp is also no longer updated after switching to the barman plugin.

  6. sbv-csis commented on Jun 12, 2025

    @sbv-csis

    Seeing the same thing about the metric cnpg_collector_last_available_backup_timestamp and cnpg_collector_first_recoverability_point

    I've been experimenting with adding some kind of servicemonitor or podmonitor for the barman pod/service in the cnpg-system namespace but no luck so far.

  7. added
    bug 🐛Something isn't working
    and removed
    triagePending triage
    on Jul 21, 2025
  8. added this to the 1.26.1 milestone on Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug 🐛Something isn't working

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions