Bug #77340
closedcephadm binary extracted from Rocky 10 image fails on CentOS Stream 9 due to unsupported Python -P shebang option
0%
Description
When using a cephadm binary extracted from a Rocky Linux 10-based container image on a CentOS Stream 9 host, cephadm fails to execute because the shebang contains Python flags that are not supported by the host's default Python version.
The cephadm binary starts with:
#! /usr/bin/python3 -sP
CentOS Stream 9 ships with Python 3.9 by default:
[root@trial016 ~]# cat /etc/redhat-release
CentOS Stream release 9
[root@trial016 ~]# python -V
Python 3.9.25
The -P option was introduced in newer Python releases and is not recognized by Python 3.9. As a result, executing cephadm directly through the shebang fails:
[root@trial016 ~]# /var/lib/ceph/<fsid>/cephadm.<hash> check-host
Unknown option: -P
usage: /usr/bin/python3 [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
SB Updated by Shweta Bhosale 6 months ago
- Backport set to umbrella
SB Updated by Shweta Bhosale 6 months ago
- Pull request ID set to 69421
UB Updated by Upkeep Bot 6 months ago
- Status changed from Fix Under Review to Pending Backport
- Merge Commit set to 84ac1de6438cf1de3eabf19206b0bef5ef6f758d
- Fixed In set to v21.3.0-78-g84ac1de643
- Upkeep Timestamp set to 2026-06-13T01:15:28+00:00
UB Updated by Upkeep Bot 6 months ago
- Copied to Backport #77390: umbrella: cephadm binary extracted from Rocky 10 image fails on CentOS Stream 9 due to unsupported Python -P shebang option added
UB Updated by Upkeep Bot 6 months ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot 3 months ago
- Status changed from Pending Backport to Resolved
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2026-06-13T01:15:28+00:00 to 2026-08-27T18:34:44+00:00