This is a known issue impacting NSX-T Data Center.
Workaround:
If a host upgrade failure has already occurred, follow these steps to recover.
1. On the ESXi host that has failed to upgrade, clear the upgrade status flag
nsxcli -c set host-switch upgrade-status false
2. Reboot the host and resume the upgrade
If you are using the "nsxcli -c set host-switch upgrade-status false" command and encountering the "Internal Error" issue, please open a support case with Broadcom Support.
This may also lead to a situation where VMs cannot be vMotioned to or from an impacted host as described in KB - After NSX-T In-place upgrade failure, vMotions off host fail because "the network is under maintenance"