Project

General

Profile

Actions

Bug #17637

closed

/usr/lib/ceph/ceph-osd-prestart.sh fails if run on real 'sh' (needs 'bash' or fix)

Added by Christoph von Stuckrad over 7 years ago. Updated over 7 years ago.

Status:
Can't reproduce
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
4 - irritation
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

During reboot of a ceph-server we got lots of error messages
which, at the end, only show that the access rights to journals
on disks were lost. (root:root instead of ceph:disk)

The 'correct error message (including what to do)' failed
by/at Line 55 of /usr/lib/ceph/ceph-osd-prestart.sh

if [ "${update:-1}" = "1" -o "${update:-1}" = "true" ]; then

This seems to be a 'bashism' (no precedence in old bourne shell)
Debian decided to use a real old-syntax-bourne-shell (dash), at
least during startups. So currently '#!/bin/sh' really IS 'sh',
while in older 'debian's (I remember wheezy) the default was
'/bin/bash' (even if called by 'sh').

So I think, either the script needs to be fixed or run under '#!/bin/bash'.

Stucki

Actions

Also available in: Atom PDF