Repository navigation
Conversation
phlogistonjohn
left a comment
There was a problem hiding this comment.
Change content looks ok. Commit title should probably be something more like:
ceph.spec.in: disable -P in python shebang for cephadm binary
76d17fb to
fbfe653
Compare
|
jenkins test make check arm64 |
|
@ShwetaBhosale1 as we discussed I'll wait for approval from @tchaikov or @phlogistonjohn to go ahead. BTW (and I'm not sure if this is possible or not), but probably we can make it conditional so we don't affect newer python versions.. maybe something like (plz double check the syntax as I'm not familiar with the ceph.spec.ini syntax): |
|
@rkachach For Python versions < 3.11, py3_shebang_flags does not include the -P flag. We remove it only for Python 3.11+ because the Rocky 10 container is used on rhel/centos 9 hosts, and the cephadm binary is copied from the container image to the host. I considered adding an explicit Python version check (>= 3.11), but since %undefine _py3_shebang_P has no effect when the macro is not defined, it is safe to use on older Python versions as well. Therefore, I omitted the version check. |
The rocky 10 container image is used on all hosts. The cephadm binary is picked out of the EL (centos/rocky) package builds. So it's also used for bootstrapping, it really needs to have the shebang with the widest compatibility. One possible downside of the change, which I didn't think was important enough to create a bunch of make-work over is that this change touches all python binaries produced by the rpm build. Not just cephadm. The fedora change that brought this in describes what it does and I didn't feel strongly enough about it to bother discussing it (until now) :-) |
|
If it becomes an issue in the future we could look into restricting this modification to just cephadm, but I don't think it's benefits are significant enough RN. |
yes, that's the pain -- we build with python 3.12 (el10) while running the built artifacts on python 3.9 (el9). this practically breaks the check in the detection logic at https://src.fedoraproject.org/rpms/python-rpm-macros/blob/rawhide/f/macros.python3#_31 which does test the see https://docs.python.org/3/library/sys.html#sys.flags.safe_path and https://docs.python.org/3/c-api/init_config.html#c.PyConfig.safe_path.
and yes, if we want to support python3.9 interpreter, we have to avoid using features not exist in python3.9. otherwise we would have to bundle python3.11 (or whatever version we want) in cephadm with a safe glibc version.
apart from bundling python interpreter, i evaluated the option to add |
tchaikov
left a comment
There was a problem hiding this comment.
lgtm -- we run with python3.9 and build with python 3.12. this is the fact we need to live with.
Without this fix we get error for running cephadm with shebang
Fixes: https://tracker.ceph.com/issues/77340
Signed-off-by: Shweta Bhosale [email protected]
Testing logs:
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
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.