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.76k stars 1.03k forks source link

mxisd need postgres parameters #195

Closed tvo6 closed 5 years ago

tvo6 commented 5 years ago

When I try to upgrade using ansible-playbook -i inventory/hosts setup.yml --tags=setup-all, it fails during roles/matrix-postgres/tasks/validate_config.yml with the error:

failed: [matrix.ensimag.fr] (item=matrix_postgres_connection_hostname) => {"changed": false, "item": "matrix_postgres_connection_hostname", "msg": "You need to define a required configuration setting (`matrix_postgres_connection_hostname`) for using mxisd.\n"}
failed: [matrix.ensimag.fr] (item=matrix_postgres_connection_username) => {"changed": false, "item": "matrix_postgres_connection_username", "msg": "You need to define a required configuration setting (`matrix_postgres_connection_username`) for using mxisd.\n"}
failed: [matrix.ensimag.fr] (item=matrix_postgres_connection_password) => {"changed": false, "item": "matrix_postgres_connection_password", "msg": "You need to define a required configuration setting (`matrix_postgres_connection_password`) for using mxisd.\n"}
failed: [matrix.ensimag.fr] (item=matrix_postgres_db_name) => {"changed": false, "item": "matrix_postgres_db_name", "msg": "You need to define a required configuration setting (`matrix_postgres_db_name`) for using mxisd.\n"}

I absolutely don't get what these parameters are. I tried to disable mxisd, but can't figure out how, and if it should be able to search for users, it should use my ldap settings…

Does somebody have a clue for me? Thanks,

spantaleev commented 5 years ago

Saying mxisd is a typo. It should say Postgres on that error message. I've fixed that in 3567d9a.


The problem seems to be due to our big refactoring in c10182e5 (#81) - splitting the playbook into independent roles.

That was a long time ago, so I'm guessing you haven't upgraded since then?

The group_vars/matrix_servers file defines some defaults and wires things together. For that configuration file to kick in, your inventory/hosts file needs to put servers in the matrix_servers group though. If yours doesn't yet, you need to make sure to fix it.

To carry out the upgrade, you'd better read through the CHANGELOG.md file going back way into the past.

The playbook tries to detect brokenness and alert you, so you may be okay not reading the file, but it's better to be diligent anyway. I'm not sure from what kind of version you're upgrading and whether the playbook would handle such a huge upgrade on its own.


If you using our roles in your own separate playbook, you may need to define the required variables manually.

By default, they have an empty value in the role itself (roles/matrix-postgres/defaults.yaml), forcing you to define a valid value.

(.. that is, unless you rely on group_vars/matrix_servers)

tvo6 commented 5 years ago

OK, thanks for your quick answer (and commit 3567d9a :)).

I did an upgrade on 16th February, and once I've changed my group from matrix-servers to matrix_servers, everything worked fine. I didn't see this change in Changelog, I may have read it to fast.

Thanks.