The Postgres DB fails to start after upgrading
search cancel

The Postgres DB fails to start after upgrading

book

Article ID: 325415

calendar_today

Updated On:

Products

VMware Telco Cloud Automation

Issue/Introduction

The TCA-CP services are not functional after upgrading to TCA 2.3.

 

Environment

2.1, 2.1.1, 2.2

Cause

After upgrading a restored TCA-CP appliance, the Postgres service can fail to start due to incorrect permissions applied to  the /commn/pgsql and /var/log/postgres folders.

This issue can arise under the following scenario:

  1. Prepare a TCA 2.2 environment
  2. Take a backup of the TCA-CP and restore it to another corresponding TCA-CP 2.2 system
  3. Upgrade the restored system to TCA 2.3.x

Note: There is no problem noticed for systems that are upgraded without undergoing the backup-restore process.

Resolution

Stop the tcf-manager and postgres services, apply the correct permissions, and restart the TCA-CP appliance.

Workaround:

  1. SSH as admin to the affected TCA-CP appliance
  2. Switch as root and run the following commands:
    systemctl stop tcf-manager
    systemctl stop postgres
    userdel ztp
    userdel postgres
    groupdel postgres
    groupadd -g 1012 -r postgres
    usermod -aG postgres admin
    useradd -g 1012 -u 1012 postgres
  3. Reboot the TCA-CP appliance.

Note: Subsequent backup-restore / upgrade operations will work as expected.

 

Additional Information