Skip to content

[Bug]: kubectl cnpg status does not report Continuous Backup status when using barman-cloud objectstore #8276

@theo-bot

Description

@theo-bot

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

theo.bot@rws.nl

Version

1.26 (latest patch)

What version of Kubernetes are you using?

1.30

What is your Kubernetes environment?

Other

How did you install the operator?

YAML manifest

What happened?

When I request the status of the cnpg cluster, having a barman-cloud plugin as the objectstore, for wal arching and backup. I expected to see the Continuous Backup status:
`Cluster Summary
Name my-db-lab/my-db17
System ID: 7514566941498109981
PostgreSQL Image: harbor.local.net/ghcr-io-proxy/cloudnative-pg/postgis:17-3.5-169
Primary instance: my-db17-1
Primary start time: 2025-06-11 05:57:52 +0000 UTC (uptime 1368h12m44s)
Status: Cluster in healthy state
Instances: 1
Ready instances: 1
Size: 17G
Current Write LSN: F1/B2000080 (Timeline: 1 - WAL File: 00000001000000F1000000B2)

Continuous Backup status
Not configured

Streaming Replication status
Not configured

Instances status
Name Current LSN Replication role Status QoS Manager Version Node


my-db17-1 F1/B2000080 Primary OK Burstable 1.26.1 test4-gn2-worker-m-xl-gn2c-mdbzq

Plugins status
Name Version Status Reported Operator Capabilities


barman-cloud.cloudnative-pg.io 0.5.0 N/A Reconciler Hooks, Lifecycle Service`

Cluster resource

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  creationTimestamp: "2025-06-11T05:57:10Z"
  generation: 4
  labels:
    app: rev
  name: my-db17
  namespace: my-db-lab
  resourceVersion: "6122363123"
  uid: 9b308f82-2b5e-436d-8fa2-8dc3e847ef5d
spec:
  affinity:
    enablePodAntiAffinity: true
    podAntiAffinityType: preferred
    topologyKey: kubernetes.io/hostname
  bootstrap:
    initdb:
      database: orggeodb
      encoding: UTF8
      localeCType: C
      localeCollate: C
      owner: orggeodb
      postInitApplicationSQLRefs:
        configMapRefs:
        - key: configmap.sql
          name: init-sql
      secret:
        name: rev-user-secret
  enablePDB: false
  enableSuperuserAccess: true
  failoverDelay: 0
  imageName: harbor.local.net/ghcr-io-proxy/cloudnative-pg/postgis:17-3.5-169
  inheritedMetadata:
    labels:
      app: database
      egress-frontoffice-policy: allow
      group: my-db
      name: rev-postgres
      tier: zeer-vertrouwd
  instances: 1
  logLevel: debug
  maxSyncReplicas: 0
  minSyncReplicas: 0
  monitoring:
    customQueriesConfigMap:
    - key: queries
      name: cnpg-default-monitoring
    disableDefaultQueries: false
    enablePodMonitor: true
  plugins:
  - enabled: true
    isWALArchiver: true
    name: barman-cloud.cloudnative-pg.io
    parameters:
      barmanObjectName: minio-store
  postgresGID: 26
  postgresUID: 26
  postgresql:
    parameters:
      archive_mode: "on"
      archive_timeout: 5min
      checkpoint_completion_target: "0.5"
      default_statistics_target: "100"
      dynamic_shared_memory_type: posix
      effective_cache_size: 2250MB
      effective_io_concurrency: "1"
      full_page_writes: "on"
      log_connections: "on"
      log_destination: csvlog
      log_directory: /controller/log
      log_filename: postgres
      log_rotation_age: "0"
      log_rotation_size: "0"
      log_truncate_on_rotation: "false"
      logging_collector: "on"
      maintenance_work_mem: 64MB
      max_connections: "100"
      max_parallel_maintenance_workers: "2"
      max_parallel_workers: "32"
      max_parallel_workers_per_gather: "2"
      max_replication_slots: "32"
      max_wal_size: 1GB
      max_worker_processes: "32"
      min_wal_size: 80MB
      random_page_cost: "4"
      shared_buffers: 256MB
      shared_memory_type: mmap
      shared_preload_libraries: ""
      ssl_max_protocol_version: TLSv1.3
      ssl_min_protocol_version: TLSv1.3
      wal_buffers: 8MB
      wal_keep_size: 512MB
      wal_level: logical
      wal_log_hints: "on"
      wal_receiver_timeout: 5s
      wal_sender_timeout: 5s
      work_mem: 512MB
    shared_preload_libraries:
    - pgaudit
    syncReplicaElectionConstraint:
      enabled: false
  primaryUpdateMethod: restart
  primaryUpdateStrategy: unsupervised
  replicationSlots:
    highAvailability:
      enabled: true
      slotPrefix: _cnpg_
    synchronizeReplicas:
      enabled: true
    updateInterval: 30
  resources:
    limits:
      cpu: "4"
      memory: 8G
    requests:
      cpu: "2"
      memory: 8G
  smartShutdownTimeout: 180
  startDelay: 30
  stopDelay: 30
  storage:
    resizeInUseVolumes: true
    size: 160Gi
  switchoverDelay: 40000000
