Project

General

Profile

Bug #14906

redhat-lsb-core dependency was dropped, but is still needed

Added by Nathan Cutler almost 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
hammer,infernalis
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The redhat-lsb-core dependency was removed in https://github.com/ceph/ceph/pull/6363 but it appears to still be needed. David Disseldorp reports:

src/common/util.cc calls the lsb_release binary via shell in the collect_sys_info() code path:

133 static void lsb_release_parse(map<string, string> *m, CephContext *cct)
134 {
135   FILE *fp = popen("lsb_release -idrc", "r");

On my test system (which doesn't have lsb-release package installed), this results in:
Feb 24 12:11:41 harrison ceph-osd3287: sh: lsb_release: command not found
Feb 24 12:11:41 harrison ceph-osd3287: 2016-02-24 12:11:41.557873 7fb334a84700 -1 osd.0 583 lsb_release_parse - pclose failed: (0) Success


Related issues

Copied to devops - Backport #14945: infernalis: redhat-lsb-core dependency was dropped, but is still needed Rejected
Copied to devops - Backport #14946: hammer: redhat-lsb-core dependency was dropped, but is still needed Resolved

Associated revisions

Revision b87f4efb (diff)
Added by Nathan Cutler almost 7 years ago

packaging: lsb_release build and runtime dependency

The lsb_release executable is being run in multiple places, not least in
src/common/util.cc, which calls it via shell in the collect_sys_info() code
path.

This patch addresses this issue on SUSE- and Debian-derivatives, as well
as reinstating the dependency for RHEL/Fedora after it was dropped in
15600572265bed397fbd80bdd2b7d83a0e9bd918.

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

Signed-off-by: Nathan Cutler <>

Revision 57264633 (diff)
Added by Nathan Cutler almost 7 years ago

packaging: lsb_release build and runtime dependency

The lsb_release executable is being run in multiple places, not least in
src/common/util.cc, which calls it via shell in the collect_sys_info() code
path.

This patch addresses this issue on SUSE- and Debian-derivatives, as well
as reinstating the dependency for RHEL/Fedora after it was dropped in
15600572265bed397fbd80bdd2b7d83a0e9bd918.

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

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

Conflicts:
ceph.spec.in
The jewel specfile has diverged considerably from hammer:
systemd, package split, etc. This is more of a hand backport
than a cherry-pick.

History

#1 Updated by Nathan Cutler almost 7 years ago

It looks like collect_sys_info() is called by OSDs, MONs, and MDSs.

#2 Updated by Nathan Cutler almost 7 years ago

  • Status changed from New to Fix Under Review
  • Backport set to hammer

#4 Updated by Ken Dreyer almost 7 years ago

+ adding branto to the CC

Why does the OSD have a lsb_release_parse function at all? That seems odd.

We really want to get rid of the lsb-release package dependency.

#5 Updated by Nathan Cutler almost 7 years ago

@Ken, @Boris - the lsb_release executable is run in many places:

qa/qa_scripts/RbdLib.pm:        my $os_distro = get_command_output ( "lsb_release -d" );
qa/qa_scripts/S3Lib.pm:        my $os_distro = get_command_output ( "lsb_release -d" );
qa/workunits/rgw/s3_utilities.pm:        my $os_distro = get_command_output ( "lsb_release -d" );
qa/workunits/ceph-disk/ceph-disk-test.py:        if c.sh("lsb_release -si").strip() == 'CentOS':
qa/workunits/ceph-disk/ceph-disk-test.py:        if c.sh("lsb_release -si").strip() != 'CentOS':
qa/workunits/ceph-helpers-root.sh:    case $(lsb_release -si) in
qa/workunits/ceph-helpers-root.sh:            echo "$(lsb_release -si) is unknown, $@ will have to be installed manually." 
src/ceph-disk/Makefile.am:        if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
src/ceph-detect-init/Makefile.am:        if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
src/common/util.cc:static bool lsb_release_set(char *buf, const char *prefix,
src/common/util.cc:static void lsb_release_parse(map<string, string> *m, CephContext *cct)
src/common/util.cc:  FILE *fp = popen("lsb_release -idrc", "r");
src/common/util.cc:    lderr(cct) << "lsb_release_parse - failed to call lsb_release binary with error: " << cpp_strerror(ret) << dendl;
src/common/util.cc:    if (lsb_release_set(buf, "Distributor ID:", m, "distro"))
src/common/util.cc:    if (lsb_release_set(buf, "Description:", m, "distro_description"))
src/common/util.cc:    if (lsb_release_set(buf, "Release:", m, "distro_version"))
src/common/util.cc:    if (lsb_release_set(buf, "Codename:", m, "distro_codename"))
src/common/util.cc:    lderr(cct) << "lsb_release_parse - pclose failed: " << cpp_strerror(ret) << dendl;
src/common/util.cc:  lsb_release_parse(m, cct);
src/osd/OSD.h:  bool _lsb_release_set(char *buf, const char *str, map<string,string> *pm, const char *key);
src/osd/OSD.h:  void _lsb_release_parse (map<string,string> *pm);
src/pybind/rados/Makefile.am:        if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
src/pybind/rbd/Makefile.am:        if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \
src/script/dep-report.sh:PLATFORM=`lsb_release -is`
src/test/docker-test-helper.sh:   $ lsb_release -d
src/test/docker-test-helper.sh:   bash-4.2$ lsb_release -d
make-debs.sh:codename=$(lsb_release -sc)
make-debs.sh:releasedir=$base/$(lsb_release -si)/WORKDIR
install-deps.sh:case $(lsb_release -si) in
install-deps.sh:        case $(lsb_release -sc) in
install-deps.sh:                backports="-t $(lsb_release -sc)-backports" 
install-deps.sh:        case $(lsb_release -si) in
install-deps.sh:                MAJOR_VERSION=$(lsb_release -rs | cut -f1 -d.)
install-deps.sh:                if test $(lsb_release -si) = RedHatEnterpriseServer ; then
install-deps.sh:                if test $(lsb_release -si) = CentOS -a $MAJOR_VERSION = 7 ; then
install-deps.sh:        echo "$(lsb_release -si) is unknown, dependencies will have to be installed manually." 

#6 Updated by Nathan Cutler almost 7 years ago

  • Priority changed from Normal to High

#7 Updated by Nathan Cutler almost 7 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport changed from hammer to hammer,infernalis

#8 Updated by Nathan Cutler almost 7 years ago

  • Target version set to v10.0.4

#9 Updated by Loïc Dachary almost 7 years ago

  • Copied to Backport #14945: infernalis: redhat-lsb-core dependency was dropped, but is still needed added

#10 Updated by Loïc Dachary almost 7 years ago

  • Copied to Backport #14946: hammer: redhat-lsb-core dependency was dropped, but is still needed added

#11 Updated by Loïc Dachary over 6 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF