Update of vCenter to 8.0u3x fails with 'Exception occurred in postInstallHook for content-library:Patch'
search cancel

Update of vCenter to 8.0u3x fails with 'Exception occurred in postInstallHook for content-library:Patch'

book

Article ID: 415258

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Update of vCenter to 8.0 U3x fails with 'Exception occurred in postInstallHook for content-library:Patch' around 80% - 91%

  • Option to Resume vCenter update fails and error repeats if attempted.
  • In the /var/log/vmware/applmgmt/PatchRunner.log we see entries similar to below

content-library:Patch ERROR vmware_b2b.patching.executor.hook_executor Patch hook 'content-library:Patch' failed.
Traceback (most recent call last):
 File "/storage/seat/software-updatebtrn43l7/stage/scripts/patches/py/vmware_b2b/patching/executor/hook_executor.py", line 74, in executeHook
    executionResult = systemExtension(args)
 File "/storage/seat/software-updatebtrn43l7/stage/scripts/patches/libs/sdk/extensions.py", line 106, in __call__
    result = self.extension(*args)
 File "/storage/seat/software-updatebtrn43l7/stage/scripts/patches/libs/sdk/extensions.py", line 123, in _func
    return func(*args)
 File "/storage/seat/software-updatebtrn43l7/stage/scripts/patches/payload/components-script/content-library/__init__.py", line 303, in execute_patch
    register_cls()
 File "/storage/seat/software-updatebtrn43l7/stage/scripts/patches/payload/components-script/content-library/patches/add_new_cls_privileges.py", line 151, in register_cls
    reg_info.registerAll(solution_user_name, solution_user_id, service_id=service_id)
 File "/storage/seat/software-updatebtrn43l7/stage/scripts/patches/payload/components-script/content-library/patches/cis_register.py", line 387, in registerAll
    self.registerUserAndService(user_name, user_id, service, service_id=service_id)
 File "/storage/seat/software-updatebtrn43l7/stage/scripts/patches/payload/components-script/content-library/patches/cis_register.py", line 422, in registerUserAndService
    create_sso_groups(service_spec)
 File "/storage/seat/software-updatebtrn43l7/stage/scripts/patches/payload/components-script/content-library/patches/cis_register.py", line 623, in create_sso_groups
    authz_patch.assign_groups_to_roles(service_spec['group-role'])
 File "/storage/seat/software-updatebtrn43l7/stage/scripts/patches/payload/components-script/content-library/patches/cis_register.py", line 590, in assign_groups_to_roles
    self.authz_client.set_permission(
 File "/usr/lib/vmware/site-packages/cis/cisreglib.py", line 748, in set_permission
    ac = self.create_access_control(principal, rolenames,
 File "/usr/lib/vmware/site-packages/cis/cisreglib.py", line 728, in create_access_control
    role_ids.append(role_objs_dict[rolename])
KeyError: 'com.vmware.Content.Registry.Admin'
ERROR vmware_b2b.patching.phases.patcher Patch hook Patch got ComponentWrapperError.
Traceback (most recent call last):
 File "/storage/seat/software-updatebtrn43l7/stage/scripts/patches/py/vmware_b2b/patching/phases/patcher.py", line 208, in patch
    _patchComponents(ctx, userData, statusAggregator.reportingQueue)
 File "/storage/seat/software-updatebtrn43l7/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-updatebtrn43l7/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-updatebtrn43l7/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-updatebtrn43l7/stage/scripts/patches/py/vmware_b2b/patching/executor/hook_executor_process.py", line 119, in executeHook
    raise ex
patch_errors.ComponentError
WARNING root stopping status aggregation...
ERROR __main__ Patch vCSA failed

Environment

vCenter Server 8.0.3

Cause

ELM Mode: The vCenter was part of ELM mode and not disjoined properly.

Duplicate Role Conflict: The vCenter upgrade process attempts to create the com.vmware.Content.Registry.Admin role, but it already exists in the vSphere environment, leading to a conflict. This can happen if the role was manually created or retained from a previous vCenter version.
 
Residual Role from an Older vCenter Version: If the vCenter was previously upgraded from an older version (e.g., 6.x to 7.x or 8.x), some roles may not have been properly cleaned up, causing duplication.
 
Inconsistent vCenter Database Entries: The vCenter database may contain stale or duplicate role entries due to incomplete role migrations. The upgrade script detects this and fails when it tries to create the role again.

Resolution

Modify or add the missing configurations in vCenter

  1. Log in to the vSphere Web Client 
  2. Navigate to the Single Sign-On section under Administration.
  3. Go to Roles and check if 'com.vmware.Content.Registry.Admin' exists.
  4. Check for "Content Library Registry Administrator"

     

  5. Click on Edit and rename as "com.vmware.Content.Registry.Admin".
  6. Click on Save
  7. Now "Content Library Registry Administrator" changes to (sample) Example: Content Library Registry Administrator (sample) 
  8. Restart all the vCenter Services  (service-control --stop --all && service-control --start --all)
  9. Login to VAMI and perform the upgrade.

Alternate method if the above method does not fix the issue.

Modify or add the missing configurations in vCenter using JXplorer.

  • Connect to vCenter server following steps in Using JXplorer to connect to the vSphere Single Sign-on

  • Expand 'vSphere' -> Expand 'services' -> Expand 'vmwAuthz' -> Expand 'RoleModel'.

  • Select model ID -> look for "vmwAuthzRoleDescription" and validate role.

  • Select HTML View -> rename "content Library Registry administrator (sample) to "com.vmware.Content.Registry.Admin". Save the changes.

  • Restart the vCenter services using command service-control --stop --all && service-control --start --all

  • Login to VAMI and resume the vCenter upgrade.