Bug #14906
closedredhat-lsb-core dependency was dropped, but is still needed
0%
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
Updated by Nathan Cutler about 8 years ago
It looks like collect_sys_info() is called by OSDs, MONs, and MDSs.
Updated by Nathan Cutler about 8 years ago
- Status changed from New to Fix Under Review
- Backport set to hammer
Updated by Nathan Cutler about 8 years ago
jewel PR: https://github.com/ceph/ceph/pull/7823
Updated by Ken Dreyer about 8 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.
Updated by Nathan Cutler about 8 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."
Updated by Nathan Cutler about 8 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport changed from hammer to hammer,infernalis
Updated by Loïc Dachary about 8 years ago
- Copied to Backport #14945: infernalis: redhat-lsb-core dependency was dropped, but is still needed added
Updated by Loïc Dachary about 8 years ago
- Copied to Backport #14946: hammer: redhat-lsb-core dependency was dropped, but is still needed added
Updated by Loïc Dachary over 7 years ago
- Status changed from Pending Backport to Resolved