We've tried to deploy using
$ update-code ; commcare-cloud <env> deploy in order to benefit from this fix but we get the following error:
Consequently, the vault file seems to have disappeared.
Is this the right way to deploy the latest version?
We also tried to rollback with
$ commcare-cloud <env> fab rollback but it didn't work.
That is the correct way to deploy new code. One of the steps in the deploy is to update any indexes in Elasticsearch that need updating. If this process takes too long the deploy will exit with this message.
You should try deploy again. If the error persists you can check if any of the following processes are still running:
If none of them are running and the deploy still fails with the same error then it's likely that one of the processes failed and you'll need to clear the status manually and re-try the deploy.
Launch a Django shell:
$ commcare-cloud <env> django-manage shell
Run the following commands:
> from corehq.apps.hqadmin.management.commands.preindex_everything import clear_preindex_complete
Thanks for your answer. We tried your suggestions but without success. We still get the same error. Can you think of anything else we could try?
We are really concerned about not being able to edit the vault file (we can't find it). It like the file repo is in some sort of unstable/unknown state (probably not a real thing). At this point we can't risk rebooting the server so we're in a tricky spot.
Not being able to find the vault file is worrying. Are you using Git or any other kind of VCS? Perhaps you can check the repository history?
In terms of the deploy being blocked, the 'preindex' lock is tied to the Git version of the commcare-hq repository, so a new deploy with new commits should not have the same issue unless there is really something that needs indexing.
You could try run the individual commands:
python manage.py sync_prepare_couchdb_multi
python manage.py ptop_preindex