Commit Graph

15552 Commits

Author SHA1 Message Date
Colin Patrick McCabe
95d49de027 Makefile.am: always #define __STDC_FORMAT_MACROS
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-01 11:13:53 -07:00
Sage Weil
a25fd8264d Merge branch 'stable' 2011-08-01 09:50:05 -07:00
Sage Weil
0dc235a36a mds: request attempt comes from fwd count, not retry flag 2011-08-01 09:49:45 -07:00
Sage Weil
15c344c125 mds: fix create_subtree_map for new dirs
Currently mkdir foo ; rmdir foo fails because we can't get_subtree_map()
on a new directory that isn't linked in the committed plane.  Since we are
journaling the projected subtree, it makes sense to use
get_projected_subtree_map() here.

It's easiest to keep in both the old and new directories in the rename
project map instead of looking at the next-to-most-recent parent for the
inode.  The committed version is irrelevant (could conceivably be multiple
renames behind) and the current projected parent is just newdir; we need
olddir too, and we don't project for cross-mds rename anyway.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-07-29 22:11:15 -07:00
Sage Weil
534afabb25 vstart: static mapping of names to ranks
a always 0, b always 1, etc. makes multi-mds debugging much easier.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-29 22:11:14 -07:00
Sage Weil
c08d08baa6 v0.32 2011-07-29 21:44:23 -07:00
Yehuda Sadeh
360ab7f4ed rgw: don't silently ignore bad user/group when setting acl 2011-07-29 16:27:41 -07:00
Sage Weil
5ba1dfe2f4 Makefile: include HeartbeatMap.h in dist
Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-29 15:14:20 -07:00
Sage Weil
29158d7d0f mds: fix validation of (slave) request attempts
Verify that slave requests received are not stale.

Verify that slave replies match the currently processing request.

Clean up the code a bit.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-29 15:14:20 -07:00
Sage Weil
6ad7dfbcb7 mds: identify slave requests with reqid + attempt number
We need to distinguish between different attempts to process a request, or
else we can get annoying races in the slave request handling code.  E.g.,

- request sent to mds A
- A authpins items on B, B registered slave_request
- A forwards request to C, sends slave finish to B
- C receives request, sends authpin slave request to B
- B receives C's authpin request, discards (*)
- B receives A's finish, closes slave request

First we just add tracking of the attempt number.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-29 15:14:19 -07:00
Greg Farnum
97c3bcb7fd scatterlock: fix flag assignments.
Want |= to set a flag, not &=!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-07-29 14:58:01 -07:00
Colin Patrick McCabe
7b574ffc46 osdmap: in json dump, dump out/in, up/down status
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-07-29 14:49:38 -07:00
Yehuda Sadeh
c775c03d91 rgw: get current utc epoch differently
beforehand tm.tm_isdst was returning random results which happened
to work correctly most of the time since we're currently in dst
2011-07-29 14:37:07 -07:00
Yehuda Sadeh
aba88f5220 rgw: init correctly req_state->{bucket, object} 2011-07-29 13:17:38 -07:00
Yehuda Sadeh
a4e4c08343 rgw: fix total time reporting in rgw_admin 2011-07-29 11:48:23 -07:00
Yehuda Sadeh
5c194f5d58 rgw: tweak content-md5 handling 2011-07-29 11:48:23 -07:00
Greg Farnum
86c7260bfc heartbeatmap: fix/clarify the commenting
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-07-29 09:23:24 -07:00
Greg Farnum
925cb462f9 scatterlock: compress boolean flags into a set of state flags
While we're at it, unify the naming structure a bit and remove
the unused stale flag.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-07-29 09:17:45 -07:00
Greg Farnum
acca584b2b scatterlock: rename scatter_flags -> state_flags
We want to use this for all the bools, not just the scatter ones.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-07-29 09:17:45 -07:00
Sage Weil
521940242d Makefile: remove from libglobal
Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 16:42:55 -07:00
Colin Patrick McCabe
90ce2f7d5b Add -ltr to libcommon
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-07-28 16:31:09 -07:00
Sage Weil
8524ed5dfe Makefile: -lrt for libglobal.la only
Debugging linking is a pita.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 16:28:27 -07:00
Sage Weil
fadb5ae75a unittest_bufferlist: change include order
fixes a build error (int type conflicts) for me on fatty.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 16:26:58 -07:00
Sage Weil
f82b6298df mds: fix log trimming races
trim() would iterate over segments.  It would take the *p segment, ++p,
then call try_expire().  But the _expired() function would also clean up
and (if possible) retire subsequent segments on the list if they were on
the expired list, invalidating the p iterator.

