Run the following commands (in Primary node) to check and remove the invalid "UserWrapper -> allowAllResources" for affected rows in postgres repl db kv_auth table:
After fixing the affected kv_auth UserWrapper rows, manually start analytics service on primary node (systemctl start analytics) and the upgrade should continue and complete successfully thereafter.