Commit Graph

16019 Commits

Author SHA1 Message Date
Yehuda Sadeh
e478e92d06 rgw: fix 500 error on bucket creation 2011-08-25 11:11:17 -07:00
Sage Weil
9538e87e06 rgw: fix clitest 2011-08-24 17:32:07 -07:00
Colin Patrick McCabe
5fb216e05a MonClient: fix possible null dereference
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 17:20:35 -07:00
Colin Patrick McCabe
2488e446ca mds/Server.c: fix memory leak in err path
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 17:20:35 -07:00
Yehuda Sadeh
44c68b1c61 rgw: don't check for zero content when creating a bucket 2011-08-24 17:07:32 -07:00
Yehuda Sadeh
94fefce5ea rgw: rgw_admin bucket stats dumps owner 2011-08-24 17:01:04 -07:00
Yehuda Sadeh
0b1ad60830 rgw: add radosgw_admin bucket stats 2011-08-24 16:41:34 -07:00
Colin Patrick McCabe
53b3e1463d librados: fix memory leak in error path
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 15:51:38 -07:00
Colin Patrick McCabe
94af6a4c87 test/confutils.cc: fix resource leak
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 15:46:22 -07:00
Yehuda Sadeh
2ba01bbb8b rgw: fix prepare_get_obj when ENOENT 2011-08-24 15:02:48 -07:00
Colin Patrick McCabe
ebae5a727b rbd: fix shared_ptr usage
shared_ptr calls the disposal function even when the pointer is null
that is being disposed of.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 14:50:26 -07:00
Colin Patrick McCabe
57fd56cf10 do_kernel_showmapped: fix resource leak
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 14:43:08 -07:00
Sage Weil
d34743da5e Merge remote branch 'origin/next' 2011-08-24 14:40:42 -07:00
Sage Weil
d69aa5909e client: fix readdir + cap recovation/reissue race
The current race:
 - we start readdir
 - mds revokes dir cap
 - some file gets removed
 - mds reissues dir cap
 - we finish readdir and set I_COMPLETE

We should only set it if there have been no FILE_SHARED reissues during
the readdir.

Note that we still set I_COMPLETE even if we don't have the cap; that's
useless but harmless, since it is undefined without FILE_SHARED being
set.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-24 14:38:25 -07:00
Colin Patrick McCabe
a1afa6d7d1 rados_sync: fix resource leak on err
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 14:15:04 -07:00
Colin Patrick McCabe
ad1b2b0cad CephBroker.cc: fix allocation/deallocation mismatch
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 14:15:04 -07:00
Colin Patrick McCabe
2e1f2c1d18 test_rados_tool.sh: test export with --workers
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 14:15:04 -07:00
Colin Patrick McCabe
6fd4f3a138 rados_sync: make number of worker threads configurable
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 14:15:03 -07:00
Yehuda Sadeh
76718b0854 rgw: clear warning 2011-08-24 13:17:20 -07:00
Yehuda Sadeh
1a0027413b Merge branch 'wip-decouple-bucket' 2011-08-24 12:29:32 -07:00
Sage Weil
e9b739f8dd journaler: fix waiting_for_zero clearing, again
We can only clear this when we have >= a period between flush_pos and
write_pos.

Clear the flag in _do_flush() so the check is not fragile, should this
ever be changed in the future.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-24 11:01:00 -07:00
Sage Weil
23d94a4c5a Revert "pipe.c: #define GNU_SOURCE"
This reverts commit ae9ba2249e.

This is handled in master by the Makefile.
2011-08-24 09:38:09 -07:00
Sage Weil
c2e4047a88 Merge branch 'next' 2011-08-24 09:38:01 -07:00
Sage Weil
6c6fa6dffd client: only link directories into hierarchy once
Directories can only link into the hierarchy once.  We assert as much
in readdir_r_cb().  Fix link() so that it unlinked the directory from the
old location when relinking somewhere new.  Be careful to do this after
we take inode refs to avoid any unpleasantness.

Fixes: #1429
Reported-by: Sam Lang <samlang@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-24 09:31:22 -07:00
Sage Weil
eaaefece77 mon: fix store_state
We need to bound the range we write to disk by m->last_committed; this got
lost in translation in commit dfab2c91f5.

Fixes paxos crashes in handle_begin

