SDDC lifecycle upgrade fails with 'Could not retrieve the running PostgreSQL version' in VMware Cloud Foundation 9.1
search cancel

SDDC lifecycle upgrade fails with 'Could not retrieve the running PostgreSQL version' in VMware Cloud Foundation 9.1

book

Article ID: 462132

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer VCF Operations

Issue/Introduction

  • During an SDDC lifecycle upgrade, the process fails with the following error:
    Could not retrieve the running PostgreSQL version from the leader of Postgresinstance ...
  • Running the database status command indicates the Leader node has a state of "start failed":
    kubectl -n vcf-sddc-lcm exec vcf-sddc-lcm-db-0 -- patronictl list
    + Cluster: vcf-sddc-lcm-db (###################) +--------------+----+-----------+
    | Member            | Host        | Role         | State        | TL | Lag in MB |
    +-------------------+-------------+--------------+--------------+----+-----------+
    | vcf-sddc-lcm-db-0 | IP_ADDRESS  | Replica      | running      |  9 |         0 |
    | vcf-sddc-lcm-db-1 | IP_ADDRESS  | Leader       | start failed |    |           |
    | vcf-sddc-lcm-db-2 | IP_ADDRESS  | Replica      | streaming    |  9 |         0 |
    +-------------------+-------------+--------------+--------------+----+-----------+
  • Additionally, POD logs show warnings for the databases (vcfsddclcmdb, template1, postgres) indicating a collation version mismatch:
    kubectl -n vcf-sddc-lcm logs vcf-sddc-lcm-db-1 -f
    <TIMESTAMP> ... vcfsddclcmdb vcfsddclcmdb_owner_user ###.##.#.###(39840) 46249 4WARNING:  database "vcfsddclcmdb" has a collation version mismatch
    <TIMESTAMP> ... vcfsddclcmdb vcfsddclcmdb_owner_user ###.##.#.###(39840) 46249 5DETAIL:  The database was created using collation version 2.36, but the operating system provides version 2.43.

Environment

VCF 9.1

Cause

The Postgres leader node fails to start. This prevents the lifecycle management database from operating correctly during the upgrade process.

Resolution

To resolve this issue, restart the Leader node reporting the start failed state.

  1. Execute the following command to restart the failed Leader (in this example, vcf-sddc-lcm-db-1) from a healthy member (such as vcf-sddc-lcm-db-0):

    kubectl -n vcf-sddc-lcm exec vcf-sddc-lcm-db-0 -c postgres -- patronictl restart vcf-sddc-lcm-db vcf-sddc-lcm-db-1 --force
  2. Retry the patch or upgrade process.

  3. If the failure persists after retrying, raise a support case with Broadcom and reference this knowledge base article.

Additional Information

WARNING: database "<specific dbname>" has a collation version mismatch