iiab / iiab-admin-console

GUI (Admin Console) to configure IIAB and install content
GNU General Public License v2.0
13 stars 16 forks source link

Glitch when upgrading Admin Console: moving aside `/usr/local/speedtest` often helps #575

Open holta opened 2 months ago

holta commented 2 months ago

Not a serious bug but FYI the workaround (of manually moving aside /usr/local/speedtest) seems to work well.

e.g. when trying to run the following as root (to upgrade Admin Console) a year or so later:

cd /opt/iiab/iiab-admin-console
git pull
./install

To get past an error like the following:

TASK [cmdsrv : Install speedtest-cli into virtual environment] ***** fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": ["/usr/local/speedtest/bin/pip3", "install", "--no-cache-dir", "speedtest-cli"], "msg": "\n:stderr: Traceback (most recent call last):\n File \"/usr/local/speedtest/bin/pip3\", line 5, in \n from pip._internal.cli.main import main\nModuleNotFoundError: No module named 'pip'\n"}

tim-moody commented 2 months ago

I regularly git pull adm cons and then run install and have never seen this, so I question the circumstances.

Module 'pip' is supposed to be an alias for the builtin pip according to

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/pip_module.html

holta commented 2 months ago

It happened on at least 2 different Ubuntu-based IIAB's.

I haven't investigated the root cause, since removing dir /usr/local/speedtest obviously worked, but just FWIW it's possibly related to these IIAB machines likely having been upgraded from Ubuntu 22.04 to 24.04

tim-moody commented 2 months ago

If it's on a later OS, I wonder if ansible stopped using the keyword pip, and the stanza has to be ansible.builtin.pip:

tim-moody commented 2 months ago

Just did an apt update and upgrade on ub 24.04, then git pull on adm console and ./install

TASK [cmdsrv : Install speedtest-cli into virtual environment] ************************************************************************************
ok: [127.0.0.1]

No problem.

holta commented 2 months ago

My guess is that it happens to everyone affected by the recent years' venv / pip changes (PEP 668 or similar).

(That means situations like where Ubuntu 22.04 was upgraded to 24.04 and similar, causing failure to find pip where it was formerly expected — within old venv's — e.g. suddenly causing things like /usr/local/speedtest/bin/pip3 to not work.)

In any case the workaround is published (on this ticket) which is probably good enough.

holta commented 2 months ago

Just FYI quasi-automated IIAB software upgrades (new since July 2024!) are one reason I was looking at overall resiliency/reliability:

CLARIF: IIAB software upgrades are NOT currently intended to update/upgrade every individual IIAB app! Rather they're about quickly + reliably updating/upgrading core IIAB software infra, as outlined here...

holta commented 2 months ago

@EMG70 also experienced this today, apparently on an Ubuntu 24.04 machine that was not upgraded from 22.04: https://dpaste.com/2WVMRNZQN

image

holta commented 2 months ago

apparently on an Ubuntu 24.04 machine that was not upgraded from 22.04

CLARIF: https://dpaste.com/2WVMRNZQN indicates the machine was upgraded from Ubuntu 23.10 to 24.04 — so it sounds like the very same kind of failure mode / scenario outlined above.

holta commented 2 months ago

@EMG70 indicates that some off his other venv's may also be making mess — much like /usr/local/speedtest — after he upgraded Ubuntu 23.10 to 24.04

If he has time to connect in coming days, I'll try to take a closer look.