Opened 5 months ago

Closed 5 months ago

#3232 closed task (fixed)

System upgrade matrix container to bullseye

Reported by: robe Owned by: robe
Priority: normal Milestone: Sysadmin Contract 2024-I
Component: SysAdmin/Matrix Keywords:
Cc:

Description

matrix container is currently at buster (debian 10), needs to be upgraded and we need to do in stages, so next upgrade will be bullseye.

I'm going to start the process now, and expect matrix to be up and down why I make this change.

Change History (3)

comment:1 by robe, 5 months ago

I upgraded to debian-11 and also the PostgreSQL from 11 to 13.

However if I try to run apt auto-remove, then heisenberg-bridge fails to start.

If I try to run heisenberg-bridge manually after auto-remove, I gets this:

root@matrix:~# su heisenbridge
heisenbridge@matrix:/root$ cd ~/
heisenbridge@matrix:~$ /home/heisenbridge/hbridge/bin/python -m heisenbridge -v -c /etc/matrix-synapse/heisenbridge.yaml -i --identd-port 9113 --owner @strk:osgeo.org
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f776150d740 (most recent call first):

So I assume it must be pointing at an obsolete python or hard-wired to look for stuff.

To fix I reverted back to before I ran:

apt autoremove

There is still one other service that either way doesn't start, but I think i've seen that before and is harmless, I have to look up how I fixed that:

  UNIT                          LOAD   ACTIVE SUB    DESCRIPTION
● systemd-journald-audit.socket loaded failed failed Journal Audit Socket

There is also issue with nginx key being expired. My usual fix doesn't seem to work so I'll revisit later

comment:2 by robe, 5 months ago

On further inspection I guess it's because heisenbridge depends on python3.7 which is removed by autoremove since debian bullseye ships with 3.9.

Looks like heisenberg is installed via venv via ansible? So we need to rebuild that venv.

I'm hesitant to mess with that setup unless strk is around to catch me if I fall. Looks like it uses an ansible built-in heisenbridge module, which I would have to pray knows to pull in 3.9, which I assume it would and then we would need to possibly repatch the identd.py script again for 3.9 (or not).

I'll open a separate ticket for this and will finish the autoremove and fix failed service.

comment:3 by strk, 5 months ago

Resolution: fixed
Status: assignedclosed

Heisenbridge is ok now. A problem I noticed on the machine was a bogus entry in /etc/source.list - I've fixed that (the bullseye-security url was wrong, the bullseye-updates was missing). I've upgraded again after fixing the entries so now we're at Synapse 1.112.0

I've run the autoremove and Heisenbridge is still up.

I guess we can close this ticket, feel free to reopen if anything to do is left.

Note: See TracTickets for help on using tickets.