Project

General

Profile

Actions

Bug #23781

closed

ceph-detect-init still uses python's platform lib

Added by Joshua Schmid about 6 years ago. Updated about 6 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
ceph-disk
Target version:
% Done:

0%

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

Description

When 'ceph-detect-init --default sysvinit' is called on a modern system that uses /etc/os-release it will return 'sysvinit' due to a ('','','') return from 'platform.linux_distribution'

See deprecation message here:
https://bugs.python.org/issue1322

This has the following effect:

The initial call mentioned above is used in ceph-disk's 'init_get()' function which in turn is responsible for detecting and then writing a identifier file during the osd preparation.

On a /etc/os-release distro this will result in:

data4:~ # ls /var/lib/ceph/osd/ceph-13/sysvinit
/var/lib/ceph/osd/ceph-13/sysvinit

Where on a systemd system there should be a:

data1@12SP3:~ # ls /var/lib/ceph/osd/ceph-6/systemd
/var/lib/ceph/osd/ceph-6/systemd

That again gets read by ceph-disks activate call which identifies the system as a 'initV' system and calls:

'/usr/sbin/service ceph --cluster ceph start osd.$ID'

instead of 'systemctl start ceph-osd@$ID'

which of course fails.

It's hard to notice in the first place because the initial deployment activates the disk correctly, which will present you with a running cluster. Only after rebooting a node the OSDs will no longer activate their services.

A proper(python3+) fix would be to rewrite the 'ceph-detect-init' script using the proposed 'python-distro' lib.


Related issues 1 (0 open1 closed)

Is duplicate of Ceph - Bug #18163: platform.linux_distribution() is deprecated; stop using itResolvedNathan Cutler12/07/2016

Actions
Actions

Also available in: Atom PDF