Commit Graph

13046 Commits

Author SHA1 Message Date
Colin Patrick McCabe
713f9a11dd cconf: remove second argument to cconf --lookup
Everyone uses get_conf to get configuration values. So the logic for
defaulting to some value if we can't find the requested key should live
there. Also fix a case in cconf where we could encounter a usage error
and keep on going.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-23 10:17:30 -08:00
Colin Patrick McCabe
29b6439104 ceph_common.sh: remove get_val, get_val_bool
get_val and get_val_bool are unused.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-23 10:17:30 -08:00
Colin Patrick McCabe
431a5bf7c3 Rename config.h -> common/config.h
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-23 10:17:30 -08:00
Colin Patrick McCabe
f2e3d83886 config.cc: doesn't depend on ceph_ver.h
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-23 10:17:30 -08:00
Josh Durgin
96edddea9e testlibrbdpp: update for new librados and librbd APIs
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-02-23 10:17:25 -08:00
Josh Durgin
c5bb735038 rbd: update for new librados and librbd APIs
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-02-23 09:31:52 -08:00
Josh Durgin
134f261a0a librbd: implement stacking on top of librados
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-02-23 09:31:52 -08:00
Josh Durgin
b1d6e30e8c librados: add constructor to allow client re-use
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-02-23 09:31:52 -08:00
Josh Durgin
15f20f5b0e librados: switch to noun_verb function names
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-02-23 09:31:52 -08:00
Sage Weil
b2ceebf4e3 librbd: stack on top of librados 2011-02-23 09:31:52 -08:00
Colin Patrick McCabe
4df36436cb pybind: update rados python bindings for new API
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-22 09:27:40 -08:00
Sage Weil
950e8c3e80 librados: more API cleanup; rados_conf_ stubs
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-22 08:09:32 -08:00
Colin Patrick McCabe
1dc12e3e1d move g_default_file_layout into ceph_fs.cc
It's defined in ceph_fs.h.

Fix a bunch of headers that use types without including the headers that
define those types.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-22 08:09:32 -08:00
Sage Weil
2de8b7b812 librados: add cluster handle to C API
Had to add a layer of indirection to the list context handles.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-22 08:09:32 -08:00
Sage Weil
e4b8274241 osd: improve up_thru request behavior
There is some epoch the OSD wants for up_thru, based on when the PG mapping
last changed.  However, once the monitor gets to the point where it must
update the map, it should set up_thru to the most recent epoch the OSD has
seen (i.e. the epoch it is known to be "up thru"!).  This will hopefully/
frequently avoid any subsequent up_thru requests.

MOSDAlive already has a separate field (in PaxosServiceMessage) to hold the
latest epoch; just fix the constructor to set it properly, and make the
monitor use it.  No protocol change, yay!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-22 09:40:47 -08:00
Sage Weil
0e4e5a5b26 osd: set correct epoch for up_thru osd->mon request
Put the epoch we need for up_thru in the request.  Putting the most recent
epoch causes incorrect osdmap churn.

Fixes: #824
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-22 09:10:04 -08:00
Greg Farnum
158889b2e4 PGMap: make osd_full and nearfull ratios configurable.
These were previously set by #defines. Pretty stupid
when we have a nice config system already!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-02-22 09:11:12 -08:00
Sage Weil
0a96e6a73a Makefile: include ceph_argsparse.h in dist tarball
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-20 21:00:57 -08:00
Sage Weil
4ffe069859 filestore: fix clone_range
This was broken by the safe_write() switchover; the success return value
is now 0, not the number of bytes written.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-20 20:58:16 -08:00
Colin Patrick McCabe
2a59b2132f common: Split argument parsing into ceph_argparse
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-20 10:17:11 -08:00
Sage Weil
349cb12859 keyring_init: don't print error when explicit key/keyfile is specified
e.g. when I am non-root and specify a key explicitly, no need to complain
about not being able to read root's /etc/ceph/keyring.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-20 13:54:20 -08:00
Sage Weil
859aaf7836 Revert "keyring_init: g_conf.keyring is not a list"
This reverts commit 2fb6036aa5.
2011-02-20 13:52:15 -08:00
Colin Patrick McCabe
2fb6036aa5 keyring_init: g_conf.keyring is not a list
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-18 10:02:39 -08:00
Josh Durgin
b96f1642b4 Revert "Makefile.am: remove unused libs from linking with librbd tests and rbd"
Same problem as 38f38a9914.

