"Error while running package installation and post-install scripts" when upgrading VMware Cloud Director from 10.5.x to 10.6.x
search cancel

"Error while running package installation and post-install scripts" when upgrading VMware Cloud Director from 10.5.x to 10.6.x

book

Article ID: 398889

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Upgrading VMware Cloud Director(VCD) from 10.5.1.1 to 10.6.1 fails with "Error while running package installation and post-install scripts"
  • In /opt/vmware/var/log/vami/updatecli.log, you see entries similar to:

    [INFO] Running /opt/vmware/var/lib/vami/update/data/job/24/run_command
    warning: /opt/vmware/var/lib/vami/update/data/package-pool/package-pool/Linux-PAM-1.5.3-3.ph4.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID ########: NOKEY
    Preparing packages...
    Linux-PAM-1.5.3-3.ph4.x86_64
    error: unpacking of archive failed on file /usr/sbin/faillock: cpio: File from package already exists as a directory in system
    error: Linux-PAM-1.5.3-3.ph4.x86_64: install failed
    error: Linux-PAM-1.3.0-1.ph3.x86_64: erase skipped
    [ERROR] Failed with exit code 256
    [INFO] Update status: Running post-install scripts
    [INFO] Running /opt/vmware/var/lib/vami/update/data/job/24/post_install '10.5.1.11019' '10.6.1.11753' 4
    Failed with status of 4 while installing version 10.6.1.11753
    VM version is still 10.5.1.11019

  • /usr/sbin/faillock file was present on primary cell and  did not exist on other cells in the cluster

Environment

VMware Cloud Director 10.5.x

Cause

The underlying cause of this issue is attributed to the /usr/sbin/faillock file, which was introduced in VCD version 10.6 and subsequent releases. Upgrade process failed as it was unable to successfully install this file due to its prior existence on the system.

Resolution

To resolve this issue, remove file '/usr/sbin/faillock'  following the instructions provided below:

Note: Before deleting/modifying any files, Take a snapshot of the VMware Cloud Director appliance

  1. SSH to VCD cells and navigate to /usr/sbin/ directory:   cd  /usr/sbin/
  2. Run the following command on all cells to verify if the file 'faillock' exists: ls -al /usr/sbin/ | grep fail*
  3. Delete the file 'faillock' :  rm -r faillock

Once the file is removed, perform the upgrade.

Additional Information

For more information about '/usr/sbin/faillock' file, refer step.9. of Resetting root password in VMware Cloud Director