During NAPP upgrade to 4.2.0, upgrade of the Metrics feature fails because the metrics-nsx-config component fails to come up. If other failures are observed during metrics upgrade, the source of the failure may be different and this article may not be applicable.
Log into the NSX Manager and using napp-k command as below:
Check the logs of the failing pod (i.e. in CrashLoopBackOff):
Additionally, we can check the site-service logs:
If no matches are found in the logs, then the issue is likely something else.
NAPP 4.2.0
The site-service component waits until postgres is running before starting. When it starts up, it will connect to postgres, and
subsequently create/migrate table into the configuration database. However, if migration fails (e.g. postgres restarts during
the migration), it is not retried; a restart of site-service is required. Since the table is not created in postgres, downstream applications that rely on this table will fail.
kb_upgrade_fix.sh napp-k get job load-default-site -o yaml > load-default-site-backup.yamlchmod +x kb_upgrade_fix.sh ./kb_upgrade_fix.sh, the script will print "script executed successfully, please restart pods and retry upgrade" if everything succeedednapp-k rollout restart deploy/metrics-nsx-config