VCSA update from 7.0.2.00500 to 7.0.3.00100 fails at 95% with error "Invalid Type, expected String, instead got NoneType"
search cancel

VCSA update from 7.0.2.00500 to 7.0.3.00100 fails at 95% with error "Invalid Type, expected String, instead got NoneType"

book

Article ID: 322288

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • The vCenter update fails with error: Invalid Type, expected String, instead got NoneType
  • VAMI shows the error: Invalid Type, expected String, instead got NoneType
  • In the var/log/vmware/applmgmt/PatchRunner.log the following messages are present:

    2021-10-27T08:03:57.203Z ERROR vmware_b2b.patching.phases.patcher Patch hook Patch got ComponentWrapperError.
    Traceback (most recent call last):

    File "/storage/seat/software-updateg44qbjxq/stage/scripts/patches/py/vmware_b2b/patching/phases/patcher.py", line 203, in patch
    _patchComponents(ctx, userData, statusAggregator.reportingQueue)
    File "/storage/seat/software-updateg44qbjxq/stage/scripts/patches/py/vmware_b2b/patching/executor/execution_facade.py", line 53, in executeHook
    patch_errors.ComponentError
    2021-10-27T08:03:58.206Z WARNING root stopping status aggregation...
    2021-10-27T08:03:58.207Z ERROR __main__ Patch vCSA failed
    raise InternalError("Vmware Directory Service failed to delete legacy schema")

    patch_errors.InternalError: Vmware Directory Service failed to delete legacy schema

Cause

There is a Legacy VMDIR Schema present in the VMDIR Database

Resolution

Remove the legacy schema using the following steps:

Note: Take offline snapshots/backup of the vCenter before applying the workaround. If this is an Enhanced Link Mode environment, make sure all the nodes are powered down at the same time before taking the snapshot to prevent replication differences

  1. Get the ObjectGuid of the Legacy schema (Example of object GUID: a53354d4-ef65-4a34-b477-8edc1d4e3d20)

    ldapsearch -o ldif-wrap=no -LLL -h localhost -b "cn=aggregate,cn=schemacontext" -s sub -D "cn=Administrator,cn=Users,dc=upr,dc=local" -w '<your_SSO_password>' objectGuid

  2. Delete the Legacy Schema

    ldapdelete -h localhost -x -D "cn=administrator,cn=users,dc=upr,dc=local" -w '<your_SSO_password>' "cn=aggregate,cn=schemacontext"

  3. Delete the Tombstone entry, entry will be cn=aggregate#objectGUID:<GUID_Value_From_Step1>,cn=Deleted Objects,dc=upr,dc=local

    ldapdelete -h localhost -x -D "cn=administrator,cn=users,dc=vsphere,dc=local" -w '<your_SSO_password>' "cn=aggregate#objectGUID:a53354d4-ef65-4a34-b477-8edc1d4e3d20,cn=Deleted Objects,dc=kccvsphere,dc=local"

  4. Delete the schema

    ldapdelete -h localhost -x -D "cn=administrator,cn=users,dc=upr,dc=local" -w '<your_SSO_password>' "cn=aggregate#objectGUID:a53354d4-ef65-4a34-b477-8edc1d4e3d20,cn=Deleted Objects,dc=upr,dc=local"

  5. Restart the services and proceed with the upgrade.

    service-control --stop --all && service-control --start --all