Bug #17637
closed/usr/lib/ceph/ceph-osd-prestart.sh fails if run on real 'sh' (needs 'bash' or fix)
0%
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
Updated by Nathan Cutler over 7 years ago
- Status changed from New to Fix Under Review
- Assignee set to Nathan Cutler
- Backport set to jewel
master PR: https://github.com/ceph/ceph/pull/11579
Updated by Nathan Cutler over 7 years ago
- Tracker changed from Bug to Backport
- Status changed from Fix Under Review to In Progress
- Release set to jewel
(This bug affects jewel and hammer, but not kraken)
Updated by Nathan Cutler over 7 years ago
- Tracker changed from Backport to Bug
- Status changed from In Progress to Fix Under Review
- Start date set to 10/20/2016
- % Done set to 0
- Source set to other
- Backport set to jewel
- Regression set to No
- Severity set to 4 - irritation
- Release deleted (
jewel)
Updated by Nathan Cutler over 7 years ago
- Status changed from Fix Under Review to Need More Info
Stucki: I installed dash (version 0.5.7) and the line you mentioned seems to evaluate correctly (the same as in bash) without any error.
What you describe ("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)") sounds like you upgraded from hammer but do not have the correct partition GUID code set on your journal partitions.
Can you post the output of "sgdisk --info=$JOURNAL_PARTITION_NUMBER $JOURNAL_DISK" for your journal partitions?
Also, can you post a log or shell excerpt showing that ceph-osd-prestart.sh really is failing at that line 55?
Lastly, I'm not sure what you mean by "The 'correct error message (including what to do)' failed".
Thanks.
Updated by Nathan Cutler over 7 years ago
- Status changed from Need More Info to Can't reproduce
- Backport deleted (
jewel)
No response. Feel free to re-open, providing the info requested in #17637-4