status:
  availableArchitectures:
  - goArch: amd64
    hash: e1cddc583c4841ff68a4224fcb0b6302a26f0aff6cd6fa10be7f1937af3ab6b1
  - goArch: arm64
    hash: 7706e7a8d054a613b0016238290bdb57a3dd974e16b54234acbb7d222823f312
  certificates:
    clientCASecret: my-db17-ca
    expirations:
      my-db17-ca: 2025-09-09 05:52:10 +0000 UTC
      my-db17-replication: 2025-09-09 05:52:10 +0000 UTC
      my-db17-server: 2025-09-09 05:52:10 +0000 UTC
    replicationTLSSecret: my-db17-replication
    serverAltDNSNames:
    - my-db17-rw
    - my-db17-rw.my-db-lab
    - my-db17-rw.my-db-lab.svc
    - my-db17-rw.my-db-lab.svc.cluster.local
    - my-db17-r
    - my-db17-r.my-db-lab
    - my-db17-r.my-db-lab.svc
    - my-db17-r.my-db-lab.svc.cluster.local
    - my-db17-ro
    - my-db17-ro.my-db-lab
    - my-db17-ro.my-db-lab.svc
    - my-db17-ro.my-db-lab.svc.cluster.local
    serverCASecret: my-db17-ca
    serverTLSSecret: my-db17-server
  cloudNativePGCommitHash: 252497fc9
  cloudNativePGOperatorHash: e1cddc583c4841ff68a4224fcb0b6302a26f0aff6cd6fa10be7f1937af3ab6b1
  conditions:
  - lastTransitionTime: "2025-08-06T13:49:09Z"
    message: Cluster is Ready
    reason: ClusterIsReady
    status: "True"
    type: Ready
  - lastTransitionTime: "2025-08-06T10:45:04Z"
    message: Continuous archiving is working
    reason: ContinuousArchivingSuccess
    status: "True"
    type: ContinuousArchiving
  - lastTransitionTime: "2025-08-06T13:51:51Z"
    message: Backup was successful
    reason: LastBackupSucceeded
    status: "True"
    type: LastBackupSucceeded
  - lastTransitionTime: "2025-08-06T13:49:00Z"
    message: A single, unique system ID was found across reporting instances.
    reason: Unique
    status: "True"
    type: ConsistentSystemID
  configMapResourceVersion:
    metrics:
      cnpg-default-monitoring: "5995268360"
  currentPrimary: my-db17-1
  currentPrimaryTimestamp: "2025-06-11T05:57:51.816551Z"
  firstRecoverabilityPoint: "2025-07-15T09:40:18Z"
  firstRecoverabilityPointByMethod:
    barmanObjectStore: "2025-07-15T09:40:18Z"
  healthyPVC:
  - my-db17-1
  image: harbor.local.net/ghcr-io-proxy/cloudnative-pg/postgis:17-3.5-169
  instanceNames:
  - my-db17-1
  instances: 1
  instancesReportedState:
    my-db17-1:
      ip: 10.0.190.242
      isPrimary: true
      timeLineID: 1
  instancesStatus:
    healthy:
    - my-db17-1
  lastFailedBackup: "2025-08-06T09:15:00Z"
  lastSuccessfulBackup: "2025-07-31T09:40:24Z"
  lastSuccessfulBackupByMethod:
    barmanObjectStore: "2025-07-31T09:40:24Z"
  latestGeneratedNode: 1
  managedRolesStatus: {}
  pgDataImageInfo:
    image: harbor.local.net/ghcr-io-proxy/cloudnative-pg/postgis:17-3.5-169
    majorVersion: 17
  phase: Cluster in healthy state
  pluginStatus:
  - capabilities:
    - TYPE_RECONCILER_HOOKS
    - TYPE_LIFECYCLE_SERVICE
    name: barman-cloud.cloudnative-pg.io
    version: 0.5.0
  poolerIntegrations:
    pgBouncerIntegration:
      secrets:
      - my-db17-pooler
  pvcCount: 1
  readService: my-db17-r
  readyInstances: 1
  secretsResourceVersion:
    applicationSecretVersion: "3359825094"
    clientCaSecretVersion: "5982914663"
    replicationSecretVersion: "5982914667"
    serverCaSecretVersion: "5982914663"
    serverSecretVersion: "5982914666"
    superuserSecretVersion: "6116907848"
  switchReplicaClusterStatus: {}
  systemID: "7514566941498109981"
  targetPrimary: my-db17-1
  targetPrimaryTimestamp: "2025-06-11T05:57:11.352277Z"
  timelineID: 1
  topology:
    instances:
      my-db17-1: {}
    nodesUsed: 1
    successfullyExtracted: true
  writeService: my-db17-rw

Relevant log output

$ oc describe objectstore minio-store's/cicd.s15m.nl/local.net/g'
Name:         minio-store
Namespace:    my-db-lab
Labels:       <none>
Annotations:  <none>
API Version:  barmancloud.cnpg.io/v1
Kind:         ObjectStore
Metadata:
  Creation Timestamp:  2025-08-06T13:48:20Z
  Generation:          1
  Resource Version:    6122414420
  UID:                 a04f7747-804a-4074-917f-234388dbb047
Spec:
  Configuration:
    Data:
      Compression:           snappy
      Immediate Checkpoint:  true
    Destination Path:        s3://my-db17
    Endpoint URL:            https://minio.my-db-lab.test4.s15m.nl
    History Tags:
      Backup Retention Policy:  keep
    s3Credentials:
      Access Key Id:
        Key:   user
        Name:  minio-api-user
      Secret Access Key:
        Key:   password
        Name:  minio-api-user
    Tags:
      Backup Retention Policy:  expire
    Wal:
      Compression:   snappy
      Max Parallel:  8
  Instance Sidecar Configuration:
    Resources:
      Limits:
        Cpu:     1000m
        Memory:  1024Mi
      Requests:
        Cpu:                            1000m
        Memory:                         1024Mi
    Retention Policy Interval Seconds:  1800
  Retention Policy:                     5d
Status:
  Server Recovery Window:
    my-db17:
      First Recoverability Point:   2025-08-06T07:01:21Z
      Last Succussful Backup Time:  2025-08-06T13:51:41Z
Events:                             <none>

Code of Conduct

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

Metadata

Metadata

Assignees

Labels

triagePending triage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions