Major upgrade of PostgreSQL on DSM fails when pgAudit extension is enabled
search cancel

Major upgrade of PostgreSQL on DSM fails when pgAudit extension is enabled

book

Article ID: 405082

calendar_today

Updated On:

Products

VMware Data Services Manager

Issue/Introduction

Upgrade of major version (i.e.: 15 --> 16 version bump for example) of PostgreSQL database fails both when attempted though Data Services Manager as well as when using Terraform. 

Terraform may return error message similar to:

 Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to module.pg_instance.kubernetes_manifest.this, provider "provider[\"registry.terraform.io/hashicorp/kubernetes\"]" produced an unexpected new value: .object.metadata.annotations["dsm.vmware.com/major-version-upgrade-request"]: was cty.StringVal("6"), but now cty.StringVal("7").
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Environment

VMware Data Services Manager

Cause

Issue is caused by pgAudit extension being enabled on database(s). 

Resolution

In order to unblock the upgrade administrator should temporarily disable pgAudit extension on relevant databases.
List of affected entities may be obtained by logging to DSM appliance via SSH and executing the following command:

sudo kubectl --kubeconfig=/etc/kubernetes/admin.conf describe pod -n default

Example output:

Message:      {"ErrType":"Aborted","Err":"the upgrade cannot proceed, the pgAudit extension is enabled on the following databases: postgresdb###, postgresdb###, postgresdb###"}

Extension can be re-enabled after the upgrade.