Commit Graph

14595 Commits

Author SHA1 Message Date
Colin Patrick McCabe
b255482354 obysnc: RgwStore: make sure destination users exist
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-25 12:58:39 -07:00
Colin Patrick McCabe
5d865fb6e7 obsync: fix DST_OWNER
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-25 12:36:37 -07:00
Yehuda Sadeh
73e28f2e8b rgw: return EACCES if acl xattr doesn't exist 2011-05-25 12:33:12 -07:00
Colin Patrick McCabe
ea76712ae3 obsync: Add boto_retries, remove rgw_store.prefix
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-25 12:05:15 -07:00
Colin Patrick McCabe
0adaa6b6ac rados python bindings: handle xattrs with NULL
Handle extended attributes that contain NULL bytes correctly, rather
than treating everything as zero-terminated C strings.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-25 11:01:16 -07:00
Samuel Just
d4bfd964fb PG: fix race in _activate_committed
Previously, _activate_committed would access the osdmap epoch racing
with handle_osd_map's osdmap update.  This would allow a message to be
sent from a replica to the primary tagged with the same epoch as
last_warm_restart, though the event actually occured before
last_warm_restart.  Thus the primary would fail to ignore the event and
transition to crashed.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-05-25 10:54:27 -07:00
Colin Patrick McCabe
7de7ba0012 RgwStore: fix some ACL issues
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-25 10:50:15 -07:00
Colin Patrick McCabe
3f5f562073 test-obysnc.py: support librgw testing
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-25 10:21:47 -07:00
Colin Patrick McCabe
e4e098ba94 Rename RadosStore to RgwStore
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-25 10:21:47 -07:00
Colin Patrick McCabe
17053739b4 test-obsync: refactor a little bit
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-25 10:21:47 -07:00
Colin Patrick McCabe
42f873e692 Proper ACL support for rados targets
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-25 10:21:47 -07:00
Sage Weil
0aa18f32e8 mds: do not shift to EXCL or MIX while rdlocked
There was an old change in file_eval() that was allowing us to switch from
SYNC to MIX or EXCL while there were rdlocks, which either caused lots of
lock thrashing or could (I think) hang things up completely.  This was
from ea10a672, an ancient fix for something related that appears to have
taken out the rdlocked check by accident.

In my tests (one writer, one stat-er), this took things from long stalls
(up to 20 seconds) to very responsive stats.  Yay!

Fixes: #791
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-25 09:38:06 -07:00
Sage Weil
fe955881a8 crushtool: clean up add-item a bit; don't add item to same bucket twice
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-24 21:14:59 -07:00
Sage Weil
dd89ff4420 crushtool: fix remove-item
Scan all buckets instead of doing a tree traverse.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-24 21:05:47 -07:00
Sage Weil
1c334d1aa7 radosgw_admin: update clitest
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-24 20:30:38 -07:00
Colin Patrick McCabe
ab01d74e91 mkcephfs.in: print out usage if no actions given
If the user didn't specify any actions, print out a usage message rather
than silently exiting.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-24 18:16:08 -07:00
Colin Patrick McCabe
f7ea7c989b rgw: Fix RGWAccess::init_storage_provider
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-24 17:53:49 -07:00
Sage Weil
c67dd164a4 mkcephfs: error out on bad usage
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-24 17:06:13 -07:00
Yehuda Sadeh
5532f897c7 make: fix build for rgw 2011-05-24 16:40:12 -07:00
Yehuda Sadeh
203a43bf2a rgw_admin: clean warning 2011-05-24 16:33:11 -07:00
Yehuda Sadeh
95c594f6c6 Merge commit 'origin/master' into rgw-multiuser 2011-05-24 15:30:17 -07:00
Yehuda Sadeh
ab278b4b08 rgw_admin: add key create 2011-05-24 14:29:50 -07:00
Yehuda Sadeh
bd0eb9a304 rgw_admin: subuser and key removal 2011-05-24 14:17:59 -07:00
Sage Weil
7330c3c473 journaler: tolerate ENOENT when prezeroing
ENOENT is okay and expected.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-24 13:16:21 -07:00
Colin Patrick McCabe
bb13c92a57 test_common.sh: skip rm before put
The rm before the put is unecessary and actually incorrect now.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-24 12:36:07 -07:00
Colin Patrick McCabe
e42736ae7e radostool: rados put should use write_full
If "rados put" uses write instead of write_full, the resulting object on
the server may be a mismash of old and new objects, if the old object
was longer than the new one. This is fairly counterintuitive behavior
for radostool, so remove it.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-24 12:34:56 -07:00
Colin Patrick McCabe
cfe372ec28 Merge branch 'wip_ceph_context' 2011-05-24 12:22:30 -07:00
Colin Patrick McCabe
9ff7cc7c37 Create a libcommon service thread
Create a libcommon service thread. Use it to handle SIGHUP.

