Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python2 fix [for KA Lite on Debian 12 or Ubuntu 23.04 / 23.10] #3527

Merged
merged 7 commits into from Apr 8, 2023

Conversation

jvonau
Copy link
Contributor

@jvonau jvonau commented Apr 6, 2023

Fixes bug:

#3450 #3399 #3289

Description of changes proposed in this pull request:

see new file

Smoke-tested on which OS or OS's:

http://sprunge.us/rtK5U5 My home-brew RasPiOS-12arm64 test box #3526 Should work on Ubuntu-23.04 and Debian-12 also

1478 108343 ? 00:00:01 kalite

1994 2023-04-05 20:53:33,009 p=106685 u=root n=ansible | TASK [0-init : STAGE 0 HAS COMPLETED ======================================] ******************************************************
1995 2023-04-05 20:53:33,096 p=106685 u=root n=ansible | TASK [kalite : Assert that "kalite_install is sameas true" (boolean not string etc)] **********************************************
1996 2023-04-05 20:53:33,184 p=106685 u=root n=ansible | ok: [127.0.0.1]
1997 2023-04-05 20:53:33,237 p=106685 u=root n=ansible | TASK [kalite : Assert that "kalite_enabled | type_debug == 'bool'" (boolean not string etc)] **************************************
1998 2023-04-05 20:53:33,303 p=106685 u=root n=ansible | ok: [127.0.0.1]
1999 2023-04-05 20:53:33,355 p=106685 u=root n=ansible | TASK [kalite : Install KA Lite if 'kalite_installed' not defined, e.g. in /etc/iiab/iiab_state.yml] *******************************
2000 2023-04-05 20:53:33,510 p=106685 u=root n=ansible | included: /opt/iiab/iiab/roles/kalite/tasks/install.yml for 127.0.0.1
2001 2023-04-05 20:53:33,585 p=106685 u=root n=ansible | TASK [kalite : Download https://raw.githubusercontent.com/learningequality/ka-lite/master/requirements.txt to /opt/iiab/pip-packages/kalite.txt] ***
2002 2023-04-05 20:53:35,535 p=106685 u=root n=ansible | ok: [127.0.0.1]
2003 2023-04-05 20:53:35,586 p=106685 u=root n=ansible | TASK [kalite : Install packages: python2, python-setuptools, virtualenv (for Python 2)] *******************************************
2004 2023-04-05 20:53:35,641 p=106685 u=root n=ansible | skipping: [127.0.0.1]
2005 2023-04-05 20:53:35,691 p=106685 u=root n=ansible | TASK [kalite : Use scripts/install_python2.sh to install python2 and virtualenv] **************************************************
2006 2023-04-05 20:54:05,571 p=106685 u=root n=ansible | changed: [127.0.0.1]
2007 2023-04-05 20:54:05,622 p=106685 u=root n=ansible | TASK [kalite : Use pip to pin setuptools to 44 in /usr/local/kalite/venv] *********************************************************
2008 2023-04-05 20:54:29,789 p=106685 u=root n=ansible | changed: [127.0.0.1]
2009 2023-04-05 20:54:29,841 p=106685 u=root n=ansible | TASK [kalite : Use pip to install ka-lite-static to /usr/local/kalite/venv] *******************************************************
2010 2023-04-05 20:55:09,021 p=106685 u=root n=ansible | changed: [127.0.0.1]
2011 2023-04-05 20:55:09,068 p=106685 u=root n=ansible | TASK [kalite : Install from templates: venv wrapper /usr/bin/kalite, unit file /etc/systemd/system/kalite-serve.service] **********
2012 2023-04-05 20:55:10,812 p=106685 u=root n=ansible | changed: [127.0.0.1] => (item={'src': 'kalite.sh.j2', 'dest': '/usr/bin/kalite', 'mode': '0755'})
2013 2023-04-05 20:55:12,040 p=106685 u=root n=ansible | changed: [127.0.0.1] => (item={'src': 'kalite-serve.service.j2', 'dest': '/etc/systemd/system/kalite-serve.service', 'mode': '0644'})
2014 2023-04-05 20:55:12,098 p=106685 u=root n=ansible | TASK [kalite : Fix KA Lite bug in regex parsing ifconfig output (ifcfg/parser.py) for @m-anish's network names that contain dashes] ***
2015 2023-04-05 20:55:13,189 p=106685 u=root n=ansible | changed: [127.0.0.1]
2016 2023-04-05 20:55:13,242 p=106685 u=root n=ansible | TASK [kalite : Create dir /library/ka-lite] ***************************************************************************************
2017 2023-04-05 20:55:13,945 p=106685 u=root n=ansible | changed: [127.0.0.1]
2018 2023-04-05 20:55:13,997 p=106685 u=root n=ansible | TASK [kalite : Run '/usr/local/kalite/venv/bin/kalite manage setup ...'] **********************************************************
2019 2023-04-05 20:55:37,665 p=106685 u=root n=ansible | changed: [127.0.0.1]
2020 2023-04-05 20:55:37,714 p=106685 u=root n=ansible | TASK [kalite : Set 'kalite_installed: True'] **************************************************************************************
2021 2023-04-05 20:55:37,772 p=106685 u=root n=ansible | ok: [127.0.0.1]
2022 2023-04-05 20:55:37,826 p=106685 u=root n=ansible | TASK [kalite : Add 'kalite_installed: True' to /etc/iiab/iiab_state.yml] **********************************************************
2023 2023-04-05 20:55:38,507 p=106685 u=root n=ansible | changed: [127.0.0.1]
2024 2023-04-05 20:55:38,559 p=106685 u=root n=ansible | TASK [kalite : include_tasks] *****************************************************************************************************
2025 2023-04-05 20:55:38,732 p=106685 u=root n=ansible | included: /opt/iiab/iiab/roles/kalite/tasks/enable-or-disable.yml for 127.0.0.1
2026 2023-04-05 20:55:38,813 p=106685 u=root n=ansible | TASK [kalite : Enable & (Re)Start 'kalite-serve' service, if kalite_enabled] ******************************************************
2027 2023-04-05 20:55:45,509 p=106685 u=root n=ansible | changed: [127.0.0.1]
2028 2023-04-05 20:55:45,568 p=106685 u=root n=ansible | TASK [kalite : Disable & Stop 'kalite-serve' service, if not kalite_enabled] ******************************************************
2029 2023-04-05 20:55:45,630 p=106685 u=root n=ansible | skipping: [127.0.0.1]
2030 2023-04-05 20:55:45,691 p=106685 u=root n=ansible | TASK [kalite : Add 'kalite' variable values to /etc/iiab/iiab.ini] ****************************************************************
2031 2023-04-05 20:55:46,454 p=106685 u=root n=ansible | changed: [127.0.0.1] => (item={'option': 'name', 'value': 'KA Lite'})
2032 2023-04-05 20:55:47,115 p=106685 u=root n=ansible | changed: [127.0.0.1] => (item={'option': 'description', 'value': '"KA Lite downloads Khan Academy videos for offline use, with exercises and accounts if students want to track their own progress."'})
2033 2023-04-05 20:55:47,782 p=106685 u=root n=ansible | changed: [127.0.0.1] => (item={'option': 'kalite_install', 'value': True})
2034 2023-04-05 20:55:48,444 p=106685 u=root n=ansible | changed: [127.0.0.1] => (item={'option': 'kalite_enabled', 'value': True})
2035 2023-04-05 20:55:49,107 p=106685 u=root n=ansible | changed: [127.0.0.1] => (item={'option': 'path', 'value': '/library/ka-lite'})
2036 2023-04-05 20:55:49,805 p=106685 u=root n=ansible | changed: [127.0.0.1] => (item={'option': 'port', 'value': 8008})
2037 2023-04-05 20:55:50,041 p=106685 u=root n=ansible | PLAY RECAP ************************************************************************************************************************
2038 2023-04-05 20:55:50,041 p=106685 u=root n=ansible | 127.0.0.1                  : ok=36   changed=12   unreachable=0    failed=0    skipped=7    rescued=0    ignored=0   
2039 

@jvonau
Copy link
Contributor Author

jvonau commented Apr 6, 2023

jerryv@box:/opt/iiab/iiab $ systemctl status kalite-serve.service 
● kalite-serve.service - Provides the kalite Server
     Loaded: loaded (/etc/systemd/system/kalite-serve.service; enabled; preset: enabled)
     Active: active (running) since Wed 2023-04-05 20:55:45 CDT; 54min ago
    Process: 108337 ExecStart=/usr/local/kalite/venv/bin/kalite start --skip-job-scheduler --port=8008 (code=exited, status=0/SUCC>
   Main PID: 108343 (kalite)
      Tasks: 21 (limit: 3933)
        CPU: 4.061s
     CGroup: /system.slice/kalite-serve.service
             └─108343 /usr/local/kalite/venv/bin/python /usr/local/kalite/venv/bin/kalite start --skip-job-scheduler --port=8008

Apr 05 20:55:44 box systemd[1]: Starting kalite-serve.service - Provides the kalite Server...
Apr 05 20:55:45 box kalite[108337]: Running 'kalite start' as daemon (system service)
Apr 05 20:55:45 box kalite[108337]: Going to daemon mode, logging to /library/ka-lite/server.log
Apr 05 20:55:45 box kalite[108337]: To access KA Lite from another connected computer, try the following address(es):
Apr 05 20:55:45 box kalite[108337]:         http://10.0.0.9:8008/
Apr 05 20:55:45 box kalite[108337]:         http://10.10.10.10:8008/
Apr 05 20:55:45 box kalite[108337]: To access KA Lite from this machine, try the following address:
Apr 05 20:55:45 box kalite[108337]:         http://127.0.0.1:8008/
Apr 05 20:55:45 box systemd[1]: Started kalite-serve.service - Provides the kalite Server.

@holta holta added this to the 8.1 milestone Apr 6, 2023
@jvonau
Copy link
Contributor Author

jvonau commented Apr 6, 2023

grep -r is_debian_ roles
roles/monit/tasks/main.yml:  # be is_debian_10 in vars/raspbian-10.yml for now!) still provides 'monit' via
roles/monit/tasks/main.yml:    #when: monit_installed is undefined and not (is_debian_10 and not is_raspbian)
roles/monit/tasks/main.yml:    #when: monit_installed is undefined and not ((is_debian and not is_raspbian) and (not is_debian_8) and (not is_debian_9))
roles/0-DEPRECATED-ROLES/httpd/tasks/install.yml:#  #when: is_raspbian_9 or is_debian_9 or is_ubuntu_18
roles/0-DEPRECATED-ROLES/httpd/tasks/install.yml:#  when: is_debuntu and (not is_debian_8) and (not is_ubuntu_16)
roles/nodered/templates/nodered.service.j2.unused:# Ansible template HAD: if is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17
roles/kolibri/tasks/install.yml:  when: is_ubuntu and os_ver is version('ubuntu-2204', '>=') or is_linuxmint_21 or is_debian_12
roles/kolibri/tasks/install.yml:  #when: is_ubuntu_2204 or is_ubuntu_2210 or is_debian_12    # MINT 21 COVERED BY is_ubuntu_2204
roles/kolibri/tasks/install.yml:  when: not (is_ubuntu and os_ver is version('ubuntu-2204', '>=') or is_linuxmint_21 or is_debian_12)
roles/kolibri/tasks/install.yml:  #when: not (is_ubuntu_2204 or is_ubuntu_2210 or is_debian_12)
roles/kalite/tasks/install.yml:  when: not (is_debian_12 or is_ubuntu_2304)
roles/kalite/tasks/install.yml:  # 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already.
roles/kalite/tasks/install.yml:  when: is_debian_12 or is_ubuntu_2304
roles/kalite/tasks/install.yml:  #when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19)
roles/kalite/tasks/install.yml:  # long form of (is_debian_11+ or is_ubuntu_20+)
roles/kalite/tasks/install.yml:  #when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19)
roles/kalite/tasks/install.yml:  # 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already.
roles/kalite/tasks/install.yml:#   when: is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19
roles/kalite/tasks/install.yml:#   # 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already.
roles/nodejs/tasks/install.yml:#   when: internet_available and not (is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17)
roles/mongodb/tasks/install.yml:#   when: is_debian_12
roles/mongodb/tasks/install.yml:#   when: is_ubuntu and os_ver is version('ubuntu-2204', '>=') or is_linuxmint_21 or is_debian_12
roles/mongodb/tasks/install.yml:#   when: is_debian_12
roles/mongodb/tasks/main.yml:    # when: mongodb_installed is undefined and not (ansible_architecture == "aarch64" and is_debian_10 and not is_raspbian)
roles/network/tasks/debian.yml:  #when: iiab_wan_iface != "none" and is_debian and not is_debian_8
roles/network/tasks/debian.yml:  #when: wan_ip != "dhcp" and iiab_wan_iface != "none" and is_debian and not is_debian_8
roles/calibre/tasks/debs.yml:  #when: (not is_raspbian) and (is_debian_9 or is_ubuntu_16) and internet_available

not many of the roles are using that one and it looks like the same idea as using could be extended to mongodb kolibri roles

@jvonau
Copy link
Contributor Author

jvonau commented Apr 6, 2023

when: not (is_ubuntu and os_ver is version('ubuntu-2204', '>=') or is_linuxmint_21 or is_debian_12) above could be
when os_ver is version('ubuntu-2204', '>=') or os_ver is version('linuxmint-21', '>=') or os_ver is version('debian_12', '>=')

@holta
Copy link
Member

holta commented Apr 6, 2023

when: os_ver is version('ubuntu-2204', '>=') or os_ver is version('linuxmint-21', '>=') or os_ver is version('debian-12', '>=')

I wish.

But I'm pretty sure above will lead to false positives.

An example is os_ver string linuxmint-20 which is numerically larger than debian-12 when the version comparison... is run against the wrong distro family 😟

@jvonau
Copy link
Contributor Author

jvonau commented Apr 6, 2023

Lets keep it simple and just run with this for now, I know the alternate path works, just needs conformation that normal way still works on RasPiOS-11 and Ubuntu less than 23.04. I'm pretty sure the logic is ok but if you want to test it yourself go ahead.

@jvonau
Copy link
Contributor Author

jvonau commented Apr 6, 2023

Some back story around the ansible equivalent of 'dpkg_arch' #2497 (comment)

@holta
Copy link
Member

holta commented Apr 6, 2023

Simpler for now, yes:

So is_ubuntu_2310 should also be used, as it's need is only a few weeks away (i.e. a few days after the 2023-04-20 release of Ubuntu 23.04) for people testing IIAB with Ubuntu 23.10 pre-releases.

And if in future this Python 2 threshold can be cleanly automated...to be more future proof (in one way or another?) even better.

@jvonau
Copy link
Contributor Author

jvonau commented Apr 6, 2023

Whenever ubuntu-23.10.yml shows up in vars/ the conditional can be revisited.

@holta
Copy link
Member

holta commented Apr 6, 2023

LGTM.

I or someone should test this on Ubuntu 23.04 or Debian 12 before merging.

@jvonau
Copy link
Contributor Author

jvonau commented Apr 6, 2023

I'd like to see a RasPiOS-11 or Ubuntu_22XX install done as constant for the old code path also.

@holta holta changed the title Python2 fix Python2 fix [for KA Lite on Debian 12 or Ubuntu 23.04 / 23.10] Apr 6, 2023
@jvonau
Copy link
Contributor Author

jvonau commented Apr 6, 2023

U-2204 http://sprunge.us/msHXY8?en tested with sudo rm -rf /usr/local/kalite sudo ./runrole --reinstall kalite

1148 2023-04-06 08:03:58,787 p=40313 u=root n=ansible | TASK [kalite : Install packages: python2, python-setuptools, virtualenv (for Python 2)] ***
1149 2023-04-06 08:03:59,284 p=40313 u=root n=ansible | ok: [127.0.0.1]
1150 2023-04-06 08:03:59,291 p=40313 u=root n=ansible | TASK [kalite : Use scripts/install_python2.sh to install python2 and virtualenv] ***
1151 2023-04-06 08:03:59,301 p=40313 u=root n=ansible | skipping: [127.0.0.1]
1152 2023-04-06 08:03:59,309 p=40313 u=root n=ansible | TASK [kalite : Use pip to pin setuptools to 44 in /usr/local/kalite/venv] ******
1153 2023-04-06 08:04:03,120 p=40313 u=root n=ansible | changed: [127.0.0.1]
1154 2023-04-06 08:04:03,127 p=40313 u=root n=ansible | TASK [kalite : Use pip to install ka-lite-static to /usr/local/kalite/venv] ****
1155 2023-04-06 08:04:19,414 p=40313 u=root n=ansible | changed: [127.0.0.1]

@holta
Copy link
Member

holta commented Apr 6, 2023

Install on Ubuntu 23.04 failed:

TASK [kalite : Use pip to pin setuptools to 44 in /usr/local/kalite/venv] ******
fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": ["/usr/bin/virtualenv", "-ppython2.7", "/usr/local/kalite/venv"], "msg": "std out: RuntimeError: failed to find interpreter for Builtin discover of python_spec='python2.7'\n"}

iiab-diagnostics:

http://sprunge.us/ZCDdwi?en

@jvonau
Copy link
Contributor Author

jvonau commented Apr 6, 2023

https://packages.debian.org/bullseye/libpython2.7-stdlib

ubuntu@test-2304-220227:/opt/iiab/iiab$ apt list        libffi7
Listing... Done
ubuntu@test-2304-220227:/opt/iiab/iiab$ apt list        libffi*
Listing... Done
libffi-c-perl/lunar 0.15-2 all
libffi-checklib-perl/lunar 0.31-1 all
libffi-dev/lunar 3.4.4-1 amd64
libffi-platypus-perl/lunar 2.05-1 amd64
libffi-platypus-type-enum-perl/lunar 0.06-2 all
libffi8/lunar,now 3.4.4-1 amd64 [installed,automatic]
libffindex0-dev/lunar 0.9.9.9-6 amd64
libffindex0/lunar 0.9.9.9-6 amd64

ubuntu@test-2304-220227:/opt/iiab/iiab$ apt list libssl1.1
Listing... Done
ubuntu@test-2304-220227:/opt/iiab/iiab$ apt list libssl*
Listing... Done
libssl-dev/lunar 3.0.8-1ubuntu1 amd64
libssl-doc/lunar 3.0.8-1ubuntu1 all
libssl-ocaml-dev/lunar 0.5.13-1 amd64
libssl-ocaml/lunar 0.5.13-1 amd64
libssl-utils-clojure/lunar 3.5.0-2 all
libssl3/lunar,now 3.0.8-1ubuntu1 amd64 [installed,automatic]

ubuntu@test-2304-220227:/opt/iiab/iiab$ apt list mime-support
Listing... Done
mime-support/lunar 3.66 all

@jvonau
Copy link
Contributor Author

jvonau commented Apr 6, 2023

The following packages have unmet dependencies:
 libpython2.7-stdlib : Depends: libssl1.1 (>= 1.1.1) but it is not installable
                       Depends: libffi7 (>= 3.3~20180313) but it is not installable

I'll come back to this later have to step out for a bit.

@jvonau
Copy link
Contributor Author

jvonau commented Apr 6, 2023

http://sprunge.us/KicFRk?en Ubuntu-23.04 VM

2023-04-06 17:17:53,840 p=36399 u=root n=ansible | TASK [kalite : Install packages: python2, python-setuptools, virtualenv (for Python 2)] ***
2023-04-06 17:17:53,856 p=36399 u=root n=ansible | skipping: [127.0.0.1]
2023-04-06 17:17:53,866 p=36399 u=root n=ansible | TASK [kalite : Use scripts/install_python2.sh to install python2 and virtualenv] ***
2023-04-06 17:17:59,861 p=36399 u=root n=ansible | changed: [127.0.0.1]
2023-04-06 17:17:59,869 p=36399 u=root n=ansible | TASK [kalite : Use pip to pin setuptools to 44 in /usr/local/kalite/venv] ******
2023-04-06 17:18:02,292 p=36399 u=root n=ansible | changed: [127.0.0.1]
2023-04-06 17:18:02,299 p=36399 u=root n=ansible | TASK [kalite : Use pip to install ka-lite-static to /usr/local/kalite/venv] ****
2023-04-06 17:18:17,248 p=36399 u=root n=ansible | changed: [127.0.0.1]
buntu@test-2304-220227:/opt/iiab/iiab$ systemctl status kalite-serve.service 
● kalite-serve.service - Provides the kalite Server
     Loaded: loaded (/etc/systemd/system/kalite-serve.service; enabled; preset: enabled)
     Active: active (running) since Thu 2023-04-06 17:18:29 CDT; 7min ago
    Process: 38060 ExecStart=/usr/local/kalite/venv/bin/kalite start --skip-job-scheduler --port=8008 (code=exited, status=0/SUCCESS)
   Main PID: 38066 (kalite)
      Tasks: 21 (limit: 9467)
     Memory: 40.0M
        CPU: 963ms
     CGroup: /system.slice/kalite-serve.service
             └─38066 /usr/local/kalite/venv/bin/python /usr/local/kalite/venv/bin/kalite start --skip-job-scheduler --port=8008

Apr 06 17:18:29 box systemd[1]: Starting kalite-serve.service - Provides the kalite Server...
Apr 06 17:18:29 box kalite[38060]: Running 'kalite start' as daemon (system service)
Apr 06 17:18:29 box kalite[38060]: Going to daemon mode, logging to /library/ka-lite/server.log
Apr 06 17:18:29 box kalite[38060]: To access KA Lite from another connected computer, try the following address(es):
Apr 06 17:18:29 box kalite[38060]:         http://192.168.122.165:8008/
Apr 06 17:18:29 box kalite[38060]: To access KA Lite from this machine, try the following address:
Apr 06 17:18:29 box kalite[38060]:         http://127.0.0.1:8008/
Apr 06 17:18:29 box systemd[1]: Started kalite-serve.service - Provides the kalite Server.

Think all you would need is a git pull and continue

@holta
Copy link
Member

holta commented Apr 7, 2023

Think all you would need is a git pull and continue

Seems to have failed again:

2023-04-06 18:36:27,548 p=28867 u=root n=ansible | fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": ["/usr/bin/virtualenv", "-ppython2.7", "/usr/local/kalite/venv"], "msg": "stdout: RuntimeError: failed to find interpreter for Builtin discover of python_spec='python2.7'\n"}

iiab-diagnostics:

http://sprunge.us/84lLPF?en

@jvonau
Copy link
Contributor Author

jvonau commented Apr 7, 2023

Can you grab the last bit of /var/log/apt/history.log and could run the file by hand and note anything that looks suspect
I can repeat the install cleanly with or without rm /usr/local/kalite and then runrole --reinstall

@jvonau
Copy link
Contributor Author

jvonau commented Apr 7, 2023

ubuntu@test-2304-220227:/opt/iiab/iiab$ apt list *python* | grep installed

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libpython2.7-minimal/now 2.7.18-13ubuntu2 amd64 [installed,local]
libpython2.7-stdlib/now 2.7.18-13ubuntu2 amd64 [installed,local]
libpython3-dev/lunar,now 3.11.2-1 amd64 [installed,automatic]
libpython3-stdlib/lunar,now 3.11.2-1 amd64 [installed,automatic]
libpython3.11-dev/lunar,now 3.11.2-6 amd64 [installed,automatic]
libpython3.11-minimal/lunar,now 3.11.2-6 amd64 [installed,automatic]
libpython3.11-stdlib/lunar,now 3.11.2-6 amd64 [installed,automatic]
libpython3.11/lunar,now 3.11.2-6 amd64 [installed,automatic]
python-apt-common/lunar,now 2.5.3 all [installed,automatic]
python-babel-localedata/lunar,now 2.10.3-1 all [installed]
python2.7-minimal/now 2.7.18-13ubuntu2 amd64 [installed,local]
python2.7/now 2.7.18-13ubuntu2 amd64 [installed,local]
python3-apport/lunar,now 2.26.0-0ubuntu2 all [installed,automatic]
python3-apt/lunar,now 2.5.3 amd64 [installed,automatic]
python3-attr/lunar,now 22.2.0-1 all [installed,automatic]
python3-automat/lunar,now 22.10.0-1 all [installed,automatic]
python3-babel/lunar,now 2.10.3-1 all [installed]
python3-bcrypt/lunar,now 3.2.2-1 amd64 [installed,automatic]
python3-blinker/lunar,now 1.5-1 all [installed,automatic]
python3-bs4/lunar,now 4.11.2-2 all [installed]
python3-certifi/lunar,now 2022.9.24-1 all [installed,automatic]
python3-cffi-backend/lunar,now 1.15.1-5build1 amd64 [installed,automatic]
python3-chardet/lunar,now 5.1.0+dfsg-2 all [installed,automatic]
python3-click/lunar,now 8.1.3-2 all [installed,automatic]
python3-colorama/lunar,now 0.4.6-2 all [installed,automatic]
python3-commandnotfound/lunar,now 23.04.0 all [installed,automatic]
python3-configobj/lunar,now 5.0.8-1 all [installed,automatic]
python3-constantly/lunar,now 15.1.0-4 all [installed,automatic]
python3-cracklib/lunar,now 2.9.6-5build1 amd64 [installed]
python3-cryptography/lunar,now 38.0.4-2 amd64 [installed,automatic]
python3-dbus/lunar,now 1.3.2-4build1 amd64 [installed,automatic]
python3-debconf/lunar,now 1.5.82 all [installed,automatic]
python3-debian/lunar,now 0.1.49ubuntu2 all [installed,automatic]
python3-dev/lunar,now 3.11.2-1 amd64 [installed,automatic]
python3-distlib/lunar,now 0.3.6-1 all [installed,automatic]
python3-distro-info/lunar,now 1.5 all [installed,automatic]
python3-distro/lunar,now 1.8.0-1 all [installed,automatic]
python3-distupgrade/lunar,now 1:23.04.3 all [installed,automatic]
python3-distutils/lunar,now 3.11.2-2 all [installed]
python3-filelock/lunar,now 3.9.0-1 all [installed,automatic]
python3-gdbm/lunar,now 3.11.2-2 amd64 [installed,automatic]
python3-gi/lunar,now 3.44.1-1 amd64 [installed,automatic]
python3-hamcrest/lunar,now 2.0.3-2 all [installed,automatic]
python3-html5lib/lunar,now 1.1-3 all [installed,automatic]
python3-httplib2/lunar,now 0.20.4-3 all [installed,automatic]
python3-hyperlink/lunar,now 21.0.0-5 all [installed,automatic]
python3-idna/lunar,now 3.3-1 all [installed,automatic]
python3-importlib-metadata/lunar,now 4.12.0-1 all [installed,automatic]
python3-incremental/lunar,now 21.3.0-2 all [installed,automatic]
python3-jaraco.classes/lunar,now 3.2.1-3 all [installed,automatic]
python3-jeepney/lunar,now 0.8.0-3 all [installed,automatic]
python3-jinja2/lunar,now 3.1.2-1 all [installed]
python3-json-pointer/lunar,now 2.0-0ubuntu1 all [installed]
python3-jsonpatch/lunar,now 1.32-2 all [installed]
python3-jsonschema/lunar,now 4.6.0-3ubuntu1 all [installed]
python3-jwt/lunar,now 2.6.0-1 all [installed,automatic]
python3-keyring/lunar,now 23.9.3-2 all [installed,automatic]
python3-launchpadlib/lunar,now 1.11.0-1 all [installed,automatic]
python3-lazr.restfulclient/lunar,now 0.14.5-1 all [installed,automatic]
python3-lazr.uri/lunar,now 1.0.6-3 all [installed,automatic]
python3-lib2to3/lunar,now 3.11.2-2 all [installed]
python3-lxml/lunar,now 4.9.2-1build1 amd64 [installed]
python3-magic/lunar,now 2:0.4.26-3 all [installed,auto-removable]
python3-markdown-it/lunar,now 2.1.0-4ubuntu1 all [installed,automatic]
python3-markupsafe/lunar,now 2.1.2-1build1 amd64 [installed]
python3-mdurl/lunar,now 0.1.2-1 all [installed,automatic]
python3-minimal/lunar,now 3.11.2-1 amd64 [installed,automatic]
python3-more-itertools/lunar,now 8.10.0-2 all [installed,automatic]
python3-nacl/lunar,now 1.5.0-2 amd64 [installed]
python3-netifaces/lunar,now 0.11.0-2build1 amd64 [installed,automatic]
python3-newt/lunar,now 0.52.23-1ubuntu1 amd64 [installed,automatic]
python3-oauthlib/lunar,now 3.2.2-1 all [installed,automatic]
python3-openssl/lunar,now 23.0.0-1 all [installed,automatic]
python3-pexpect/lunar,now 4.8.0-4ubuntu1 all [installed,automatic]
python3-pip-whl/lunar,now 23.0.1+dfsg-1 all [installed,automatic]
python3-pkg-resources/lunar,now 66.1.1-1 all [installed,automatic]
python3-platformdirs/lunar,now 3.0.0-1 all [installed,automatic]
python3-problem-report/lunar,now 2.26.0-0ubuntu2 all [installed,automatic]
python3-ptyprocess/lunar,now 0.7.0-5 all [installed,automatic]
python3-py/lunar,now 1.11.0-1 all [installed,automatic]
python3-pyasn1-modules/lunar,now 0.2.8-1 all [installed,automatic]
python3-pyasn1/lunar,now 0.4.8-3 all [installed,automatic]
python3-pygments/lunar,now 2.14.0+dfsg-1 all [installed,automatic]
python3-pymysql/lunar,now 1.0.2-1ubuntu1 all [installed]
python3-pyparsing/lunar,now 3.0.9-1 all [installed,automatic]
python3-pyrsistent/lunar,now 0.18.1-1build3 amd64 [installed]
python3-requests/lunar,now 2.28.1+dfsg-1ubuntu1 all [installed]
python3-rich/lunar,now 13.3.1-1 all [installed,automatic]
python3-secretstorage/lunar,now 3.3.3-1ubuntu1 all [installed,automatic]
python3-serial/lunar,now 3.5-1.1 all [installed]
python3-service-identity/lunar,now 18.1.0-8 all [installed,automatic]
python3-setuptools-whl/lunar,now 66.1.1-1 all [installed,automatic]
python3-setuptools/lunar,now 66.1.1-1 all [installed]
python3-six/lunar,now 1.16.0-4 all [installed,automatic]
python3-software-properties/lunar,now 0.99.35 all [installed,automatic]
python3-soupsieve/lunar,now 2.4-1 all [installed,automatic]
python3-systemd/lunar,now 235-1build2 amd64 [installed]
python3-twisted/lunar,now 22.4.0-4 all [installed,automatic]
python3-tz/lunar,now 2022.7.1-3 all [installed]
python3-update-manager/lunar,now 1:23.04.1 all [installed,automatic]
python3-urllib3/lunar,now 1.26.12-1 all [installed,automatic]
python3-venv/lunar,now 3.11.2-1 amd64 [installed]
python3-virtualenv/lunar,now 20.19.0+ds-1 all [installed,automatic]
python3-wadllib/lunar,now 1.3.6-4 all [installed,automatic]
python3-webencodings/lunar,now 0.5.1-5 all [installed,automatic]
python3-wheel-whl/lunar,now 0.38.4-1 all [installed,automatic]
python3-yaml/lunar,now 6.0-3build1 amd64 [installed]
python3-zipp/lunar,now 1.0.0-6 all [installed,automatic]
python3-zmq/lunar,now 24.0.1-4build1 amd64 [installed]
python3-zope.interface/lunar,now 5.5.2-1build1 amd64 [installed,automatic]
python3.11-dev/lunar,now 3.11.2-6 amd64 [installed,automatic]
python3.11-minimal/lunar,now 3.11.2-6 amd64 [installed,automatic]
python3.11-venv/lunar,now 3.11.2-6 amd64 [installed,automatic]
python3.11/lunar,now 3.11.2-6 amd64 [installed,automatic]
python3/lunar,now 3.11.2-1 amd64 [installed,automatic]
uwsgi-plugin-python3/lunar,now 2.0.21-4build1 amd64 [installed]

@holta
Copy link
Member

holta commented Apr 7, 2023

Can you grab the last bit of /var/log/apt/history.log

# pastebinit -b sprunge.us /var/log/apt/history.log

http://sprunge.us/byeiEv

@jvonau
Copy link
Contributor Author

jvonau commented Apr 7, 2023

The output apt list *python* | grep installed as above would be helpful. Hum, I installed 'none' completely and circled back to install kalite, think one of the packages that were installed after kalite could appear to hold the key. I'll bet on python3-py dragging in python3-pkg-resources Could you Toggle kalite_* to False, complete the whole install including admin-console. Use the admin-console to enable/kalite or use runrole to install kalite after setting kalite_* to True of course.

The last 3 commits were written on the VM. The other thing to note is the change from 2.7.18-8 to 2.7.18-13ubuntu2 my first install stopped with the noted error above then was switched over to the later version in af7a646 but completed anyway http://sprunge.us/Vlzvd7

@holta
Copy link
Member

holta commented Apr 7, 2023

The output apt list *python* | grep installed as above would be helpful

root@box:~# apt list *python* | grep installed | pastebinit -b sprunge.us

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

http://sprunge.us/5ZvF8h

@holta
Copy link
Member

holta commented Apr 7, 2023

Could you Toggle kalite_* to False, complete the whole install including admin-console. Use the admin-console to enable/kalite or use runrole to install kalite after setting kalite_* to True of course.

I did the above. No dice, in the end:

TASK [kalite : Use pip to pin setuptools to 44 in /usr/local/kalite/venv] *******************************************************************************************************************************************************************
fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": ["/usr/bin/virtualenv", "-ppython2.7", "/usr/local/kalite/venv"], "msg": "stdout: RuntimeError: failed to find interpreter for Builtin discover of python_spec='python2.7'\n"}

Latest iiab-diagnostics, in case this helps:

http://sprunge.us/yMppmq?en

@jvonau
Copy link
Contributor Author

jvonau commented Apr 7, 2023

http://sprunge.us/N32W2U can't reproduce on a new VM apt history

libpython2.7-minimal/now 2.7.18-8 amd64 [installed,local]

Think that is the source of your current issue with the past install try, on this machine can you try
sudo apt -y remove *python2*
sudo /opt/iiab/iiab/scripts/install_python2.sh > ~/py2.log

Please post this log if the rest below fails

sudo rm -rf /usr/local/kalite
sudo ./runrole kalite

@holta
Copy link
Member

holta commented Apr 7, 2023

sudo apt -y remove *python2*

Done.

sudo /opt/iiab/iiab/scripts/install_python2.sh > ~/py2.log

Before install_python2.sh:

root@box:~# apt list *python2*
Listing... Done
libpython2.7-minimal/now 2.7.18-8 amd64 [residual-config]
python2.7-minimal/now 2.7.18-8 amd64 [residual-config]

After install_python2.sh:

root@box:~# apt list *python2*
Listing... Done
libpython2.7-minimal/now 2.7.18-13ubuntu2 amd64 [installed,local]
libpython2.7-stdlib/now 2.7.18-13ubuntu2 amd64 [installed,local]
python2.7-minimal/now 2.7.18-13ubuntu2 amd64 [installed,local]
python2.7/now 2.7.18-13ubuntu2 amd64 [installed,local]

Dir /usr/local/kalite never existed, so no need to delete it.

Finally, ./runrole kalite worked.

@holta
Copy link
Member

holta commented Apr 8, 2023

I or someone should test this on a Debian 12 VM in coming days.

(If that works out, good enough to merge?)

@holta
Copy link
Member

holta commented Apr 8, 2023

ASIDE/FYI: while both pre-release OS's are rather "frozen" preparing for release — Ubuntu 23.04 and Debian 12 have each made a few different choices along the way:

  • Ubuntu 23.04 has a newer kernel (6.2 instead of 6.1)
  • Debian 12 has newer PHP (8.2 instead of 8.1)
  • ETC

@holta
Copy link
Member

holta commented Apr 8, 2023

FYI curl iiab.io/fast.txt | bash -s 3527 ran successfully on a Debian 12 Bookworm VM:

http://sprunge.us/UPkfbH?en

@holta
Copy link
Member

holta commented Apr 8, 2023

FWIW on the above Debian 12 VM where IIAB was installed with this PR:

# apt list *python2*
Listing... Done
libpython2.7-minimal/now 2.7.18-13ubuntu2 amd64 [installed,local]
libpython2.7-stdlib/now 2.7.18-13ubuntu2 amd64 [installed,local]
python2.7-minimal/now 2.7.18-13ubuntu2 amd64 [installed,local]
python2.7/now 2.7.18-13ubuntu2 amd64 [installed,local]

@jvonau
Copy link
Contributor Author

jvonau commented Apr 8, 2023

Reconfirmed arm64 works http://sprunge.us/h6gXzK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants