Patching vCenter Server may report a failure with "Exception occurred in postInstallHook for wcp:patch"
search cancel

Patching vCenter Server may report a failure with "Exception occurred in postInstallHook for wcp:patch"

book

Article ID: 416136

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Patching vCenter Server Appliance (VCSA) via VAMI reports a failure for postInstallHook:

 

  • Error from /var/log/vmware/applmgmt/PatchRunner.log:


[YYYY-MM-DDTHH:MM:SS] wcp:Patch INFO roles_groups_users Checking if privileges should be updated for role {'id': '1090', 'name': 'CNS-SUPERVISOR-DATASTORE', 'description': 'Allows performing read, write, delete, and rename operations in the datastore browser. ', 'priv_ids': ['System.Read', 'System.Anonymous', 'System.View', 'Datastore.AllocateSpace', 'Datastore.FileManagement']}
[YYYY-MM-DDTHH:MM:SS] wcp:Patch INFO roles_groups_users Checking if role names should be updated for CSI role {'id': '1090', 'name': 'CNS-SUPERVISOR-DATASTORE', 'description': 'Allows performing read, write, delete, and rename operations in the datastore browser. ', 'priv_ids': ['System.Read', 'System.Anonymous', 'System.View', 'Datastore.AllocateSpace', 'Datastore.FileManagement']}
[YYYY-MM-DDTHH:MM:SS] wcp:Patch ERROR wcp Failed to apply patch %s! Error: %s.
[YYYY-MM-DDTHH:MM:SS] ERROR vmware_b2b.patching.phases.patcher Patch hook Patch got ComponentWrapperError.
[YYYY-MM-DDTHH:MM:SS] WARNING root stopping status aggregation...
[YYYY-MM-DDTHH:MM:SS] ERROR __main__ Patch vCSA failed

Environment

vCenter Server 8.0 U3

Cause

This issue is caused if default roles are cloned with the same name on VCSA.

Resolution

Proceed with the below steps post the VCSA has been recovered from the failed state by restoring or reverting the snapshot from a working state.

  • Log in to VCSA using administrator user to vSphere Client
  • Navigate to Roles

Click on the Hamburger icon -> Administration -> Roles

  • Identify the duplicate roles and delete
  • Proceed with the VCSA patching

Additional Information

Related KB: Patching vCenter Server to 8.0 U3 fails at 95% with error "Exception occured in postInstallHook for wcp:Patch"