Untangle the mess by making expired segment trimming (i.e. removing from
segment list) a separate operation performed only by trim() (probably a
good idea anyway).  This keeps the iterator safe/stable.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 16:01:07 -07:00
Sage Weil
8fe50b84d8 mds: separate type for gratuitous debug ESubtreeMaps
Give these a different type so they are not interpreted as subtree
boundaries during replay.  Otherwise we break the truncate_finish code,
which references the truncate_start logsegment by offset.  Probably other
stuff too.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 16:01:07 -07:00
Sage Weil
61a501283f mon: 'ceph mon dump [--format=json]'
Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 16:01:07 -07:00
Sage Weil
70dee89692 heartbeatmap: unit test
Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 16:01:06 -07:00
Sage Weil
3336665339 heartbeatmap: we don't care about pthread_t
Workers don't have to be threads.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 16:01:06 -07:00
Sage Weil
7815237ebc client: open session with all mds targets
If we have an open session with an mds, we need to have an open session.

The problem is if we, say,

- client has old mdsmap
- mds A adds B as target in mdsmap
- send request to mds A
- A exports to B
- we get the EXPORT, but B isn't listed as a target for A in client map
- client gets updated map

At the time we receive the map we need to open the session to B.   We can't
really do it when we get the EXPORT because we don't know the target MDS.

We can either track which exports are pending to do it, or just blindly
open sessions with targets for any MDSs we have caps with.  Which is
basically every session we have open.  That's simplest for now.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 16:01:06 -07:00
Sage Weil
a3ed402bb5 Makefile: fix unittest_ceph_argparse build
Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 15:55:53 -07:00
Colin Patrick McCabe
c304c2c692 injectargs: complain about unparsed args
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-07-28 15:17:38 -07:00
Colin Patrick McCabe
498dd53729 injectargs: print out what is changing
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-07-28 14:49:18 -07:00
Yehuda Sadeh
0b66ed2cd7 rgw: fix base64 check 2011-07-28 14:40:02 -07:00
Yehuda Sadeh
ef509b312e rgw: check content md5 validity when doing auth 2011-07-28 14:29:52 -07:00
Yehuda Sadeh
4a8d8f0eaf rgw: fix date checks 2011-07-28 14:03:38 -07:00
Yehuda Sadeh
07e60616d6 rgw: fix authentication 2011-07-28 14:03:38 -07:00
Greg Farnum
dc4834b6ea scatterlock: convert [un]scatter_wanted to a bitfield
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-07-28 12:55:33 -07:00
Greg Farnum
579f2e92c5 mds: Handle unscatter_wanted in try_eval(lock, need_issue)
commit:dac1dc83ee5598ca97c29cd5d0b12150685cd05b added handling
for scatter_wanted, but we need to handle unscatter_wanted here too.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-07-28 12:55:33 -07:00
Greg Farnum
f5f6b120ad mds: Split the CInode::scatter_wanted field in two
We use this field to indicate we want a scatter or an unscatter. Make
that distinction explicit.
Also, clear the unscatter_wanted in simple_lock when we start a gather!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-07-28 12:55:33 -07:00
Sage Weil
3d9621febf heartbeatmap: fix mode
Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 10:11:00 -07:00
Sage Weil
8e4a35884b heartbeatmap: warn if previous deadline is missed
This will generate missed deadline noise in the log that may otherwise be
missed by an infrequent heartbeat_interval.  We generally want to know if
deadlines are missed, but we don't necessarily need to touch the heartbeat
file every second.  This gets us both.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 10:10:51 -07:00
Sage Weil
a9813336b1 ceph_context: only wake up periodically if heartbeat_interval is set
Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 09:50:53 -07:00
Sage Weil
6eb213d34b osd: no need to explicitly check health
The service thread does it now.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 09:49:24 -07:00
Sage Weil
9e8bb84e90 vstart: set heartbeat file
Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 09:49:23 -07:00
Sage Weil
7265e5cc20 ceph_context: check internal heartbeat in cct service thread
Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 09:49:23 -07:00
Sage Weil
31d5cbbbe3 heartbeatmap: config options, method to touch a file if healthy
Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 09:49:23 -07:00
Sage Weil
3dfe830e3b heartbeatmap: use atomic_t
Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 09:49:23 -07:00
Sage Weil
e68e4f3321 heartbeatmap: put in ceph namespace
Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 09:49:23 -07:00
Sage Weil
058647f9c2 heartbeatmap: simplify api
reset_timeout(), clear_timeout() makes more sense than "touch".

Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 09:49:23 -07:00
Sage Weil
7aad8f03e0 heartbeatmap: fix stupid race
atomic_t is probably better here, actually... :/

Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-28 09:49:23 -07:00