VC upgrade from an older 7.x to a later 7.x was failed with error "Invalid Type, expected String, instead got NoneType".
In /var/log/vmware/applmgmt/applmgmt.log we see such error logs,
YYYY-MM-DDTHH:mm:ss CST [#####]DEBUG:vmware.vapi.data.value:Invalid Type, expected String, instead got NoneType
YYYY-MM-DDTHH:mm:ss CST [#####]ERROR:vmware.vapi.bindings.skeleton:Error in invoking MethodIdentifier(InterfaceIdentifier('com.vmware.appliance.update'), 'get') - Invalid Type, expected String, instead got NoneType
Traceback (most recent call last):
File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/bindings/skeleton.py", line 378, in invoke
output_type)
File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/bindings/converter.py", line 1117, in convert_to_vapi
binding_type.accept(visitor)
File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/bindings/type.py", line 40, in accept
visitor.visit(self)
......
......
File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/data/value.py", line 720, in data_value_factory
return constructor(*args)
File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/data/value.py", line 188, in __init__
raise CoreException(msg)
vmware.vapi.exception.CoreException: Invalid Type, expected String, instead got NoneType
VC upgrade was failed and and a troubleshoot was needed.
In /var/log/vmware/applmgmt/PatchRunner.log we observed these errors during the patch process,
YYYY-MM-DDTHH:mm:ss.###Z vpxd:Expand ERROR vmware_b2b.patching.executor.hook_executor Patch hook 'vpxd:Expand' failed.
Traceback (most recent call last):
File "/storage/seat/software-updatev0qiaqu1/stage/scripts/patches/py/vmware_b2b/patching/executor/hook_executor.py", line 74, in executeHook
executionResult = systemExtension(args)
File "/storage/seat/software-updatev0qiaqu1/stage/scripts/patches/libs/sdk/extensions.py", line 106, in __call__
result = self.extension(*args)
File "/storage/seat/software-updatev0qiaqu1/stage/scripts/patches/libs/sdk/extensions.py", line 123, in _func
return func(*args)
File "/storage/seat/software-updatev0qiaqu1/stage/scripts/patches/payload/components-script/vpxd/__init__.py", line 139, in expand
vpxd_cfg_patch.doPatching()
File "/storage/seat/software-updatev0qiaqu1/stage/scripts/patches/payload/components-script/vpxd/patch_utils.py", line 303, in doPatching
raise ex
File "/storage/seat/software-updatev0qiaqu1/stage/scripts/patches/payload/components-script/vpxd/patch_utils.py", line 296, in doPatching
self.initCfgTree()
File "/storage/seat/software-updatev0qiaqu1/stage/scripts/patches/payload/components-script/vpxd/patch_utils.py", line 240, in initCfgTree
self.vpxdcfg = ET.parse(self.vpxd_cfg_path)
File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 1197, in parse
tree.parse(source, parser)
File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 598, in parse
self._root = parser._parse_whole(source)
File "<string>", line None
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 39, column 15
YYYY-MM-DDTHH:mm:ss.###Z ERROR vmware_b2b.patching.utils.phase_utils Patch hook Expand got ComponentError.
Traceback (most recent call last):
File "/storage/seat/software-updatev0qiaqu1/stage/scripts/patches/py/vmware_b2b/patching/utils/phase_utils.py", line 110, in executeHook
statusAggregator.reportingQueue)
File "/storage/seat/software-updatev0qiaqu1/stage/scripts/patches/py/vmware_b2b/patching/utils/phase_utils.py", line 75, in executeComponentsHook
executeComponentHook(hook, ctx, c, userData, reportingQueue)
File "/storage/seat/software-updatev0qiaqu1/stage/scripts/patches/py/vmware_b2b/patching/executor/execution_facade.py", line 98, in executeComponentHook
reportQueue, identifier, expectedResultType)
File "/storage/seat/software-updatev0qiaqu1/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-updatev0qiaqu1/stage/scripts/patches/py/vmware_b2b/patching/executor/hook_executor_process.py", line 119, in executeHook
raise ex
patch_errors.ComponentError
YYYY-MM-DDTHH:mm:ss.###Z WARNING root stopping status aggregation...
YYYY-MM-DDTHH:mm:ss.###Z ERROR __main__ Pre-patch vCSA failed
It seems that there is something wrong in line 39 of vpxd cfg /etc/vmware-vpx/vpxd.cfg. By checking the file we see that line 39 is in a vcls session and have a wrong format,
<vcls>
<clusters>
<domain-c<domain-c###:UUID>> <== this is the line 39
<enabled>False</enabled>
</domain-c<domain-c###:UUID>>
</clusters>
</vcls>
A correct format is similar to below,
<vcls>
<clusters>
<domain-c###>
<enabled>True</enabled>
</domain-c###>
</clusters>
</vcls>
The content between <vcls> and </vcls> is to disable/enable vCLS on an existing cluster. To modify it,