This reverts commit e5db46cea0.
2011-02-18 16:01:10 -08:00
Colin Patrick McCabe
f51040ccd7 Clock: remove unused mutex
We don't use a mutex in g_clock any more, so let's not construct one any
more.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-18 08:40:26 -08:00
Greg Farnum
a7929c5e26 Merge branch 'pool_memory' 2011-02-18 15:42:16 -08:00
Greg Farnum
a2f0cd0d7b test: Add new memory tests, move to own subdir.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-02-18 15:41:41 -08:00
Greg Farnum
654dc79c3e vstart: remove directories, too.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-02-18 15:41:41 -08:00
Greg Farnum
eea1f098cc OSD: convert waiting_for_pg from hash_map to map.
This doesn't need to be a hash_map; there will only be an entry
for each PG that gets a message request while it's not active.
Shouldn't be too many PGs that that happens too, right?

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-02-18 15:41:41 -08:00
Greg Farnum
935eaf3a62 PG: remove the object locking stubs and some dead code.
These are unused (#if 0'd, so no way to use them!) and require
a memory-hogging hash_map. Goodbye!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-02-18 15:41:41 -08:00
Greg Farnum
f49909ba27 PG: convert hash_maps to maps, remove unused.
waiting_for_[missing|degraded]_object don't need to be
hash_maps, and we don't use stat_object_temp_rd at all.
Swap to map and remove to reduce per-PG memory consumption!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-02-18 15:41:41 -08:00
Colin Patrick McCabe
5db1e50db3 debug.h: cleanup includes
Shouldn't need to include DoutStreambuf.h; that's all implementation.
Don't include Mutex.h, since we don't use it.
*Do* include config.h, since we need it.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-18 07:36:06 -08:00
Colin Patrick McCabe
d362874e54 common: Move hex dump functions into hex.h
Move hex dump functions into hex.h. Remove unecessary includes from
debug.cc

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-18 06:35:47 -08:00
Colin Patrick McCabe
61b661b2f8 Makefile: version.cc should depend on ceph_ver
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-18 06:28:39 -08:00
Colin Patrick McCabe
ef0e07d993 debug.h: move Ceph version stuff into version.h
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-18 06:25:06 -08:00
Josh Durgin
38f38a9914 Revert "Makefile.am: remove unused libs from linking with librbd"
librados doesn't export ceph::buffer_total_alloc

This reverts commit 9bbd6c32a5.
2011-02-18 13:11:44 -08:00
Josh Durgin
eadc3c87cc testlibrbdpp: fix off by one error in read test
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-02-18 11:17:17 -08:00
Josh Durgin
e5db46cea0 Makefile.am: remove unused libs from linking with librbd tests and rbd
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-02-18 11:12:48 -08:00
Josh Durgin
9bbd6c32a5 Makefile.am: remove unused libs from linking with librbd
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-02-18 10:50:55 -08:00
Sage Weil
4231cef68f Merge remote branch 'origin/max_commit_size' 2011-02-17 23:06:13 -08:00
Colin Patrick McCabe
b56cafe492 pybind/rados: write_full: remove silly extra param
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-17 10:53:00 -08:00
Colin Patrick McCabe
3e4aaf9538 pybind/rados: implement Pool.write_full
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-17 10:48:07 -08:00
Josh Durgin
7171cf6873 librbd: hold image context lock minimally
Holding the image context lock during snapshot removal prevented the
client from responding to a notify, causing a deadlock. This could be
triggered by removing a snapshot while concurrently adding more to the
same image.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-02-17 17:32:10 -08:00
Colin Patrick McCabe
b93be8c612 pybind/rados: implement Pool::change_auid
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-17 10:24:22 -08:00
Colin Patrick McCabe
23df5ba370 pybind/rados: add rados.version
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-17 10:05:10 -08:00
Colin Patrick McCabe
8be3ad1256 pybind/rados: Add Rados.pool_exists
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-17 09:58:20 -08:00
Colin Patrick McCabe
09e01fa45f pybind/rados: Snap.name should be a py string
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-17 09:46:34 -08:00
Colin Patrick McCabe
aeac6a63a4 pybind/rados: add snapshots
Add snapshot lookup, iteration, creation, destruction interface.

Add test.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-17 09:38:11 -08:00
Colin Patrick McCabe
ae702b3e9a Add Pool::list_objects
Add a Pool::list_objects method. Add a test for this to pybind-test.py

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-17 06:46:08 -08:00
Colin Patrick McCabe
0a3798efbd Add pybind-test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-17 04:41:15 -08:00