Bug #53476
openvstart fails with dashboard with Python 3.10
0%
Description
Ceph builds with no issue (after the py3.10 PR merged, "cmake: check for python(\d)\.(\d+) when building boost").
Then, running vstart normally this happens:
$ RGW=1 ../src/vstart.sh -n
..........................
out/cluster.mon.a.log:2021-11-23T23:50:00.000367-0600 mon.a (mon.0) 41 : cluster [ERR] [WRN] MGR_MODULE_DEPENDENCY: Module 'dashboard' has failed dependency: super(): class cell not found
The traceback is this:
2021-11-23T23:44:42.091-0600 7f105ed9ecc0 -1 mgr[py] Module not found: 'dashboard'
2021-11-23T23:44:42.091-0600 7f105ed9ecc0 -1 mgr[py] Traceback (most recent call last):
File "/home/zaitcev/ceph/ceph-srbac/src/pybind/mgr/dashboard/__init__.py", line 52, in <module>
from .module import Module, StandbyModule # noqa: F401
File "/home/zaitcev/ceph/ceph-srbac/src/pybind/mgr/dashboard/module.py", line 28, in <module>
from .controllers import Router, json_error_page
File "/home/zaitcev/ceph/ceph-srbac/src/pybind/mgr/dashboard/controllers/__init__.py", line 9, in <module>
from ._rest_controller import RESTController
File "/home/zaitcev/ceph/ceph-srbac/src/pybind/mgr/dashboard/controllers/_rest_controller.py", line 16, in <module>
class RESTController(BaseController, skip_registry=True):
File "/home/zaitcev/ceph/ceph-srbac/src/pybind/mgr/dashboard/controllers/_base_controller.py", line 28, in init_subclass
super().__init_subclass__(**kwargs) # type: ignore
RuntimeError: super(): class cell not found
2021-11-23T23:44:42.092-0600 7f105ed9ecc0 -1 mgr[py] Class not found in module 'dashboard'
2021-11-23T23:44:42.092-0600 7f105ed9ecc0 -1 mgr[py] Error loading module 'dashboard': (2) No such file or directory
So, perhaps dashboard is just not built in all-default build? But it looks there:
[zaitcev@lembas build]$ ls ./src/pybind/mgr/dashboard/frontend/
CMakeFiles CTestTestfile.cmake node-env
cmake_install.cmake dist package.json
[zaitcev@lembas build]$
Running "RGW=1 ../src/vstart.sh -n --without-dashboard" succeeds.
This is with the master branch. Not sure what release we're at currently.
Updated by Pete Zaitcev over 2 years ago
I meant to write "running vstart hangs forever, with ``waiting for mgr dashboard module to start'', and then logs contain (the following)".
Updated by Ernesto Puerta over 2 years ago
- Category set to General - Back-end
- Status changed from New to Triaged
- Assignee set to Pere Díaz Bou
As per CPython docs and this:
CPython implementation detail: In CPython 3.6 and later, the
__class__
cell is passed to the metaclass as a__classcell__
entry in the class namespace. If present, this must be propagated up to thetype.__new__
call in order for the class to be initialised correctly. Failing to do so will result in a RuntimeError in Python 3.8.
BTW, someone else has reported an issue with Python 3.10, but the error appeared in a different place.
I tried to reproduce the issue with a simplistic sample (class with init_subclass and super() inside, and another class inheriting from it), and no issues.
That said, we haven't tested Python builds on anything beyond 3.9 I think, so I'd say this is low-prio so far. In any case, I assigned this to @Pere, so if you want to have a look at this and try to build locally your own Python 3.10 Ceph, all yours.
Updated by Kaleb KEITHLEY over 2 years ago
see https://bugzilla.redhat.com/show_bug.cgi?id=2035676
This is a problem with 16.2.7 too, on Fedora 35 and 36/rawhide, where python is python3.10. Fedora 35 is GA as of 2 Nov., 2021.
Developers may not not have updated to F35 yet, but it's out there being used, so take this as an early warning.
(And because F35 is GA it's more than a Severity 3 bug IMO.)