Commit Graph

14075 Commits

Author SHA1 Message Date
Greg Farnum
474be6591c mds: don't daemonize when doing journal reset.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-22 16:20:11 -07:00
Josh Durgin
625e785138 rbd: rename kernel add/remove to map/unmap
Unmap takes a device now, and uses the major number
to find the right sequence number in sysfs.

Also updated the man page.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-04-22 15:31:34 -07:00
Josh Durgin
f5e2033185 Merge remote branch 'origin/next' 2011-04-22 13:39:07 -07:00
Josh Durgin
c87fc69679 rbd: add commands for manipulating the kernel sysfs interface
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-04-22 13:34:12 -07:00
Josh Durgin
9869859650 mount.ceph: use common implementations of secret handling and address resolving
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-04-22 13:34:12 -07:00
Josh Durgin
2ff3c82bbf addr_parsing: use strtok_r to be safe
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-04-22 13:34:12 -07:00
Josh Durgin
def36668a1 addr_parsing: rename mount_resolve_dest to resolve_addrs and don't modify its argument
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-04-22 13:34:12 -07:00
Josh Durgin
bffb9edfd0 addr_parsing: move implementation out of header
Also include missing headers and make it linkable with C,
since it's duplicated from mount.ceph.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-04-22 13:34:12 -07:00
Josh Durgin
20719c7a5e rbd: use rados' init_with_config because we already called common_init
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-04-22 13:34:12 -07:00
Josh Durgin
4cc88f628c common, mount.ceph: move functions for working with secrets into secret.h
Use sprintf instead of safe_cat, since we're just writing a string once.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-04-22 13:34:12 -07:00
Sage Weil
88ebb304be Merge remote branch 'origin/next' 2011-04-22 12:30:37 -07:00
Sage Weil
cb8237e10c testlibrbd: fix signed/unsigned comparisons
testlibrbd.c: In function 'write_test_data':
testlibrbd.c:191: warning: comparison between signed and unsigned integer expressions
testlibrbd.c: In function 'aio_read_test_data':
testlibrbd.c:207: warning: comparison between signed and unsigned integer expressions
testlibrbd.c: In function 'read_test_data':
testlibrbd.c:222: warning: comparison between signed and unsigned integer expressions

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-22 11:37:44 -07:00
Sage Weil
8cd3f1cd25 osd: drop 'casdata' bucket by default
We don't use it for anything.  It just means we create a bunch of useless
PGs.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-22 11:37:44 -07:00
Greg Farnum
00ffafa821 cmds: make journal-check mode run in the foreground.
daemonize does a bunch of stuff we don't want to do.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-21 17:34:38 -07:00
Greg Farnum
804a6d6c0f mds: massage handling of oneshot-replay.
We accidentally broke it in our last round of changes to support
standby-replay; patch it up again.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-21 17:10:46 -07:00
Greg Farnum
7979fa5cbf OSDMon: make the defaults in reweight-by-utilization work.
an oload <= 100 fails out; set the new default to 120.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-21 13:18:51 -07:00
Sage Weil
8109f74591 testlibrbd: fix signed/unsigned comparisons
testlibrbd.c: In function 'write_test_data':
testlibrbd.c:191: warning: comparison between signed and unsigned integer expressions
testlibrbd.c: In function 'aio_read_test_data':
testlibrbd.c:207: warning: comparison between signed and unsigned integer expressions
testlibrbd.c: In function 'read_test_data':
testlibrbd.c:222: warning: comparison between signed and unsigned integer expressions

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-20 20:50:48 -07:00
Sage Weil
c80593729f osd: drop 'casdata' bucket by default
We don't use it for anything.  It just means we create a bunch of useless
PGs.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-20 20:50:44 -07:00
Colin Patrick McCabe
4e21db6ef9 auth: const cleanup
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-20 15:16:00 -07:00
Colin Patrick McCabe
1421d70daf obysnc: use python2.5 compatible exception syntax
Apparently using "as" in "except" blocks is a new (and not
backwards-compatible) thing in Python 2.6.x. Who knew?

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-20 14:35:09 -07:00
Colin Patrick McCabe
e209db4a69 PGMonitor: unregister the config obs in ~PGMonitor
Using the new unregister call, unregister the config observer in
~PGMonitor.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-20 13:49:21 -07:00
Colin Patrick McCabe
527ecd4d0a config: add remove_observer
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-20 13:38:27 -07:00
Greg Farnum
3d97c33bea PGMon: use the config observer framework
We now register observers on mon_osd_full_ratio and nearfull_ratio
to update the OSD full/nearfull lists.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-20 13:54:56 -07:00
Greg Farnum
f940ee86a9 ProfLogger: add NULL to KEYS in the config observer.
I believe that without the null pointer it will overrun into
uninitialized memory.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-20 13:51:50 -07:00
Greg Farnum
0e8284168e config: add comment clarifying virtual destructor.
Just in case anybody else is like me and gets confused.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-20 13:51:01 -07:00
Greg Farnum
7dc5a7f9aa PGMap: fill in full OSD sets on decode.
Previously these sets were only modified when applying an incremental,
which might have caused problems when restarting monitors. Whoops!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-20 10:58:23 -07:00
Sage Weil
07f287c680 Merge remote branch 'origin/classdist' 2011-04-19 21:55:50 -07:00
Colin Patrick McCabe
8ebbd60a86 conf: reopen proflogger on conf change
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-19 17:59:31 -07:00
Colin Patrick McCabe
6e49c06ca9 conf: add observer framework
Objects can now register as configuration observers interested in a
subset of the configuration keys. The observers will be told exactly
which keys have changed.

The first user is dout, which now no longer needs the infamous SIGHUP
hack to know when to reopen the config file.

