Python 3.10 in core22-base snap on bionic fails importing ssl module
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Alberto Donato | ||
snapd |
Fix Released
|
High
|
Unassigned |
Bug Description
I have a maas installed/running on an Ubuntu 18.04 host with snap 3.2.6-12016-
I would like to try the 3.3 beta and I did a "snap refresh --channel=3.3/beta maas".
The output follows:
2022-11-
error: cannot perform the following tasks:
- Run post-refresh hook of "maas" snap if present (run hook "post-refresh":
-----
Traceback (most recent call last):
File "/snap/
from maascli import main
File "/snap/
from maascli.parser import get_deepest_
File "/snap/
from maascli import api
File "/snap/
import httplib2
File "/snap/
import ssl
File "/usr/lib/
import _ssl # if we can't import it, let the error propagate
ImportError: /usr/lib/
ect
-----)
I was not able to understand why it's happening. the _ssl.cpython-
As a test I also tried a snap try maas_24685.snap, but the error is the same.
Note that installing a fresh/unconfigured maas 3.2.6 and then refreshing to 3.3 it does not happen...
summary: |
- Errors during snap refresh from 3.2.6 to 3.3 beta + Python in core22-base snap on bionic fails importing ssl module |
summary: |
- Python in core22-base snap on bionic fails importing ssl module + Python 3.10 in core22-base snap on bionic fails importing ssl module |
Changed in snapd: | |
status: | In Progress → Fix Released |
Changed in maas: | |
status: | Triaged → Fix Released |
milestone: | none → 3.3.0-rc2 |
I can confirm that update doesn't work on bionic, but it worked with focal and jammy.
MAAS installed from 3.2/stable inside LXC container running ubuntu:bionic
root@cosmic- crayfish: ~# snap install maas g.19812b4da from Canonical✓ installed
Download snap "maas" (23947) from channel "3.2/stable"
maas (3.2/stable) 3.2.6-12016-
root@cosmic- crayfish: ~# snap refresh --channel=3.3/beta maas maas/24685/ bin/maas" , line 5, in <module> maas/24685/ lib/python3. 10/site- packages/ maascli/ __init_ _.py", line 10, in <module> subparser, prepare_parser maas/24685/ lib/python3. 10/site- packages/ maascli/ parser. py", line 11, in <module> maas/24685/ lib/python3. 10/site- packages/ maascli/ api.py" , line 19, in <module> maas/24685/ usr/lib/ python3/ dist-packages/ httplib2/ __init_ _.py", line 40, in <module> python3. 10/ssl. py", line 98, in <module> python3. 10/lib- dynload/ _ssl.cpython- 310-x86_ 64-linux- gnu.so: failed to map segment from shared object
error: cannot perform the following tasks:
- Run post-refresh hook of "maas" snap if present (run hook "post-refresh":
-----
Traceback (most recent call last):
File "/snap/
from maascli import main
File "/snap/
from maascli.parser import get_deepest_
File "/snap/
from maascli import api
File "/snap/
import httplib2
File "/snap/
import ssl
File "/usr/lib/
import _ssl # if we can't import it, let the error propagate
ImportError: /usr/lib/
-----)