Problem upgrading Nextcloud app, pre-upgrade-hook already exists

Joined
Mar 22, 2020
Messages
61
Hi
Seems I have an app that I cant upgrade. In this case its Nextcloud that Im trying to upgrade. When trying to upgrade the app it says

File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/helm.py", line 49, in helm_action
raise CallError(f'Failed to {tn_action} App: {errmsg}')
middlewared.service_exception.CallError: [EFAULT] Failed to upgrade App: Error: UPGRADE FAILED: pre-upgrade hooks failed: warning: Hook pre-upgrade nextcloud/templates/backup-postgres-hook.yaml failed: 1 error occurred:
* jobs.batch "pre-upgrade-hook2" already exists

I can still run the app but its the old version that is running. Seems like there is some sort of failed upgrade hook running somehow. Anyone has any idea of what to do in order to be able to update the app or which logs that might give some more clues to whats happening?
 
Joined
Mar 22, 2020
Messages
61
Output from k3s:

admin@truenasscale[~]$ sudo k3s kubectl get pods -A
(filtered out so only ix-nextcloud is shown below)
NAMESPACE NAME READY STATUS RESTARTS AGE
ix-nextcloud nextcloud-54f7f775c7-sdszl 0/2 TaintToleration 0 10d
ix-nextcloud nextcloud-54f7f775c7-sc2tt 0/2 TaintToleration 0 3d7h
ix-nextcloud nextcloud-postgres-75ffb6c777-l5mn4 1/1 Running 0 23h
ix-nextcloud nextcloud-54f7f775c7-f88gf 2/2 Running 0 23h
ix-nextcloud nextcloud-cronjob-28433950-79gfv 0/1 Completed 0 89s


admin@truenasscale[~]$ sudo k3s kubectl get job --namespace=ix-nextcloud
NAME COMPLETIONS DURATION AGE
pre-upgrade-hook2 1/1 6m26s 79d
nextcloud-cronjob-28433950 1/1 16s 2m27s

What do you think about just trying to delete the pre-upgrade-hook2 job that seems to be the problem???
there also seems 2 be 2 nextcloud jobs that shouldnt be there:

nextcloud-54f7f775c7-sdszl
nextcloud-54f7f775c7-sc2tt

delete them also? do you think something bad can happen if i delete the above jobs?
 
Top