Project

General

Profile

Actions

Bug #57229

closed

pacific: ImportError: cannot import name 'sysconfig' from 'distutils'

Added by Laura Flores over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Affects make check on Pacific PRs.

ImportError: cannot import name 'sysconfig' from 'distutils'

CMake Error at cmake/modules/Distutils.cmake:81 (message):
  Unable to tell python extension's suffix: Traceback (most recent call
  last):

    File "<string>", line 1, in <module>

  ImportError: cannot import name 'sysconfig' from 'distutils'
  (/usr/lib/python3.8/distutils/__init__.py)

Call Stack (most recent call first):
  src/pybind/rados/CMakeLists.txt:1 (distutils_add_cython_module)


Related issues 1 (0 open1 closed)

Has duplicate Dashboard - Bug #57220: pacific: mgr/dashboard: cherrypy_backports: ValueError: invalid version number '8.5.2+ds1'DuplicateTim Serong

Actions
Actions #2

Updated by Laura Flores over 1 year ago

Laura Flores wrote:

Affects make check on Pacific PRs.

ImportError: cannot import name 'sysconfig' from 'distutils'
[...]

Forgot to link the example here: https://jenkins.ceph.com/job/ceph-pull-requests/102059/

So far, both examples involve braggi15.

Actions #4

Updated by Laura Flores over 1 year ago

Thinking this is related to Jammy Jellyfish.

Actions #7

Updated by Laura Flores over 1 year ago

  • Status changed from New to Duplicate
  • Pull request ID set to 57230
Actions #8

Updated by Laura Flores over 1 year ago

  • Pull request ID deleted (57230)
Actions #9

Updated by Laura Flores over 1 year ago

  • Is duplicate of Bug #57230: pacific: Could NOT find Python3 added
Actions #10

Updated by Laura Flores over 1 year ago

  • Status changed from Duplicate to New
Actions #11

Updated by Laura Flores over 1 year ago

  • Is duplicate of deleted (Bug #57230: pacific: Could NOT find Python3)
Actions #12

Updated by Laura Flores over 1 year ago

Turns out, this is not a dupe of #57230. The issue with this failure is the same in that affected nodes are Ubuntu 22.04, which require Python 3.10.

But for this failure, cmake is successfully finding Python 3.8:

Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter Development 

And then later experiencing a problem with python-distutils since it's using 3.8.

We somehow need to further enforce the use of Python 3.10 on Ubuntu 22.04.

Actions #13

Updated by Laura Flores over 1 year ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 47696
Actions #14

Updated by Tim Serong over 1 year ago

Other Pacific build errors found while working on this:

Item 1 (build failure):

/usr/include/fmt/core.h:1728:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt

This is fixed in main by https://github.com/ceph/ceph/commit/bb9d099ede8b9df36dba735a95bc1600fdd11408, but backporting that to Pacific looks complicated, and in any case doesn't make sense because Crimson is still under active development. Better to just turn off WITH_SEASTAR for Pacific builds.

Item 2 (build failure):

CMake Error at src/pybind/CMakeLists.txt:74 (message):
  Python and Ceph link to different OpenSSL versions: 1.1.1

   vs 3.0.2

Seems to only occur when building on python 3.8 workers. Uncertain of fix, but maybe https://github.com/ceph/ceph/pull/47741 will help?

Item 3 (build failure):

ImportError: cannot import name 'Sequence' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

This is fixed by backporting https://github.com/ceph/ceph/pull/47696/commits/aef8f5c0be3bb0d00d663f96595d2038452467fa and https://github.com/ceph/ceph/pull/47696/commits/afd724b8f7a0a6c77e88435230e51d0947e82dc6

Item 4 (can't load dashboard mgr module):

2022-08-22T05:52:31.271+0000 7fe6fca7b500 -1 mgr[py] Module not found: 'dashboard'
2022-08-22T05:52:31.271+0000 7fe6fca7b500 -1 mgr[py] Traceback (most recent call last):
  File "/home/jenkins-build/build/workspace/ceph-api/src/pybind/mgr/dashboard/__init__.py", line 61, in <module>
    from .module import Module, StandbyModule  # noqa: F401
  File "/home/jenkins-build/build/workspace/ceph-api/src/pybind/mgr/dashboard/module.py", line 51, in <module>
    patch_cherrypy(cherrypy.__version__)
  File "/home/jenkins-build/build/workspace/ceph-api/src/pybind/mgr/dashboard/cherrypy_backports.py", line 197, in patch_cherrypy
    accept_socket_error_0(v)
  File "/home/jenkins-build/build/workspace/ceph-api/src/pybind/mgr/dashboard/cherrypy_backports.py", line 124, in accept_socket_error_0
    if v < StrictVersion("9.0.0") or cheroot_version < StrictVersion("6.5.5"):
  File "/usr/lib/python3.10/distutils/version.py", line 64, in __gt__
    c = self._cmp(other)
  File "/usr/lib/python3.10/distutils/version.py", line 168, in _cmp
    other = StrictVersion(other)
  File "/usr/lib/python3.10/distutils/version.py", line 40, in __init__
    self.parse(vstring)
  File "/usr/lib/python3.10/distutils/version.py", line 137, in parse
    raise ValueError("invalid version number '%s'" % vstring)
ValueError: invalid version number '8.5.2+ds1'

2022-08-22T05:52:31.271+0000 7fe6fca7b500 -1 mgr[py] Class not found in module 'dashboard'
2022-08-22T05:52:31.271+0000 7fe6fca7b500 -1 mgr[py] Error loading module 'dashboard': (2) No such file or directory

This is fixed by backporting https://github.com/ceph/ceph/pull/47500

Item 5 (problems running dashboard in mgr logs):

PY_SSIZE_T_CLEAN macro must be defined for '#' formats

Fixed by backporting https://github.com/tchaikov/ceph/commit/389054888f2aa782f73564125ec7a1ef0212d536

Actions #15

Updated by Ernesto Puerta over 1 year ago

  • Translation missing: en.field_tag_list set to test-failure
Actions #16

Updated by Laura Flores over 1 year ago

  • Pull request ID changed from 47696 to 47803
Actions #17

Updated by Kefu Chai over 1 year ago

  • Status changed from Fix Under Review to Resolved
Actions #18

Updated by Ernesto Puerta about 1 year ago

  • Has duplicate Bug #57220: pacific: mgr/dashboard: cherrypy_backports: ValueError: invalid version number '8.5.2+ds1' added
Actions

Also available in: Atom PDF