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

matrix-media-repo: Generate media-repo signing key fails #3516

Closed damadmai closed 2 weeks ago

damadmai commented 2 weeks ago

Running the playbook fails:

TASK [custom/matrix-media-repo : Generate media-repo signing key] *****************************************************************************************************************************
fatal: [matrix.damadmai.at]: FAILED! => changed=true
  cmd:
  - /usr/bin/env
  - docker
  - run
  - --rm
  - --name=matrix-media-repo
  - --user=999:1000
  - --cap-drop=ALL
  - --mount
  - type=bind,src=/matrix/matrix-media-repo/config,dst=/config
  - --workdir=/config
  - --entrypoint=generate_signing_key
  - ghcr.io/t2bot/matrix-media-repo:v1.3.7
  - -output
  - matrix-media-repo.signing.key.TEMP
  delta: '0:00:00.033696'
  end: '2024-09-11 21:00:39.815456'
  msg: non-zero return code
  rc: 125
  start: '2024-09-11 21:00:39.781760'
  stderr: |-
    docker: Error response from daemon: Conflict. The container name "/matrix-media-repo" is already in use by container "07a4f0c1204ac5d52cbfdd08b703e8bd028a7069830d04bb6a35f96681e1db10". You have to remove (or rename) that container to be able to reuse that name.
    See 'docker run --help'.
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

PLAY RECAP ************************************************************************************************************************************************************************************
matrix.damadmai.at         : ok=215  changed=14   unreachable=0    failed=1    skipped=320  rescued=0    ignored=0

As temporary fix setting matrix_media_repo_generate_signing_key: false in vars.yml disables generating the key, but I would want to use that new feature.

To Reproduce My vars.yml file looks like this:

matrix_media_repo_enabled: true
matrix_synapse_admin_enabled: true
matrix_sliding_sync_enabled: true
matrix_synapse_redaction_retention_period: null
matrix_synapse_configuration_extension_yaml: |
  filter_timeline_limit: -1
ntfy_enabled: true
matrix_appservice_double_puppet_enabled: true
matrix_mautrix_signal_enabled: true
matrix_mautrix_signal_bridge_encryption_allow: true
matrix_mautrix_signal_bridge_encryption_default: true

# set temporary for making upgrade work...
matrix_media_repo_generate_signing_key: false

Matrix Server:

Ansible: