init-ceph should use do_cmd consistently, or not at all
init-ceph sometimes uses do_cmd, and sometimes not.
[ -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.)
#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!