Project

General

Profile

Bug #12034

ceph-common needs python-argparse on older distros, but doesn't require it

Added by Nathan Cutler about 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
06/16/2015
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
hammer,firefly
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:

Description

The ceph command-line utility is a Python script that does import argparse - on Python 2.7 this is fine, because argparse is included in core. This is not the case, however, in Python 2.6 which is used e.g. in CentOS 6.

I tried bringing up a vanilla CentOS 6.6 docker image and installed only ceph-common on it. The result is as expected:

[root@9412bea8532a ~]# ceph
Traceback (most recent call last):
  File "/usr/bin/ceph", line 64, in <module>
    import argparse
ImportError: No module named argparse

Related issues

Copied to devops - Backport #12268: ceph-common needs python-argparse on older distros, but doesn't require it Resolved 06/16/2015
Copied to devops - Backport #12269: ceph.spec.in: ceph-common needs python-argparse on older distros, but doesn't require it Resolved 06/16/2015

Associated revisions

Revision 23171c95 (diff)
Added by Nathan Cutler about 3 years ago

ceph.spec.in: python-argparse only in Python 2.6

argparse is a widely-used Python module for parsing command-line arguments.
Ceph makes heavy use of Python scripts, both in the build environment and on
cluster nodes and clients.

Until Python 2.6, argparse was distributed separately from Python proper.
As of 2.7 it is part of the Python standard library.

Although the python package in a given distro may or may not Provide:
python-argparse, this cannot be relied upon.

Therefore, this commit puts appropriate conditionals around Requires:
python-argparse and BuildRequires: python-argparse. It does so for Red
Hat/CentOS and SUSE only, because the last Fedora version with Python 2.6
was Fedora 13, which is EOL.

argparse is required by both the ceph and ceph-common packages, but since ceph
requires ceph-common, the argparse Requires and BuildRequires need only appear
once, under ceph-common.

http://tracker.ceph.com/issues/12034 Fixes: #12034

Signed-off-by: Nathan Cutler <>

Revision 2544a6fc (diff)
Added by Nathan Cutler about 3 years ago

ceph.spec.in: python-argparse only in Python 2.6

argparse is a widely-used Python module for parsing command-line arguments.
Ceph makes heavy use of Python scripts, both in the build environment and on
cluster nodes and clients.

Until Python 2.6, argparse was distributed separately from Python proper.
As of 2.7 it is part of the Python standard library.

Although the python package in a given distro may or may not Provide:
python-argparse, this cannot be relied upon.

Therefore, this commit puts appropriate conditionals around Requires:
python-argparse and BuildRequires: python-argparse. It does so for Red
Hat/CentOS and SUSE only, because the last Fedora version with Python 2.6
was Fedora 13, which is EOL.

argparse is required by both the ceph and ceph-common packages, but since ceph
requires ceph-common, the argparse Requires and BuildRequires need only appear
once, under ceph-common.

http://tracker.ceph.com/issues/12034 Fixes: #12034

Signed-off-by: Nathan Cutler <>
(cherry picked from commit 23171c952997d104cfa6b5700ec0bb658a8e0915)

Conflicts:
ceph.spec.in

Revision 8b576bd5 (diff)
Added by Nathan Cutler about 3 years ago

ceph.spec.in: python-argparse only in Python 2.6

argparse is a widely-used Python module for parsing command-line arguments.
Ceph makes heavy use of Python scripts, both in the build environment and on
cluster nodes and clients.

Until Python 2.6, argparse was distributed separately from Python proper.
As of 2.7 it is part of the Python standard library.

Although the python package in a given distro may or may not Provide:
python-argparse, this cannot be relied upon.

Therefore, this commit puts appropriate conditionals around Requires:
python-argparse and BuildRequires: python-argparse. It does so for Red
Hat/CentOS and SUSE only, because the last Fedora version with Python 2.6
was Fedora 13, which is EOL.

argparse is required by both the ceph and ceph-common packages, but since ceph
requires ceph-common, the argparse Requires and BuildRequires need only appear
once, under ceph-common.

http://tracker.ceph.com/issues/12034 Fixes: #12034

Signed-off-by: Nathan Cutler <>
(cherry picked from commit 23171c952997d104cfa6b5700ec0bb658a8e0915)

History

#2 Updated by Kefu Chai about 3 years ago

  • Status changed from New to Need Review
  • Source changed from other to Community (dev)

#3 Updated by Nathan Cutler about 3 years ago

  • Status changed from Need Review to New
  • Assignee changed from Nathan Cutler to Ken Dreyer
  • Source changed from Community (dev) to other

#4 Updated by Nathan Cutler about 3 years ago

  • Status changed from New to Need Review
  • Source changed from other to Community (dev)

#5 Updated by Nathan Cutler about 3 years ago

  • Status changed from Need Review to Pending Backport

#6 Updated by Nathan Cutler almost 3 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF