italia / Satosa-Saml2Spid

SATOSA SAML-to-SAML proxy with Spid compliances
Apache License 2.0
42 stars 25 forks source link

Incompatibilità python alpine3.16 #75

Closed MurruAlessio closed 1 year ago

MurruAlessio commented 1 year ago

Ci siamo accorti che l'immagine docker con l'update v1.0.1-1, che introduce la versione di alpine 3.16, rompe la compatibilità con python 3.8 in quanto la versione correntemente installata è la 3.10.

come riprodurre:

* Starting uWSGI 2.0.21 (64bit) on [Tue Jul 25 16:21:30 2023] *
compiled with version: 11.2.1 20220219 on 20 July 2023 14:47:18
os: Linux-5.19.0-46-generic [#47](tg://search_hashtag?hashtag=47)~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 15:35:31 UTC 2
nodename: 9dc0569bf802
machine: x86_64
clock source: unix
detected number of CPU cores: 3
current working directory: /satosa_proxy
detected binary path: /usr/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
* WARNING: you are running uWSGI without its master process manager *
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address [0.0.0.0:10000](https://0.0.0.0:10000/) fd 3
Python version: 3.10.12 (main, Jun  9 2023, 02:30:25) [GCC 11.2.1 20220219]
Python main interpreter initialized at 0x7f4645452960
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 562880 bytes (549 KB) for 8 cores
* Operational MODE: preforking+threaded *
failed to open python file /usr/lib/python3.8/site-packages/satosa/[wsgi.py](https://wsgi.py/)
unable to load app 0 (mountpoint='') (callable not found or import error)
* no app loaded. going in full dynamic mode *
* uWSGI is running in multiple interpreter mode *
spawned uWSGI worker 1 (pid: 182, cores: 2)
spawned uWSGI worker 2 (pid: 183, cores: 2)
spawned uWSGI worker 3 (pid: 184, cores: 2)
spawned uWSGI worker 4 (pid: 185, cores: 2)
peppelinux commented 1 year ago

Il problema è nella directory example con la quale si deriva la configurazione, esattamente in questa riga https://github.com/italia/Satosa-Saml2Spid/blob/master/example/run.sh#L178

dove viene chiamato py38 nelal dockerimage qui https://github.com/italia/Satosa-Saml2Spid/blob/master/Dockerfile#L43

La soluzione è quella di modificare il run così da prendere automaticamente la versione corrente di python, come da readme qui: https://github.com/italia/Satosa-Saml2Spid/blob/master/README.md#start-the-proxy

@MurruAlessio puoi fare PR con la soluzione per questa issue? taggherò 1.0.1-2 asap

MurruAlessio commented 1 year ago

Ciao @peppelinux ho testato la modifica ed creato la PR

peppelinux commented 1 year ago

thank you,

Resolved by https://github.com/italia/Satosa-Saml2Spid/actions/runs/5667617561/job/15356680048