spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.88k stars 1.04k forks source link

Could not find the requested service matrix-ma1sd.service: host #771

Closed RobertCochran closed 3 years ago

RobertCochran commented 3 years ago

Trying to re-run the setup-all tag to upgrade ultimately results in:

TASK [matrix-ma1sd : Ensure systemd services blocking the database import are stopped] ****************************************************************
failed: [matrix.firestormtech.net] (item=matrix-ma1sd.service) => {"ansible_loop_var": "item", "changed": false, "item": "matrix-ma1sd.service", "msg": "Could not find the requested service matrix-ma1sd.service: host"}

OS is CentOS 7 on a VPS.

It's been longer than I care to admit (February...) since this server was setup and installed, and I haven't updated it since. Didn't end up getting used very much, so if I have to flatten it and start over, it wouldn't be a huge deal, but would prefer not to deal with that. Seems like no one else has run into this issue, and trying to search the documentation left me empty-handed. I don't recall having done anything fancy in configuring the server - I left most everything alone.

Thanks!

aaronraimist commented 3 years ago

That error appears to be related to these recent changes: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md#2020-12-23

You could try these steps https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md#going-back-to-sqlitenedb-if-things-went-wrong to try to go back to SQLite for ma1sd and see if that allows you to upgrade. Just replace the references in there from mautrix_facebook to matrix_ma1sd.

spantaleev commented 3 years ago

Should be fixed by 86da489b9b5c2349b8943509db152.

You can see additional explanations about what happened there. Basically, you've waited a long time before upgrading services and are undergoing both a migration from mxisd to ma1sd, and a migration from an SQLite database to a Postgres database. Our automated tasks did not account for such an edge-case, but it should be better now.

I suppose Aaron's suggestions would have worked as well. Moving to SQLite (matrix_ma1sd_database_engine: sqlite) would have let you complete the (mxisd -> ma1sd) migration and fully install ma1sd. You could then have gotten rid of that matrix_ma1sd_database_engine: sqlite thing, so the playbook would move your ma1sd setup to Postgres.

In any case, you should just be able to rerun the playbook now and not have to resort to any such hacks. Thanks for reporting this issue! It's something that might come up from others as well.

RobertCochran commented 3 years ago

That appears to have done it, thanks! We ended up not using it very much due to an obnoxious issue regarding trusting multiple devices, but that has been fixed fairly recently upstream, so now we're getting everything ready to try again. ^^