Commit Graph

15851 Commits

Author SHA1 Message Date
Colin Patrick McCabe
77fed7b26c Formatter: add XMLFormatter::reset
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 15:26:41 -07:00
Colin Patrick McCabe
8b5cda57b8 Formatter.cc: whitespace fix
whitespace fix to conform to the coding standard

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 14:42:31 -07:00
Colin Patrick McCabe
8c4f729aa6 rgw:rename open_obj_section to open_object_section
For compatibility with common/Formatter.cc

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 14:41:02 -07:00
Colin Patrick McCabe
70f585c843 Add XMLFormatter and unit test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 14:30:31 -07:00
Colin Patrick McCabe
8003b77259 Formatter: remove protected data, methods
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 14:30:31 -07:00
Sage Weil
97b682215d osd, objecter, librados: add SRC_CMPXATTR operation
and test.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-02 14:20:36 -07:00
Sage Weil
acc8600c00 osd: change src_oid encoding -- FLAG DAY
The old encoding was mutually exclusive with putting any data payload on
the operation.  That was stupid.. we can't, for example, do xattr ops then
on a src_oid.

Fix this by just including the oid in the data payload inline whenever the
bit is set in the op code.  This changes the client protocol in an
incompatible way, which means users of the CLONERANGE operation need to be
upgrade/downgraded in unison.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-02 14:20:36 -07:00
Sage Weil
23a46f2830 testradospp: test cmpxattr (eq, str)
No coverage for the other tests yet.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-02 14:20:36 -07:00
Sage Weil
4fbdb9961d osd: fix cmpxattr string construction
The bufferlist may not contain a terminating '\0'.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-02 14:20:36 -07:00
Sage Weil
7401feaf6c objecter, osd: fix up cmpxattr
Objecter stubs, useful debug output.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-02 14:20:36 -07:00
Josh Durgin
83ad583c35 systest: add watch/notify tests with pool and object deletion
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-02 14:17:15 -07:00
Josh Durgin
602365e86c systest: st_rados_create_pool: optionally wait before creating the pool
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-02 14:17:15 -07:00
Josh Durgin
ee44761816 systest: add object deletion to mirror object creation
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-02 14:17:15 -07:00
Josh Durgin
cbaddc5967 systest: add st_rados_notify building block for watch/notify tests
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-02 14:17:15 -07:00
Josh Durgin
aa00e0dd2f systest: add st_rados_watch building block for watch/notify tests
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-02 14:17:15 -07:00
Josh Durgin
b8d7c2236f systest: make pool configurable
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-02 14:17:15 -07:00
Josh Durgin
e6ff13d878 systest: move pool deletion into its own file
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-02 14:17:15 -07:00
Josh Durgin
73c8e81c08 librados: fix notify deadlock
The success of the notify call needs to checked before waiting to
receive a notification. If we try notifying on an object that does not
exist, for example, it should fail with -ENOENT, and not hang.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-02 14:17:15 -07:00
Josh Durgin
50d7684fee osd: document remove_watchers race avoidance
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-02 14:17:15 -07:00
Josh Durgin
945cdd4b67 pg: remove do_complete_notify
This method has no dependence on the pg.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-02 14:17:15 -07:00
Josh Durgin
8a8d9bf517 osd: put_object_context: tolerate pgs being deleted
PGs that are queued for deletion won't be in the osdmap,
and may not be in the pg_map, but if they are, it's safe to
put object_context. Otherwise, the pg is being deleted and
will clean up the object contexts itself.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-02 14:17:14 -07:00
Josh Durgin
3a6d8ebbb1 osd, pg: clean up watchers on pg deletion and shutdown
Watchers and their object contexts need to be cleaned up so
they aren't used after the pg is gone. This happened if the
pool was deleted and the connection to the watcher was reset.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-02 14:17:14 -07:00
Sage Weil
37dc931d2b mds: detach replay thread
Since we don't join it.

This fixes a leak of per-thread state.. namely, an ~8MB chunk of virtual
memory (and a handful of real pages).

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-02 11:40:16 -07:00
Sage Weil
43daec44eb thread: detach()
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-02 11:40:16 -07:00
Colin Patrick McCabe
6f39bb9366 common/Formatter: add unit test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 11:08:52 -07:00
Greg Farnum
09a35767fd mdsmon: send commands to all MDSes, not just the in&up ones.
Now we can send messages to standbys via broadcast, even if we
can't yet single them out.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-01 17:59:23 -07:00
Colin Patrick McCabe
3c77a45687 cephtool: accept semicolons in commandline args
Semicolons can now be used to give multiple arguments to cephtool in one
invocation. So a command like this is now possible:

$ ./ceph osd dump --format=json \; pg dump --format=json -o -

The backslash is to prevent the shell from consuming the semicolon.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-01 17:23:03 -07:00
Sage Weil
68a62911fa testradospp: add version tests
get_last_version
assert_version
assert_src_version

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-01 16:18:27 -07:00
Sage Weil
0df20a0569 librados: add assert_src_version
Like set_assert_version, this is an IoCtx operation that affects the next
(and only the next) operation we perform.

Factor out the current assert version check code into a helper that also
handles the src asserts.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-01 16:18:23 -07:00
Sage Weil
3a41aa556c objecter: add assert_src_version
as an ObjectOperation

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-01 16:18:23 -07:00
Sage Weil
a6d697e15c osd: add ASSERT_SRC_VERSION operation
Assert a src object has a particular version.  This is analogous to the
ASSERT_VER operation, but operations on a src_oid instead of the target.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-01 16:18:23 -07:00
Sage Weil
09059b73fc Merge branch 'stable' 2011-08-01 16:16:38 -07:00
Sage Weil
dcaca3e358 osd: set reply_version for read operations
This was probably broken by the OSD prepare_transaction refactor a few
months ago.  Or it never worked.  Adding test to testradospp.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-01 16:16:22 -07:00
Sage Weil
a42a2481c8 Merge remote branch 'origin/objecter-latest-map' 2011-08-01 13:35:23 -07:00
Yehuda Sadeh
c06260f754 rgw: quiet down some log messages 2011-08-01 13:25:37 -07:00
Colin Patrick McCabe
e5dfa3dda3 escape_json_attr: don't escape single quotes
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-01 11:42:22 -07:00
Colin Patrick McCabe
1d3acd5d55 Formatter.cc: use common/escape.h
* Rename rgw/rgw_escape.h to common/escape.h

* Use escape.h in common/Formatter.cc

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-01 11:24:04 -07:00
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
Josh Durgin
94239eca03 objecter: rename POOL_DISAPPEARED to POOL_DNE
The pool may never have existed.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-07-29 15:38:26 -07:00
Josh Durgin
9447ce64c8 objecter: check for updated osdmap when requesting a non-existent pool
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-07-29 15:38:26 -07:00
Josh Durgin
6833f2f7d5 objecter: fix error check - error return code is negative
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-07-29 15:38:26 -07:00
Josh Durgin
178c463b46 monclient: add method to retrieve the latest version of a map
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-07-29 15:38:26 -07:00
Josh Durgin
9efd3a5456 mon: add GetVersion message
This allows clients to determine whether they have the latest
mds, mon, or osd map. This is useful for figuring out if a pool
does not exist, or if the osdmap with it simply hasn't been
received yet.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-07-29 15:38:25 -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