Project

General

Profile

Bug #19941

ceph-disk fails if OSD udev rule triggers prior to mount of /var

Added by David Disseldorp 2 months ago. Updated 24 days ago.

Status:
Resolved
Priority:
Urgent
Category:
-
Target version:
-
Start date:
05/16/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
kraken,jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
ceph-disk
Release:
Needs Doc:
No

Description

Another "my OSDs don't come up on reboot" bug:

ceph-disk unconditionally calls setup_statedir() during initialisation, which manipulates /var/lib/ceph/tmp :

def setup_statedir(dir):
    # XXX The following use of globals makes linting
    # really hard. Global state in Python is iffy and
    # should be avoided.
    global STATEDIR
    STATEDIR = dir

    if not os.path.exists(STATEDIR):
        os.mkdir(STATEDIR)
    if not os.path.exists(STATEDIR + "/tmp"):
        os.mkdir(STATEDIR + "/tmp")

    global prepare_lock
    prepare_lock = FileLock(STATEDIR + '/tmp/ceph-disk.prepare.lock')

    global activate_lock
    activate_lock = FileLock(STATEDIR + '/tmp/ceph-disk.activate.lock')
...


This may fail for users with a separately mounted /var filesystem, where /var hasn't been mounted prior to 95-ceph-osd.rules being triggered.

Related issues

Copied to Ceph - Backport #20150: kraken: ceph-disk fails if OSD udev rule triggers prior to mount of /var Resolved
Copied to Ceph - Backport #20151: jewel: ceph-disk fails if OSD udev rule triggers prior to mount of /var Resolved

History

#2 Updated by Loic Dachary 2 months ago

  • Description updated (diff)

#3 Updated by Loic Dachary 2 months ago

  • Status changed from New to Verified
  • Priority changed from Normal to Urgent

#5 Updated by Loic Dachary about 2 months ago

  • Backport set to kraken,jewel

#6 Updated by Loic Dachary about 2 months ago

  • Status changed from Verified to Pending Backport

#7 Updated by Nathan Cutler about 2 months ago

  • Copied to Backport #20150: kraken: ceph-disk fails if OSD udev rule triggers prior to mount of /var added

#8 Updated by Nathan Cutler about 2 months ago

  • Copied to Backport #20151: jewel: ceph-disk fails if OSD udev rule triggers prior to mount of /var added

#9 Updated by Nathan Cutler 24 days ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF