Apps with a PostgreSQL database that were updated to the new CNPG common sometimes don’t survive a reboot of TrueNAS Scale. The App then hangs on DEPLOYING and pods are in state Completed or TaintToleration.
Symptoms
If you have rebooted and your Apps are hanging on DEPLOYING, check if you see pods in state Completed or TaintToleration and the apps main pod in state Init with the
command k3s kubectl get all -n ix-<app-name>.
Logs from the cnpg-wait container in the main app pod show something like this:
Recovery Steps
To recover your app, you need to first stop it (do not click the Stop button!), delete the hanging pods and then restart the app.
Stop the app either by checking “Stop All” in the app settings or with HeavyScript via the SCALE GUI Shell as below
Wait 2-3min
Delete any still hanging pods with the below command
Start the app either by unchecking “Stop All” in the app settings or with HeavyScript as below
If you unchecked “Stop All” you might have to click the Start button on the GUI (Start is safe, Stop is NOT). There also might be a task that gets stuck in TrueNAS under Jobs (top right). You can get rid of those by restarting the TrueNAS GUI with the below command
Wait 2-3 minutes
Check that the app and all of its pods are running. In the third paragraph there should be no deployment.apps with 0 AVAILABLE
You can scale them up manually to 1 replica or if it’s a cnpg-main-rw pod you might want 2 replicas
Credit
Thanks to Zasx from the TrueCharts team for the steps used to create this guide.