mgr: add config to load modules in main interpreter instead of subinterpreter#66176
mgr: add config to load modules in main interpreter instead of subinterpreter#66176
Conversation
Signed-off-by: Samuel Just <sjust@redhat.com>
…to allow unpickle to work correctly Signed-off-by: Samuel Just <sjust@redhat.com>
This commit adds a mgr_main_interpreter_modules config to cause specified modules (or all if * is specified) to be loaded in the main interpreter rather than in a subinterpreter. By default, cephadm, k8sevents, and rook are set to be loaded in the main interpreter to work around https://bugzilla.redhat.com/show_bug.cgi?id=2255688. Signed-off-by: Samuel Just <sjust@redhat.com>
Config Diff Tool Output+ added: mgr_main_interpreter_modules (mgr.yaml.in)
The above configuration changes are found in the PR. Please update the relevant release documentation if necessary. |
|
Depends on #66071 |
phlogistonjohn
left a comment
There was a problem hiding this comment.
I'd like to learn more about how running modules in the main interpreter is expected to work. Are they still running in seperate threads? Is it expected that if all of them are being loaded that they can operate concurrently?
Thanks!
|
Still in separate threads. The subinterpreter thing really didn't buy us much. All of the sub interpreters still shared the same GIL and a ton of other state. We got away with using subinterpreters as we did for so long because there was so little actual isolation between the subinterpreters. The changes in 3.12 to allow you to give them different GIL (which, yes, we are not yet using) is most likely the reason why this all broke. |
So importing them in the main interpreter means they're also imported in the sub-interpreters? This is confusing. |
|
jenkins test make check arm64 |
|
jenkins test make check |
I'm not sure I understand the question. The problem seems to be that when pyo3 is imported anywhere, it sets up process-global state. Prior to 3.12, I suspect the sub interpreters shared library import state, so it only really got imported once. Now, it really gets imported multiple times so we get an import failure after the first one. Moving these modules to the same interpreter (the main one) means that the import once more only actually happens once avoiding the problem. |
|
Replaced by #66244 to avoid / in branch name |
See commit and config doc for details.
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.