Project

General

Profile

Actions

Bug #8654

closed

Parsing /etc/lsb-release for OSD metadata is not portable

Added by Danny Al-Gaaf almost 10 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
OSD
Target version:
-
% Done:

100%

Spent time:
Source:
Community (dev)
Tags:
Backport:
firefly
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Using /etc/lsb-release to get information about the distro is not recommended since it's not portable.

Example: cat /etc/lsb-release (Debian/Ubuntu)

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu Trusty Tahr (development branch)"

Example from SUSE:

LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"

The only portable way to get this info is to use 'lsb_release -a'

Actions #1

Updated by Danny Al-Gaaf almost 10 years ago

Output from lsb_release -a:

$ lsb_release -a

LSB Version:    core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch        
Distributor ID: SUSE LINUX
Description: openSUSE 12.2 (x86_64)
Release: 12.2
Codename: Mantis

From Ubuntu:

Distributor ID:    Ubuntu
Description: Ubuntu Trusty Tahr (development branch)
Release: 14.04
Codename: trusty
Actions #2

Updated by Danny Al-Gaaf almost 10 years ago

  • % Done changed from 0 to 100
Actions #3

Updated by Sage Weil over 9 years ago

  • Status changed from New to Resolved
Actions #4

Updated by Loïc Dachary over 9 years ago

  • Backport set to firefly
Actions #5

Updated by Loïc Dachary over 9 years ago

  • Status changed from Resolved to Pending Backport
Actions #6

Updated by Loïc Dachary about 9 years ago

5be6f2f osd/OSD.cc: parse lsb release data via lsb_release (in firefly),

Actions #7

Updated by Loïc Dachary about 9 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF