Commit Graph

12284 Commits

Author SHA1 Message Date
Colin Patrick McCabe
a410360a91 test: add TestSignalHandlers
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-27 13:34:01 -08:00
Samuel Just
532522da51 rgw_admin: fix compile error in usage
generic_usage was changed in c4b5c33b12
but this use was not updated.  Should call generic_client_usage.
2010-12-21 13:56:35 -08:00
Greg Farnum
61f964c60d librados: Fix compile error by adding std:: namespace
No idea how this got left out or passed any testing?

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
2010-12-21 10:48:35 -08:00
Greg Farnum
0e510dbe8f objectcacher: Fix erroneous reference to "lock" with "flock."
This looks to be an old bug introduced years ago in
267679abc7, and left
undiscovered due to code unuse.
Discovered by inspection while searching for clues to other issues.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
2010-12-20 11:34:46 -08:00
Sage Weil
df7e3ffd0b mds: issue caps on regular files created via MKNOD
Give the client some caps to write with.  This is similar to the current
MKDIR behavior, but with different bits.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 16:52:05 -08:00
Sage Weil
7d33830af5 mds: set a writeable client range on regular files created via MKNOD
If the client reexports ceph via nfs, file creations come through as
a MKNOD followed by OPEN.  If it's a MKNOD on a normal file, assume that
the client will probably write to it and set them up with the caps and
client_range to do so without asking us again first.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 16:52:05 -08:00
Sage Weil
d64616b95b mds: set layout on files created by MKNOD instead of CREATE
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 16:52:05 -08:00
Sage Weil
7df469368d cephx: fix uninitialized value
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 16:02:45 -08:00
Colin Patrick McCabe
c3a24fc5d3 osd: refactor _get_pool / _put_pool a little bit
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 12:28:23 -08:00
Colin Patrick McCabe
39aff22128 osd: OSD::_lookup_pool: avoid double lookup
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 12:00:13 -08:00
Colin Patrick McCabe
bf4529b908 test: create test_pools.sh
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 11:52:01 -08:00
Colin Patrick McCabe
b2746c94d0 logging: eliminate out-of-range dout calls
Eliminate calls to dout that use non-existent log levels, like negative
levels less than -1. Also trigger a compiler error in the future if they
get re-added. -1 is the highest priority dout level; putting lower
priorities into the output buffer will just cause errors.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 00:00:25 -08:00
Colin Patrick McCabe
c4b5c33b12 common: more cerr -> derr conversions
cmds: cerr -> derr

DoutStreambuf: primitive_log: just write to the stdout fd rather than cerr

assert: don't write output to stderr manually (dout will do that
automatically). Do _dout_lock.Lock rather than TryLock. Failing to wait
for the lock is potentially buggy and provides no benefit in that code.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-16 16:25:29 -08:00
Colin Patrick McCabe
30f752cd32 gceph,ceph: replace cerr->derr
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-16 14:57:35 -08:00
Colin Patrick McCabe
c76379fd56 cosd: replace cerr with derr
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-16 14:05:50 -08:00
Colin Patrick McCabe
4644247ce4 osd: FileJournal: use derr
Use derr to announce errors in FileJournal.

Handle EINTR where necessary (still haven't fixed
read/write/pread/pwrite uses).

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-16 10:32:47 -08:00
Colin Patrick McCabe
4fc1af5e60 logging: re-introduce derr
Re-introduce derr as a special log level (level -1) which will show up
in all logs, and on stderr. These messages are the only messages which
will show up on stderr.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-16 10:32:45 -08:00
Yehuda Sadeh
c321620e3b osd: send notify message only to unexpired watchers 2010-12-15 16:33:42 -08:00
Yehuda Sadeh
1e490eff77 osd: timed out watcher is added to unconnected map 2010-12-15 16:33:42 -08:00
Colin Patrick McCabe
619b45ad0b logging: close file when reloading global config
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-15 16:26:49 -08:00
Yehuda Sadeh
060fd42810 osd: fix watch timer, locking 2010-12-15 15:23:08 -08:00
Colin Patrick McCabe
e31f0a4783 tools: don't start msgr thread before daemonize
Calling messenger->add_dispatcher_head() has the side-effect of starting
the messenger thread. So we must not do it before calling
messenger->start(), which sometimes calls daemonize.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-15 12:44:01 -08:00
Sage Weil
d54a854811 Merge branch 'objecter' into unstable 2010-12-15 11:02:19 -08:00
Sage Weil
530083cc32 objecter: check for pg mapping changes in each incremental; refactor misc resubmission code
We need to detect when a pg mapping changes but the primary stays the same.
That means we can't just look at the final osdmap and see what is says; we
have to look at each intervening map and check each request to see if
something switched and the osd has thrown our request out.

Also refactor and clean up the linger vs normal op stuff some more.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:02:09 -08:00
Sage Weil
32a8aed92a objecter: add reopen_session helper
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:02:09 -08:00
Sage Weil
f6dc5d9f92 objecter: cleanup: rename op maps
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:02:09 -08:00
Sage Weil
065cdf523e objecter: track pending requests by osd, not pg
This is a big cleanup.  Also
 - switch to keeping per-osd Connection *'s
 - make requests time out independently (not very efficiently yet)

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:02:09 -08:00
Sage Weil
07e593c4f3 mds: fix inode ancestor attr encoding
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:01:50 -08:00
Sage Weil
5d44d5993a msgr: mark down by Connection*
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:01:50 -08:00
Colin Patrick McCabe
fdbd85e4d2 automake: ignore rmdir errors during uninstall
We don't want to fail "make distcheck" for a silly reason.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-15 10:15:49 -08:00
Yehuda Sadeh
7b5e923cd0 osd: send pending notification for reconnected watcher 2010-12-14 17:00:49 -08:00
Colin Patrick McCabe
f9694648fc automake: add osd/Watch.h to noinst_HEADERS
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-14 16:28:39 -08:00
Colin Patrick McCabe
3e076c397a logging: use Mutex::Locker
Use Mutex::Locker to make logging exception-safe. That is, if you are
doing "dout() << foo() << dendl;" and foo throws an exception, the dout
mutex will not be left in a locked state.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-14 06:56:27 -08:00
Colin Patrick McCabe
bf31f3f129 logger: Fix DoutStreambuf::create_rank_symlink
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-14 06:20:23 -08:00
Colin Patrick McCabe
4c37719988 cephtool: rename tools files
Rename tools files to be more consistent. For example, the main()
function for ./ceph should be in ceph.cc.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-14 06:13:50 -08:00
Sage Weil
c8d9b20cc5 Merge branch 'sync2' into unstable 2010-12-14 12:47:40 -08:00
Sage Weil
056e91e0ce librados: drop watch_lock
Use the existing lock to do protect all of this.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-14 11:02:12 -08:00
Sage Weil
d4420a8a57 objecter: drop linger_info_mutex
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-14 11:00:19 -08:00
Sage Weil
215f3320fe objecter: simplify linger register
Drop single-use helper; make unregister_linger part of the public
interface.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-14 10:48:57 -08:00
Sage Weil
b60a9abf56 objecter: fix up linger ack/commit to trigger first time only
We only want the user-provided ack/commit callbacks to trigger the first
time we register the lingering op.  Same goes for the eversion_t *objver.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-14 10:47:19 -08:00
Sage Weil
8a75086d5e objecter: clean up linger interface
Put LingerOp on heap.  Use xlist to attach to PGs.  Add in/out bufferlists.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-14 10:35:40 -08:00
Sage Weil
96b32382d0 Merge remote branch 'origin/unstable' into sync2
Conflicts:
	src/auth/Crypto.cc
	src/osd/ReplicatedPG.cc
	src/osd/ReplicatedPG.h
	src/osd/osd_types.h
2010-12-14 09:55:21 -08:00
Vangelis Koukis
a3fcf90898 logging: Fix use-before-access in debug.cc
Signed-off-by: Vangelis Koukis <vkoukis@cslab.ece.ntua.gr>
Signed-off-by: Constantinos Venetsanopoulos <cven@cslab.ece.ntua.gr>
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-14 01:58:14 -08:00
Sage Weil
0e08cb0f6c osd: return ENOSPC for non-mds if full flag is set in osdmap
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-11 13:58:47 -08:00
Sage Weil
239b7677e7 Merge remote branch 'origin/syslog' into unstable
Conflicts:
	src/mon/Paxos.cc
	src/osd/PG.cc
2010-12-11 08:09:17 -08:00
Sage Weil
46242586ed Merge branch 'gceph' into unstable 2010-12-11 08:04:09 -08:00
Colin Patrick McCabe
292414c5fd gceph: Add gceph to rpm, deb
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-10 20:34:49 -08:00
Colin Patrick McCabe
71a19a9432 gceph: run shutdown functions at exit
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-10 20:30:57 -08:00
Colin Patrick McCabe
bb82fd3d19 gceph: fix compile
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-10 20:25:47 -08:00
Colin Patrick McCabe
1a201f85e4 gceph: add -h argument
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-10 20:15:25 -08:00