Handle it by means of a flag that gets set. Using a queue would raise
the complicated question of what to do when the queue was full.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-24 12:21:02 -07:00
Sage Weil
2970268521 librados: len should be size_t
Unsigned, and size_t because it's a buffer size.

Fixes signedness warning in testrados.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-24 10:00:23 -07:00
Sage Weil
ce04e3dbaf osd: add ability to explicitly mark unfound as lost
Instead of automatically marking unfound objects lost (once we've tried
every location we can think of), do it when the administator explicitly
says to.  This avoids marking things wrong incorrectly when there are
peering issues, and also allows the administrator to decide whether there
may be offline osds that are worth bringing online.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-24 09:47:06 -07:00
Sage Weil
87309e946b osd: make automatically marking of unfound as lost optional
We may not want to do this automatically until we have more confidense in
the recovery code.  Even then, possible not.  In particular, the OSDs may
believe they have contact all possible homes for the data even though there
is some long-lost OSD that has the data on disk that if offline.

For now, we make the marking process explicit so that the administrator can
make the call.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-24 09:42:39 -07:00
Sage Weil
cea7b65182 mds: clean up get_or_create_stray
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-24 09:27:07 -07:00
Sage Weil
081acc4ce2 mds: initialize stray_index on startup
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-24 09:24:42 -07:00
Sage Weil
754cfaacb7 Merge branch 'stable' 2011-05-24 09:17:24 -07:00
Sage Weil
d66c6ca19b v0.28.1 2011-05-23 21:11:44 -07:00
Colin Patrick McCabe
9a660ac910 librads, libceph: store CephContext
Don't use the global g_ceph_context. Instead, store the CephContext in
the structures provided by the library user.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-23 17:28:32 -07:00
Colin Patrick McCabe
13aed89e48 Add CephContext
A CephContext represents the context held by a single library user.
There can be multiple CephContexts in the same process.

For daemons and utility programs, there will be only one CephContext.
The CephContext contains the configuration, the dout object, and
anything else that you might want to pass to libcommon with every
function call.

Move some non-config things out of md_config_t and into CephContext.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-23 17:28:27 -07:00
Colin Patrick McCabe
1c7b98212d Split common_init_daemonize from common_init_finish
Split off common_init_daemonize from common_init_finish. cfuse is a
daemon that calls common_init_finish, but handles daemonization itself.
This fixes cfuse.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-23 17:07:04 -07:00
Yehuda Sadeh
478c6bbcd1 rgw_admin: make interface a bit more explicit 2011-05-23 16:52:59 -07:00
Yehuda Sadeh
c167a28d73 rgw: subuser permissions 2011-05-23 15:12:48 -07:00
Sage Weil
6360154d79 mon: verify that crush max does not exceed osd max
- when injecting a new crushmap
- when adjusting osdmap max_osd

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-23 14:58:26 -07:00
Sage Weil
5d98280311 crushtool: add --reweight-item <name> <weight>
Reweight and individual item via crushtool.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-22 16:25:35 -07:00
Sage Weil
e9754d88ce osdmaptool: fail --import-crush if crush max_devices > osdmap max_osd
Crush will spew non-deterministic badness if it walks off the end of
the osd_weight vector.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-21 12:55:16 -07:00
Colin Patrick McCabe
3a2acefebd common_init: don't init crypto until after fork
Get rid of the initialize-then-shutdown-crypto hack. We just initialize
crypto once, after it is safe to do so. There is now a single callback,
common_init_finish, which does the final stage of initialization,
including starting crypto and daemonization (if required.)

common_init_finish needs to be done before messenger::start().

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-20 17:57:11 -07:00
Colin Patrick McCabe
35ee7e644d ceph_crypto: add assert_init
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-20 17:57:11 -07:00
Sage Weil
ba7ef84546 config: delete after new
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-20 18:16:49 -07:00
Sage Weil
4cc83a6876 crush: fix signedness warnings
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-20 17:10:15 -07:00
Yehuda Sadeh
5baef8f616 rgw_admin: able to create multiple keys/subusers 2011-05-20 16:46:14 -07:00
Sage Weil
cc1737bd81 crushtool: --remove-item name
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-20 16:45:41 -07:00
Sage Weil
9a14402a08 crush: fix tree bucket encoding
I wonder how long this has been broken!

Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-20 16:45:40 -07:00