librados: Remove rados_reopen_log, which was basically a means for the
library user to trigger the SIGHUP behavior.

Changes are accumulated and applied all at once by apply_changes. This
function is called as part of common_init, and after every call to
injectargs.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-19 17:28:00 -07:00
Sage Weil
36f0068563 cauthtool: -C not -c in man page
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-19 15:33:16 -07:00
Colin Patrick McCabe
433deec0c9 dout: make dout a member of md_config_t
Since logging options are per-config, logically DoutStreambuf instances
should also be per-config. This also allows us to eliminate the
"if (uninitialized)" checks at the beginning of every call to dout.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-19 15:03:26 -07:00
Colin Patrick McCabe
9a38acf08d dout: remove DOUTSB_FLAG_STDOUT
This was used to implement log_to_stdout, but that doesn't exist any
more. Instead of we have log_to_stderr and the other stuff.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-19 15:03:26 -07:00
Greg Farnum
0b6a023f5f PGMap: add redo_full_sets() function for when ratios change.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-19 15:02:58 -07:00
Greg Farnum
515c767798 osdmon: Clean up debug output on map full flag.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-19 14:55:43 -07:00
Greg Farnum
a2613f8274 PGMap: add [near]full_ratio to the Incremental and encoding.
This way these ratios can be distributed by map updates.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-19 14:55:43 -07:00
Greg Farnum
af92e8bfcd PGMap: always decode pg_remove.
pg_remove has been included for longer than we've had versions
in the struct, so this check for end is useless -- if pg_remove
wasn't encoded we're already broken by decoding the version at
the beginning.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-19 14:55:43 -07:00
Sage Weil
f9056d0d9f osd: better debug output on replay completion
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-19 14:32:56 -07:00
Sage Weil
634dfc90c8 mkcephfs: allow a prebuild osdmap to be specified
Otherwise we'll create one with osdmaptool --createsimple with the default
generic settins.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-19 14:13:02 -07:00
Tommi Virtanen
ad71955a21 cfuse, mds, dout: Do not create "rank" symlinks for log files.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-19 13:57:14 -07:00
Sage Weil
4428d1ec3b Revert "Revert "autoconf: Complain if tcmalloc is not found.""
This reverts commit 05c281bfa9.

This should be okay now.
2011-04-19 12:05:36 -07:00
Tommi Virtanen
f6179fc375 debian: Handle missing tcmalloc on Debian lenny.
lenny doesn't have a suitable libgoogle-perftools-dev, and
release.sh edits it out of build-deps. Detect that and tell
configure that not having tcmalloc is ok.

This should make 05c281bfa9
unnecessary.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-19 12:05:32 -07:00
Tommi Virtanen
0d98a62ce2 debian: Build without tcmalloc on non-i386/amd64.
This is not strictly needed as of 05c281bfa9,
but that reverting is hopefully only temporary.

Without this, with 05c281 undone, non-mainstream architectures
would fail to build.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-19 12:05:29 -07:00
Sage Weil
bd7922a10a remove old debian build helper scripts.
This is now handled by ceph-build.git

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-19 11:59:46 -07:00
Sage Weil
7c04f81ca1 mon: remove class distribution infrastructure
This is now the admin's job.  Removes a lot of code with limited testing
and coverage.

We rev the internal monitor protocol because the state machine ids changed.
This should not affect the on-disk format. Just stop and restart all the
monitors at once during the upgrade.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-19 11:33:34 -07:00
Sage Weil
deb0ee9048 osd: move ClassHandler.{cc,h} to osd/
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-19 11:11:51 -07:00
Sage Weil
964a0a6e13 osd: load classes from a fixed location off disk
Simplify the class loading code to just load out of a local directory.
Do not request classes from the monitor.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-19 11:09:54 -07:00
Colin Patrick McCabe
54284c0aef common: add environment.cc/environment.h
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-19 10:28:16 -07:00
Sage Weil
d55399ffec mds: remove MDSlaveUpdate from list on deletion
These are added to the LogSegment list on the slaves, but also need to be
removed from that list when we replay a COMMIT|ROLLBACK or when the op's
fate is determined during the resolve stage.

This fixes a crash like

./include/elist.h: In function 'elist<T>::item::~item() [with T =
MDSlaveUpdate*]', in thread '0x7fb2004d5700'
./include/elist.h: 39: FAILED assert(!is_on_list())
 ceph version 0.26 (commit:9981ff90968398da43c63106694d661f5e3d07d5)
 1: (MDSlaveUpdate::~MDSlaveUpdate()+0x59) [0x4d9fe9]
 2: (ESlaveUpdate::replay(MDS*)+0x422) [0x4d2772]
 3: (MDLog::_replay_thread()+0xb90) [0x67f850]
 4: (MDLog::ReplayThread::entry()+0xd) [0x4b89ed]
 5: (()+0x7971) [0x7fb20564a971]
 6: (clone()+0x6d) [0x7fb2042e692d]
 ceph version 0.26 (commit:9981ff90968398da43c63106694d661f5e3d07d5)
 1: (MDSlaveUpdate::~MDSlaveUpdate()+0x59) [0x4d9fe9]
 2: (ESlaveUpdate::replay(MDS*)+0x422) [0x4d2772]
 3: (MDLog::_replay_thread()+0xb90) [0x67f850]
 4: (MDLog::ReplayThread::entry()+0xd) [0x4b89ed]
 5: (()+0x7971) [0x7fb20564a971]

Fixes: #1019
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-19 09:25:30 -07:00
Colin Patrick McCabe
87def518dd common_init: move version printout to common_init
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-18 17:54:29 -07:00
Colin Patrick McCabe
ae0f5f03a6 interval_set: slightly better API for erase
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-18 17:32:16 -07:00