Actions
Bug #838
closedlibrados should not write to stderr or ceph logs, touch pid files, silently read config files
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
librados
Target version:
-
% Done:
0%
Source:
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
Using the Python bindings just as an easy way to init librados, the bug does not reside in the bindings.
proof of stderr:
$ env LD_LIBRARY_PATH=.libs PYTHONPATH=pybind python -c 'import rados; r=rados.Rados()' >/dev/null 2011-02-28 10:10:24.633913 7fe104c15700 ceph version 0.26~rc (commit:040e54608209aaf7ea1379bf694728bc32dd577a)
proof of ceph log writing:
$ strace -e open env LD_LIBRARY_PATH=.libs PYTHONPATH=pybind python -c 'import rados; r=rados.Rados()' 2>&1|grep /out/ open("/home/tv/src/ceph.git/src/out/dreamer.21694", O_WRONLY|O_CREAT|O_APPEND, 0600) = 3
proof of pid file interaction:
$ strace -e open env LD_LIBRARY_PATH=.libs PYTHONPATH=pybind python -c 'import rados; r=rados.Rados()' 2>&1|grep pid open("out/librados.admin.pid", O_RDONLY) = -1 ENOENT (No such file or directory)
and lastly, and this you might disagree with, I think general-purpose libraries should not read config files by default.
proof of config file reading:
$ strace -e open env LD_LIBRARY_PATH=.libs PYTHONPATH=pybind python -c 'import rados; r=rados.Rados()' 2>&1|grep conf open("/etc/ceph/ceph.conf", O_RDONLY) = -1 ENOENT (No such file or directory) open("~/.ceph/config", O_RDONLY) = -1 ENOENT (No such file or directory) open("ceph.conf", O_RDONLY) = 3 open("/etc/ceph/ceph.conf", O_RDONLY) = -1 ENOENT (No such file or directory) open("~/.ceph/config", O_RDONLY) = -1 ENOENT (No such file or directory) open("ceph.conf", O_RDONLY) = 4
I'm extra concerned about reading ceph.conf from the current dir; that means e.g. user tools built on top of librados are brittle.. Imagine cd'ing into a ceph source tree and suddenly a bunch of your tools fail.
Also, it reads the config twice?
Actions