vCenter VAMI patch failed on setting permissions for folder /storage/archive/vpostgres
search cancel

vCenter VAMI patch failed on setting permissions for folder /storage/archive/vpostgres

book

Article ID: 403331

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • vCenter patch failure followed by the inability to perform a rollback via the VAMI.

  • In the vCenter /var/log/vmware/applmgmt/Patchrunner.log
    YYYY-MM-DDTHH:MM:SSZ Running command: ['chown', '-R', 'vpostgres:vpgmongrp', '/storage/archive/vpostgres']
    stderr: YYYY-MM-DDTHH:MM:SSZ Error while updating the permission of archive directory.
    YYYY-MM-DDTHH:MM:SSZ vpostgres:Patch ERROR vmware_b2b.patching.executor.hook_executor Patch hook 'vpostgres:Patch' failed.
    Traceback (most recent call last):
      File "/storage/updatemgr/software-updateexymxnuy/stage/scripts/patches/py/vmware_b2b/patching/executor/hook_executor.py", line 74, in executeHook
        executionResult = systemExtension(args)
      File "/storage/updatemgr/software-updateexymxnuy/stage/scripts/patches/libs/sdk/extensions.py", line 106, in __call__
        result = self.extension(*args)
      File "/storage/updatemgr/software-updateexymxnuy/stage/scripts/patches/libs/sdk/extensions.py", line 123, in _func
        return func(*args)
      File "/storage/updatemgr/software-updateexymxnuy/stage/scripts/patches/payload/components-script/vpostgres/__init__.py", line 183, in patch
        'PostgreSQL failed to run upgrade command.')))
    patch_errors.UserError: PostgreSQL failed to run upgrade command.

  • This error may appear in the VAMI update page: There is not enough space on the disk(s)

Environment

  • VMware vCenter Server 7
  • VMware vCenter Server 8

Cause

  • A failure in the upgrade script occurs when attempting to modify permissions on /storage/archive/vpostgres. If the directory does not exist, the chown command fails, preventing the upgrade from progressing or rolling back correctly via the VAMI.

Resolution

  • Revert vCenter:
    • Restore the vCenter Server Appliance (VCSA) to the snapshot taken prior to the patch attempt.
  • Create the Directory:
    • Access the vCenter via SSH, login as root, and run the following command to create the missing directory: mkdir /storage/archive/vpostgres
  • Re-attempt update from VAMI:
    • Since the folder object exists, it can now run chown on the above folder to create the permissions as needed to complete the update.

Additional Information

If the folder exists, but the issue persists. Raise a case with Broadcom Support.