mon/Paxos.cc: In function 'void Paxos::handle_begin(MMonPaxos*)', in thread '0x7fc74d11f700'
mon/Paxos.cc: 393: FAILED assert(begin->last_committed == last_committed)

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-24 09:10:23 -07:00
Sage Weil
ba44cdebcd journaler: fix waiting_for_zero clearing
Clear this flag only if we know no subsequent flushes could be waiting on
a prezero operation.

Fixes MDS journaling hang under heavy journal load.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-24 09:10:23 -07:00
Yehuda Sadeh
d630693b58 Merge branch 'master' into wip-decouple-bucket 2011-08-23 18:53:10 -07:00
Yehuda Sadeh
2144c7a4f9 add missing include, required for certain environments 2011-08-23 18:52:35 -07:00
Yehuda Sadeh
190b89364c Merge remote-tracking branch 'origin/master' into wip-decouple-bucket
Conflicts:
	src/rgw/rgw_rados.cc
2011-08-23 18:52:08 -07:00
Yehuda Sadeh
adf1efe9a9 rgw: fix multipart upload
don't try to reset meta object with category
2011-08-23 18:33:12 -07:00
Colin Patrick McCabe
1a7eac4d82 parallelize rados export and import
* use workqueues to parallelize rados export and import

* Put export and import into separate files

* Fix RADOS_SYNC_TMP_SUFFIX_LEN bug

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-23 18:12:26 -07:00
Colin Patrick McCabe
b76e054bc0 WorkQueue: don't be chatty about finishing workers
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-23 18:12:26 -07:00
Colin Patrick McCabe
b20f3622b0 test_rados_tool.sh: fix xattr test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-23 18:12:26 -07:00
Colin Patrick McCabe
32694765f8 librados: fix IoCtx copy constructor
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-23 18:12:26 -07:00
Colin Patrick McCabe
d81d458064 rados_sync:don't need to declare CHANGED_XATTRS 2x
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-23 18:12:26 -07:00
Colin Patrick McCabe
31bf064b6e Some fixes to double-dash support, fix warning
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-23 18:12:06 -07:00
Yehuda Sadeh
301ae6c58d rgw: if pool is empty recreate 2011-08-23 18:06:02 -07:00
Colin Patrick McCabe
eecf4d6175 ceph_argparse: handle double dashes consistently
Handle double dashes in the ceph_argparse functions, so that any piece
of code doing argument parsing will correctly interpret them.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-23 16:30:03 -07:00
Colin Patrick McCabe
18ec5655fe injectargs: binary flags only consume 1 token
Never consume more than one token when parsing a binary flag.

Basically, your choices are --foo=false, --foo=true, and just --foo.
However, only 1 token will ever be examined.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-23 15:46:07 -07:00
Colin Patrick McCabe
42a65b8d69 config: print warning on injectargs parse fail
injectargs should print a warning message when its parser fails.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-23 15:46:07 -07:00
Colin Patrick McCabe
084fe47f3c injectargs test: test foo=true
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-23 15:46:07 -07:00
Sage Weil
ddc567429d mon: allow wildcards for mon cap command matching
We need wildcards, actually.  * is any token, ... is 1 or more tokens.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-23 15:24:44 -07:00
Colin Patrick McCabe
3432729397 common/config: fix get_val for booleans
md_config_t::get_val should return true/false for booleans, not 0/1.
This is for consistency with the setter.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-23 14:26:49 -07:00
Colin Patrick McCabe
ae9ba2249e pipe.c: #define GNU_SOURCE
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-23 14:12:15 -07:00
Sage Weil
9c498e0f1e qa: add unit tests for mon cap 'allow command ...' stanzas
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-23 14:03:47 -07:00
Sage Weil
6c3d8103bf mon: whitelist individual commands in mon cap string
This lets you whitelist a command prefix.  For example,

 'allow command osd foo'

will let you do any command that begins with 'osd foo', including
'osd foo' and 'osd foo bar baz bam'.

No deny, and no pattern matching.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-23 13:56:46 -07:00
Sage Weil
ea0f2f301e mon: adjust max_devices when adding to crush map
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-23 12:59:02 -07:00
Sage Weil
58f98e7afc crush: refuse to add item >= max_devices
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-23 12:58:46 -07:00
Sage Weil
dc2be1d87e mon: 'osd gstcrushmap' or 'osd crush set' both work
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-23 12:47:17 -07:00
Sage Weil
a4f32ba73f mon: fix arg count checks
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-23 12:47:04 -07:00