Project

General

Profile

Bug #806

init-ceph should use do_cmd consistently, or not at all

Added by Colin McCabe almost 10 years ago. Updated almost 10 years ago.

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

0%

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

Description

init-ceph sometimes uses do_cmd, and sometimes not.

Example:

 [ -n "$pid_file" ] && mkdir -p `dirname $pid_file`
...
 [ -n "$log_dir" ] && do_cmd "mkdir -p $log_dir" 

The second one uses do_cmd, but the first one doesn't. do_cmd seems to involve some logic to inject 'ssh' if it feels that it needs to.

It's probably best if we don't go running ssh inside an init script. It's weird and non-traditional, and most sysadmins will be confused. If we do decide to do it, though, we should at least be consistent and use do_cmd everywhere. That will also mean getting rid of things like [ -e $pidfile ], which implicitly assume that we're running locally. (Another reason NOT to use do_cmd.)

History

#1 Updated by Sage Weil almost 10 years ago

  • Status changed from New to Resolved
  • Target version set to v0.25

this bug fixed by e86e4cf

the ssh stuff kicks in only with -a. it's weird, yes, but incredibly convenient. if that functionality is not in the init script, it needs to go somewhere else.. i'm open to suggestions!

Also available in: Atom PDF