Aria Suite Lifecycle Manager patch upgrade fails with error "unpacking of archive failed on file /opt/vmware/vpostgres/current; cpio: File from package already exists as a directory in system"
search cancel

Aria Suite Lifecycle Manager patch upgrade fails with error "unpacking of archive failed on file /opt/vmware/vpostgres/current; cpio: File from package already exists as a directory in system"

book

Article ID: 433623

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

  • Aria Suite Lifecycle Manager patch upgrade fails and the Postgres service is not starting properly afterwards

  • The /var/log/vrlcm/os-package-update.log shows the following error

error: unpacking of archive failed on file /opt/vmware/vpostgres/current; 69b84901 cpio: File from package already exists as a directory in system
error: VMware-Postgres-14.20.0-25175663.x86_64: install failed

  • The Aria Suite Lifecycle Manager admin UI is stuck on starting services
  • The health status on the appliance shows:

vrlcm-cli --health-status
bootstrap ------------- In progress
postgres ------------- Not Running
vrlcm-server -------------Not Running
blackstone ------------- Not Running

  • The /var/log/vrlcm/vmware_vrlcm.log shows similar entries

ERROR LCM_FQDN — [ main] o.h.e.j.s.SqlExceptionHelper [logExceptions] : Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
ERROR LCM_FQDN — [ main] j.LocalContainerEntityManagerFactoryBean [buildNativeEntityManagerFactory] : Failed to initialize JPA EntityManagerFactory: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to open JDBC Connection for DDL execution

Environment

Aria Suite Lifecycle Manager 8.18

Cause

This issue occurs when the 'current' folder under the /opt/vmware/vpostgres location exists as a folder directory instead of the expected symbolic link (symlink) to /opt/vmware/vpostgres/11
 
The srv path type can be verified by performing the following

cd /opt/vmware/vpostgres

ls -l
 
Incorrect result : 

drwxr-xr-x   # root root     ### MMM DD  YYYY 11

lrwxrwxrwx   # root root     ### MMM DD  YYYY current
 
Expected result :

drwxr-xr-x   # root root     ### MMM DD  YYYY 11

lrwxrwxrwx   # root root     ### MMM DD  YYYY current -> 11

Resolution

1. Revert the Aria Suite Lifecycle Manager to the pre-upgrade snapshot

2. Power On the Aria Suite Lifecycle Manager node

3. SSH to the Aria Suite Lifecycle Manager node using the root account

4. Stop the vPostgres service

service vPostgres stop

5. Change directory under /opt/vmware/vpostgres

cd /opt/vmware/vpostgres

6. Backup the "current" directory

cp -rp current /data/

7. Delete the "current" directory:

rm -rf current

8. Create a symlink pointing to the 11 folder

ln -s 11 current

9. Ensure the symlink shows properly

Expected result :

drwxr-xr-x   # root root     ### MMM DD  YYYY 11

lrwxrwxrwx   # root root     ### MMM DD  YYYY current -> 11

10. Re-attempt the Aria Suite Lifecycle Manager upgrade patch