Project

General

Profile

Bug #7605

statup script /etc/init.d/ceph has incorrect slash

Added by Jan-Willem Michels about 10 years ago. Updated almost 10 years ago.

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

0%

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

Description

for centos / redhat users, the file /etc/init.d/ceph , which is the start-up script, line 326 is:

defaultweight="$(df -P -k $osd_data/. | tail -1 | awk '{ d=$2/1073741824 ; r = sprintf(\"%.2f\", d); print r }')"

when the OSD's are started it gives rather awful error messages something about awk not correctly closed

the correct line should be:
r = sprintf("%.2f\", d) instead of
r = sprintf(\"%.2f\", d)

complete line:
defaultweight="$(df -P -k $osd_data/. | tail -1 | awk '{ d=$2/1073741824 ; r = sprintf("%.2f", d); print r }')"

system does start though.

History

#1 Updated by Jan-Willem Michels about 10 years ago

I meant:
the correct line should be:
r = sprintf("%.2f", d) instead of
r = sprintf(\"%.2f\", d)

#2 Updated by Sage Weil almost 10 years ago

  • Status changed from New to Resolved

commit:4cf9a73bacb73706fff66110528b733e9ec80b21

Also available in: Atom PDF