While patching the VCSA 8.0.3.00700, fails with Exception occurred in postInstallHook for wcp
search cancel

While patching the VCSA 8.0.3.00700, fails with Exception occurred in postInstallHook for wcp

book

Article ID: 423920

calendar_today

Updated On:

Products

VMware vCenter Server 8.0

Issue/Introduction

Symptoms:

  • VCSA update fails at 80% during the WCP service upgrade 
  • VAMI reports: Installation failed: Exception occurred in postInstallHook
  • Logging in /var/log/vmware/applmgmt/PatchRunner.log reports errors like:

Date wcp:Patch INFO roles_groups_users No new privileges to grant to VMImageServiceGlobal
Date wcp:Patch WARNING roles_groups_users Removing privileges {'ContentLibrary.UpdateSession', 'ContentLibrary.AddLibraryItem', 'ContentLibrary.DeleteLibraryItem'} from VMImageServiceGlobal role is not supported
Date wcp:Patch INFO roles_groups_users Created global permission for group NsxAuditors and role NsxAuditor
Date wcp:Patch INFO roles_groups_users Created global permission for group NsxViAdministrators and role NsxViAdministrator
Date wcp:Patch INFO roles_groups_users Created global permission for group NsxAdministrators and role NsxAdministrator
Date wcp:Patch INFO root Read privilege granted for user wcp to VECS store vpxd-extension
Date wcp:Patch INFO root Read privilege granted for user wcp to VECS store wcp
Date wcp:Patch INFO wcp Applied patch roles_groups_users for wcp.
Date wcp:Patch INFO wcp Applying patch update_ls_registration.
Date wcp:Patch ERROR root Failed to update WCP registration with lookup service; 'WorkloadStorageManagement'
Date wcp:Patch ERROR wcp Failed to apply patch %s! Error: %s.
Date wcp:Patch ERROR wcp Not all patches were applied. Latest applied patch is 2
Date wcp:Patch ERROR vmware_b2b.patching.executor.hook_executor Patch hook 'wcp:Patch' failed.
Traceback (most recent call last):
  File "/storage/seat/software-update637cdes1/stage/scripts/patches/py/vmware_b2b/patching/executor/hook_executor.py", line 74, in executeHook
    executionResult = systemExtension(args)
  File "/storage/seat/software-update637cdes1/stage/scripts/patches/libs/sdk/extensions.py", line 106, in __call__
    result = self.extension(*args)
  File "/storage/seat/software-update637cdes1/stage/scripts/patches/libs/sdk/extensions.py", line 123, in _func
    return func(*args)
  File "/storage/seat/software-update637cdes1/stage/scripts/patches/payload/components-script/wcp/__init__.py", line 225, in doPatching
    doIncrementalPatching(current_version)
  File "/storage/seat/software-update637cdes1/stage/scripts/patches/payload/components-script/wcp/__init__.py", line 343, in doIncrementalPatching
    raise user_error
patch_errors.UserError: Failed to apply patch update_ls_registration! Error: 'WorkloadStorageManagement'.
Date ERROR vmware_b2b.patching.phases.patcher Patch hook Patch got ComponentWrapperError.
Traceback (most recent call last):
  File "/storage/seat/software-update637cdes1/stage/scripts/patches/py/vmware_b2b/patching/phases/patcher.py", line 208, in patch
    _patchComponents(ctx, userData, statusAggregator.reportingQueue)
  File "/storage/seat/software-update637cdes1/stage/scripts/patches/py/vmware_b2b/patching/phases/patcher.py", line 90, in _patchComponents
    executeComponentHook(Hook.Patch, ctx, c, userData, reportingQueue)
  File "/storage/seat/software-update637cdes1/stage/scripts/patches/py/vmware_b2b/patching/executor/execution_facade.py", line 97, in executeComponentHook
    result = executeHook(c.patchScript, hook, args,
  File "/storage/seat/software-update637cdes1/stage/scripts/patches/py/vmware_b2b/patching/executor/execution_facade.py", line 53, in executeHook
    result = executor.executeHook(scriptFile, hook, args, reportQueue, reportIdentifier)
  File "/storage/seat/software-update637cdes1/stage/scripts/patches/py/vmware_b2b/patching/executor/hook_executor_process.py", line 119, in executeHook
    raise ex
patch_errors.ComponentError
Date WARNING root stopping status aggregation...
Date ERROR __main__ Patch vCSA failed

 

The above error messaging may report a failure to find any of the following users:
 
WorkloadStorageManagement
vSphereKubernetesManager
SupervisorServiceCluster
SupervisorServiceRootFolder
SupervisorServiceGlobal
VMOperatorController
VMOperatorControllerGlobal
VMServicesAdministrator
NsxAuditor
NsxViAdministrator
NsxAdministrator

Environment

vSphere vCenter Server 8.0.3

Cause

This failure is caused by either of the following conditions:

  • The expected roleID is not present on the vCenter server being updated.
  • The expected roleID is present, but is named incorrectly in VMDIR. The most common presentation of incorrect naming appears when users in VMDIR have spaces in their name, ie:
     
                    workload storage management instead of workloadstorageManagement
                                                                  
                                                                      
  • The role name and roleid is present but the role id will have an invalid value.

Resolution

    • Pre-requisite:

      Obtain the ID and verify the RoleName does not match "WorkloadStoragemanagement"

      i.e. The incorrect Role Name may look like:

       "Workload Storage Management"

       

      1. SSH to the VC server appliance and log in with the root account
      2. Run the below command:

      # /opt/likewise/bin/ldapsearch -v -h localhost -p 389 -D "cn=administrator,cn=users,dc=vsphere,dc=local" -b "dc=vsphere,dc=local" -W | grep -i "RoleModel\|vmwAuthzRoleName" | grep -B1 -i workload

      Example output:

      ldap_initialize( ldap://localhost:389 )
      Enter LDAP Password:
      filter: (objectclass=*)
      requesting: All userApplication attributes
      dn: cn=1004,cn=RoleModel,cn=VmwAuthz,cn=services,dc=vsphere,dc=local
      vmwAuthzRoleName: Workload Storage Management

       

    • Workaround Steps

      1. Connect to the vCenter server MOB    https://<VCSA_FQDN>mob/?moid=AuthorizationManager
      2. Login using the "[email protected]" account
      3. Select "UpdateAuthorizationRole"
      4. Enter the "RoleID" / "NewName"
      5. Click on "Invoke Method" 
        A successful response with be  "Method Invocation Result: void"
      6. Logout of the MOB
      7. SSH into VC server appliance and log in with the root account
      8. run the command:
        service-control --restart wcp
      9. Run the below commend to confirm the Role name is now in correct form:  "WorkloadStoragemanagement"

        # /opt/likewise/bin/ldapsearch -v -h localhost -p 389 -D "cn=administrator,cn=users,dc=vsphere,dc=local" -b "dc=vsphere,dc=local" -W | grep -i "RoleModel\|vmwAuthzRoleName" | grep -B1 -i workload
      10. Resume patching of the vCenter server