]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agomount.ceph: put static at the beginning of decl
Colin Patrick McCabe [Wed, 2 Feb 2011 17:44:13 +0000 (09:44 -0800)]
mount.ceph: put static at the beginning of decl

To squash a gcc warning.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotools/gui.cc: remove empty else statement
Colin Patrick McCabe [Wed, 2 Feb 2011 17:42:51 +0000 (09:42 -0800)]
tools/gui.cc: remove empty else statement

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomon/OSDMonitor: don't check if unsigned < 0
Colin Patrick McCabe [Wed, 2 Feb 2011 17:37:27 +0000 (09:37 -0800)]
mon/OSDMonitor: don't check if unsigned < 0

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd/OSD: remove always-true assert
Colin Patrick McCabe [Wed, 2 Feb 2011 17:36:46 +0000 (09:36 -0800)]
osd/OSD: remove always-true assert

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconst-ify some unchanging static structs
Colin Patrick McCabe [Thu, 3 Feb 2011 12:10:22 +0000 (04:10 -0800)]
const-ify some unchanging static structs

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw/rgw_rest.cc: fix uninitialized static struct
Colin Patrick McCabe [Wed, 2 Feb 2011 17:27:59 +0000 (09:27 -0800)]
rgw/rgw_rest.cc: fix uninitialized static struct

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosdc/Filer: assert(0) on stat error
Colin Patrick McCabe [Wed, 2 Feb 2011 17:01:50 +0000 (09:01 -0800)]
osdc/Filer: assert(0) on stat error

Remove broken error handling code and replace with an assert(0) and a
TODO.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoclient/fuse_ll: fully initialize callback struct
Colin Patrick McCabe [Wed, 2 Feb 2011 16:30:30 +0000 (08:30 -0800)]
client/fuse_ll: fully initialize callback struct

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds/locks: fully initialize lock states
Colin Patrick McCabe [Wed, 2 Feb 2011 16:28:42 +0000 (08:28 -0800)]
mds/locks: fully initialize lock states

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosdc/ObjectCacher.h: don't assert unsigned >= 0
Colin Patrick McCabe [Wed, 2 Feb 2011 16:26:16 +0000 (08:26 -0800)]
osdc/ObjectCacher.h: don't assert unsigned >= 0

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoClient::readdir_r_cb: fix "always returns true"cmp
Colin Patrick McCabe [Wed, 2 Feb 2011 16:25:33 +0000 (08:25 -0800)]
Client::readdir_r_cb: fix "always returns true"cmp

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agodirect_io_test: fix signed/unsigned, printf flags
Colin Patrick McCabe [Wed, 2 Feb 2011 14:54:04 +0000 (06:54 -0800)]
direct_io_test: fix signed/unsigned, printf flags

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agosrc/config.cc: fully initialize g_default_file_layout
Colin Patrick McCabe [Wed, 2 Feb 2011 14:53:37 +0000 (06:53 -0800)]
src/config.cc: fully initialize g_default_file_layout

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocrush/builder.c: fix signed/unsigned confusion
Colin Patrick McCabe [Wed, 2 Feb 2011 13:41:07 +0000 (05:41 -0800)]
crush/builder.c: fix signed/unsigned confusion

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoinclude/buffer.h:unsigned variables are always >=0
Colin Patrick McCabe [Wed, 2 Feb 2011 12:41:10 +0000 (04:41 -0800)]
include/buffer.h:unsigned variables are always >=0

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'master' of ssh://ceph.newdream.net/git/ceph
Colin Patrick McCabe [Thu, 3 Feb 2011 11:53:29 +0000 (03:53 -0800)]
Merge branch 'master' of ssh://ceph.newdream.net/git/ceph

14 years agoRGW: RGW::GetObj - signed/unsigned bug
Samuel Just [Wed, 2 Feb 2011 22:25:09 +0000 (14:25 -0800)]
RGW: RGW::GetObj - signed/unsigned bug

get_obj returns an int, len is unsigned

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoRGW: fix ret in RGWCopyObj::init_common
Samuel Just [Wed, 2 Feb 2011 20:03:52 +0000 (12:03 -0800)]
RGW: fix ret in RGWCopyObj::init_common

int ret shadows RGWCopyObj::ret.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoRGW: fix shadowed variable error
Samuel Just [Wed, 2 Feb 2011 20:01:22 +0000 (12:01 -0800)]
RGW: fix shadowed variable error

int ret and bool ret shadow this->ret, setting ret before the goto
therefore had no effect in these cases.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoRGW: get_service_secret returns a bool, not an int
Samuel Just [Wed, 2 Feb 2011 20:00:00 +0000 (12:00 -0800)]
RGW: get_service_secret returns a bool, not an int

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoRBD.cc: pread returns a signed value
Samuel Just [Wed, 2 Feb 2011 22:19:42 +0000 (14:19 -0800)]
RBD.cc: pread returns a signed value

The check for len < 0 here always returned true since len is uint64_t.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoMerge branch 'objecter_balance_reads'
Colin Patrick McCabe [Wed, 2 Feb 2011 12:25:34 +0000 (04:25 -0800)]
Merge branch 'objecter_balance_reads'

14 years agoFix base64-decoding when input ends in newline.
Tommi Virtanen [Wed, 2 Feb 2011 19:02:14 +0000 (11:02 -0800)]
Fix base64-decoding when input ends in newline.

It used to return -EINVAL because it thought the end was not aligned
to 4 bytes.

Clean up superfluous src < end test in if, the while itself guarantees
that.

14 years agoFix inner loop index variable. i and j are too close together ;)
Tommi Virtanen [Wed, 2 Feb 2011 17:59:49 +0000 (09:59 -0800)]
Fix inner loop index variable. i and j are too close together ;)

Before this fix, j would keep increasing well beyond in_len,
and lead to segfaults.

14 years agoosd: Fix compile-time warning.
Greg Farnum [Wed, 2 Feb 2011 17:57:14 +0000 (09:57 -0800)]
osd: Fix compile-time warning.

store is properly initialized inside a try block, but the
compiler doesn't notice that and so thinks it may be used
uninitialized. So initialize it to be NULL.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: Remove unused variable.
Greg Farnum [Wed, 2 Feb 2011 17:54:45 +0000 (09:54 -0800)]
mds: Remove unused variable.

Fixes compile complaint. Was made useless in commit
6d29fc66326ff40443ac465c84d6f7bddf3cee4f.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agorados: Make rados tool "put" objects in chunks.
Greg Farnum [Wed, 2 Feb 2011 17:51:33 +0000 (09:51 -0800)]
rados: Make rados tool "put" objects in chunks.

Defaults to 4MB, but can be configured.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: Remove redundant cap suppression code.
Greg Farnum [Tue, 1 Feb 2011 20:42:59 +0000 (12:42 -0800)]
mds: Remove redundant cap suppression code.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoSpeling fixes
Chris Dunlop [Wed, 2 Feb 2011 05:38:54 +0000 (05:38 +0000)]
Speling fixes

Trivial spelling fixes...

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoImprove mount.ceph.8
Chris Dunlop [Wed, 2 Feb 2011 06:02:10 +0000 (06:02 +0000)]
Improve mount.ceph.8

Seeing as I was wondering what "rbytes" might be, I guess others might
too...

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomonitorstore: check return values
Sage Weil [Wed, 2 Feb 2011 05:08:34 +0000 (21:08 -0800)]
monitorstore: check return values

And use open(2) instead of fopen.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: check return values in dumper
Sage Weil [Wed, 2 Feb 2011 05:07:55 +0000 (21:07 -0800)]
mds: check return values in dumper

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoconfutils: check return values
Sage Weil [Wed, 2 Feb 2011 05:07:45 +0000 (21:07 -0800)]
confutils: check return values

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoos: use scoped variables for fds
Colin Patrick McCabe [Tue, 1 Feb 2011 19:08:56 +0000 (11:08 -0800)]
os: use scoped variables for fds

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest: add test_csyn
Colin Patrick McCabe [Tue, 1 Feb 2011 18:49:28 +0000 (10:49 -0800)]
test: add test_csyn

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocsyn: implement localize_reads cmdline option
Colin Patrick McCabe [Tue, 1 Feb 2011 18:14:05 +0000 (10:14 -0800)]
csyn: implement localize_reads cmdline option

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: change unfound handling when using localize
Colin Patrick McCabe [Tue, 1 Feb 2011 14:22:02 +0000 (06:22 -0800)]
osd: change unfound handling when using localize

Change how cosd handles unfound objects when doing operations with
localize_reads. Specifically, don't wait for unfound objects unless we
are the primary for the relevant PG.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoHadoop: set localize_reads
Colin Patrick McCabe [Mon, 31 Jan 2011 18:45:58 +0000 (10:45 -0800)]
Hadoop: set localize_reads

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocfuse: add --localize-reads argument
Colin Patrick McCabe [Mon, 31 Jan 2011 12:12:58 +0000 (04:12 -0800)]
cfuse: add --localize-reads argument

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibceph: iface for CEPH_OSD_FLAG_LOCALIZE_READS
Colin Patrick McCabe [Fri, 28 Jan 2011 17:32:50 +0000 (09:32 -0800)]
libceph: iface for CEPH_OSD_FLAG_LOCALIZE_READS

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobjecter: implement FLAG_LOCALIZE_READS
Sage Weil [Mon, 20 Dec 2010 23:47:25 +0000 (15:47 -0800)]
objecter: implement FLAG_LOCALIZE_READS

Read from a local replica, if any.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoobjecter: send read to random replica if BALANCE_READS flag is set
Sage Weil [Mon, 20 Dec 2010 23:44:40 +0000 (15:44 -0800)]
objecter: send read to random replica if BALANCE_READS flag is set

The flag is just an existing one; we may want to rename.

This assumes the OSD will discard any request sent prior to any change in
the PG acting set.  We need to make sure the OSD behavior matches.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoFileStore: fix double close
Samuel Just [Tue, 1 Feb 2011 21:48:39 +0000 (13:48 -0800)]
FileStore: fix double close

curr_fd is already closed if cp == cur_seq.  This second close
occasionally ended up closing another thread's fd.  The next open would
tend to grab that fd in op_fd or current_fd which would then get closed
by the other thread leaving op_fd or current_fd pointing to some random
file (or a closed descriptor).

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agocommon: config.cc: use "admin" as the default id
Colin Patrick McCabe [Tue, 1 Feb 2011 18:54:35 +0000 (10:54 -0800)]
common: config.cc: use "admin" as the default id

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: move init_g_conf into md_config_t ctor
Colin Patrick McCabe [Tue, 1 Feb 2011 17:18:31 +0000 (09:18 -0800)]
common: move init_g_conf into md_config_t ctor

Make sure that g_conf is initialized with default values before anything
else happens.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: config.cc: whitespace cleanup
Colin Patrick McCabe [Tue, 1 Feb 2011 17:21:18 +0000 (09:21 -0800)]
common: config.cc: whitespace cleanup

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: config.cc: de-globalize g_fake_kill_after
Colin Patrick McCabe [Tue, 1 Feb 2011 16:33:29 +0000 (08:33 -0800)]
common: config.cc: de-globalize g_fake_kill_after

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: config.cc: de-globalize show_config
Colin Patrick McCabe [Tue, 1 Feb 2011 16:13:27 +0000 (08:13 -0800)]
common: config.cc: de-globalize show_config

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: clean up g_conf.id initialization a bit
Colin Patrick McCabe [Tue, 1 Feb 2011 16:06:12 +0000 (08:06 -0800)]
common: clean up g_conf.id initialization a bit

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: remove ceph_set_default_id
Colin Patrick McCabe [Tue, 1 Feb 2011 14:23:12 +0000 (06:23 -0800)]
common: remove ceph_set_default_id

ceph_set_default_id was only ever used to set the default ID to "admin",
which it already was.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoFileStore: fix error handling for mkfs, umount
Colin Patrick McCabe [Tue, 1 Feb 2011 11:30:04 +0000 (03:30 -0800)]
FileStore: fix error handling for mkfs, umount

In FileStore::umount: check if FDs are valid before closing them. Make
them invalid after closing them. Shut down FileStore::timer.

In FileStore::mkfs: always properly shutdown and free the filestore if
an error is encountered during mkfs. Check all functions that can fail.
Print out error messages on failures.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: make --dump-journal preserve offset
Sage Weil [Tue, 1 Feb 2011 17:28:15 +0000 (09:28 -0800)]
mds: make --dump-journal preserve offset

Suggest user use tar -S to preserve sparseness.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agogitignore: ignore eclipse metadata
Sage Weil [Tue, 1 Feb 2011 05:10:18 +0000 (21:10 -0800)]
gitignore: ignore eclipse metadata

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoremove ancient active/ stuff
Sage Weil [Tue, 1 Feb 2011 05:09:15 +0000 (21:09 -0800)]
remove ancient active/ stuff

14 years agoosd: don't leak fd on error
Sage Weil [Tue, 1 Feb 2011 04:58:47 +0000 (20:58 -0800)]
osd: don't leak fd on error

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agocrypto: don't clobber errno
Sage Weil [Tue, 1 Feb 2011 04:55:51 +0000 (20:55 -0800)]
crypto: don't clobber errno

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge remote branch 'origin/ostimeo'
Sage Weil [Tue, 1 Feb 2011 00:24:12 +0000 (16:24 -0800)]
Merge remote branch 'origin/ostimeo'

14 years agoMerge branch 'mds_reset'
Sage Weil [Sun, 30 Jan 2011 05:34:05 +0000 (21:34 -0800)]
Merge branch 'mds_reset'

Fixes: #602
14 years agoMerge remote branch 'origin/stable'
Sage Weil [Sun, 30 Jan 2011 05:17:06 +0000 (21:17 -0800)]
Merge remote branch 'origin/stable'

Conflicts:
src/osd/OSD.cc

14 years agoOSD: update_osd_stat take heartbeat_lock
Samuel Just [Fri, 28 Jan 2011 22:07:47 +0000 (14:07 -0800)]
OSD: update_osd_stat take heartbeat_lock

Previously update_osd_stat had a race with code modifying heartbeat_from
causing the iterator increment to occasionally segfault.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agomds: skip a few more inodes during journal reset
Sage Weil [Sat, 29 Jan 2011 00:56:22 +0000 (16:56 -0800)]
mds: skip a few more inodes during journal reset

To be safe...

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: implement journal reset
Sage Weil [Sat, 29 Jan 2011 00:25:31 +0000 (16:25 -0800)]
mds: implement journal reset

This basically works.  Remaining issues:
 - mydir and root inodes are recreated from scratch but need to be
   reconciled with what's committed (outside the old journal)
 - ?

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: open mydir (along w/ root) inode from boot_start()
Sage Weil [Sat, 29 Jan 2011 00:36:14 +0000 (16:36 -0800)]
mds: open mydir (along w/ root) inode from boot_start()

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoLocker: Drop loner correctly!
Greg Farnum [Sat, 29 Jan 2011 00:44:50 +0000 (16:44 -0800)]
Locker: Drop loner correctly!

Our previous check for if we want to drop the loner was incorrect.
Now, it's fixed. Resolves a serious bug with inode write access.

Reported-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoLocker: Drop loner correctly!
Greg Farnum [Sat, 29 Jan 2011 00:44:50 +0000 (16:44 -0800)]
Locker: Drop loner correctly!

Our previous check for if we want to drop the loner was incorrect.
Now, it's fixed. Resolves a serious bug with inode write access.

Reported-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agolibrados: fix C interface const, too.
Greg Farnum [Thu, 27 Jan 2011 00:25:59 +0000 (16:25 -0800)]
librados: fix C interface const, too.

See 561224e95d6c66661d1bd6dce0e3d9da6f4a7e13

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: defer sending resolves until mdsmap.failed.empty()
Sage Weil [Fri, 28 Jan 2011 20:35:38 +0000 (12:35 -0800)]
mds: defer sending resolves until mdsmap.failed.empty()

There is no point sending resolves while there are still failed nodes,
since we can't complete.  We also trigger an assert if we try to send to
a failed node.  Instead just wait until failed.empty() and then start.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: defer sending resolves until mdsmap.failed.empty()
Sage Weil [Fri, 28 Jan 2011 20:35:38 +0000 (12:35 -0800)]
mds: defer sending resolves until mdsmap.failed.empty()

There is no point sending resolves while there are still failed nodes,
since we can't complete.  We also trigger an assert if we try to send to
a failed node.  Instead just wait until failed.empty() and then start.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: standardize option parsing
Sage Weil [Fri, 28 Jan 2011 17:45:33 +0000 (09:45 -0800)]
mds: standardize option parsing

- Use the standard macros.
- Simply --hot-standby and --journal-check options (always specify rank).
- Update usage().

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocommon: _dout_lock: initialize _dout_lock first
Colin Patrick McCabe [Fri, 28 Jan 2011 17:05:08 +0000 (09:05 -0800)]
common: _dout_lock: initialize _dout_lock first

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconfig: remove dead stringtable cruft
Sage Weil [Fri, 28 Jan 2011 23:23:41 +0000 (15:23 -0800)]
config: remove dead stringtable cruft

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoos: FileStore: Add commit timeout
Colin Patrick McCabe [Thu, 27 Jan 2011 17:05:24 +0000 (09:05 -0800)]
os: FileStore: Add commit timeout

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorbd: Rados::init: clean up after failure
Colin Patrick McCabe [Fri, 28 Jan 2011 11:59:13 +0000 (03:59 -0800)]
rbd: Rados::init: clean up after failure

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoos: FileStore: ctor should init all class vars
Colin Patrick McCabe [Thu, 27 Jan 2011 16:34:53 +0000 (08:34 -0800)]
os: FileStore: ctor should init all class vars

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoos: FileStore: remove default param
Colin Patrick McCabe [Thu, 27 Jan 2011 16:25:27 +0000 (08:25 -0800)]
os: FileStore: remove default param

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoos:FileStore:use std::string rather than huge bufs
Colin Patrick McCabe [Thu, 27 Jan 2011 15:37:44 +0000 (07:37 -0800)]
os:FileStore:use std::string rather than huge bufs

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: fix mutual exclusion for _dispatch
Sage Weil [Fri, 28 Jan 2011 09:24:49 +0000 (01:24 -0800)]
osd: fix mutual exclusion for _dispatch

We want only one thread dispatching messages (either new or requeued), so
that we can preserve ordering.  Previously we weren't doing so for all
callers of do_waiters (tick() and the first in ms_dispatch()).

This fixes osd_sub_op(_reply) ordering problems that trigger the
now-famous repop queue assert.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge remote branch 'origin/health2' into unstable
Sage Weil [Fri, 28 Jan 2011 05:33:28 +0000 (21:33 -0800)]
Merge remote branch 'origin/health2' into unstable

14 years agounits: add signals unit test
Colin Patrick McCabe [Thu, 27 Jan 2011 12:45:29 +0000 (04:45 -0800)]
units: add signals unit test

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: cluster_fail instead of reset_cluster
Sage Weil [Thu, 27 Jan 2011 16:47:48 +0000 (08:47 -0800)]
mds: cluster_fail instead of reset_cluster

Mark all cluster members as failed, and blacklist.  Do not force up/failed
ranks to stopped, as that requires the admin to do other trickery.  This
keeps the cluster fail orthogonal to any journal discard/reset.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: add mdsmap DOWN flag to prevent mdsmap updates
Sage Weil [Thu, 27 Jan 2011 16:34:16 +0000 (08:34 -0800)]
mon: add mdsmap DOWN flag to prevent mdsmap updates

This is intended to be set while doing critical cluster manipulation to
avoid cmds instances from starting up and getting added to the map.

Require it be set for cluster_reset.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomdsmap: add flags
Sage Weil [Thu, 27 Jan 2011 16:24:52 +0000 (08:24 -0800)]
mdsmap: add flags

Convert unused client_epoch field to flags to avoid a protocol change. It
is always 0 on current clusters.  Lucky us!

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: add 'mds reset_cluster' command
Sage Weil [Thu, 27 Jan 2011 16:15:23 +0000 (08:15 -0800)]
mon: add 'mds reset_cluster' command

Reset an MDS cluster back to a single node.  The idea is:

 - wipe out mds journals
 - maybe set recovery flag
 - mds reset_cluster (this)

Then mds0 only recover from an (empty) journal.  Other MDS nodes would only
rejoin the cluster later.

See: #602
Signed-off-by: Sage Weil <sage@newdream.net>
14 years ago.gitignore: vstart generated files
Sage Weil [Thu, 27 Jan 2011 15:54:28 +0000 (07:54 -0800)]
.gitignore: vstart generated files

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agovstart: put tmp files in /tmp
Sage Weil [Thu, 27 Jan 2011 15:53:44 +0000 (07:53 -0800)]
vstart: put tmp files in /tmp

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: preserve ordering when ops are requeued
Sage Weil [Wed, 26 Jan 2011 18:06:49 +0000 (10:06 -0800)]
osd: preserve ordering when ops are requeued

Requeue ops under osd_lock to preserve ordering wrt incoming messages.
Also drain the waiter queue when ms_dispatch takes the lock before calling
_dispatch(m).

Fixes: #743
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: restart if the osdmap client, heartbeat, OR cluster addrs don't match
Sage Weil [Tue, 25 Jan 2011 23:28:49 +0000 (15:28 -0800)]
osd: restart if the osdmap client, heartbeat, OR cluster addrs don't match

If we somehow get ourselves into a situation where the OSDMap addresses do
not match our actual addresses, restart and try again.  This is still
possible if multiple MOSDBoot messages end up in flight in the monitor,
say due to a monitor disconnect/reconnect, and we race with something that
marks us down in the map.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: avoid extraneous send_boot() calls
Sage Weil [Tue, 25 Jan 2011 23:04:06 +0000 (15:04 -0800)]
osd: avoid extraneous send_boot() calls

Only send_boot() on osdmap update if we are restarting.  Otherwise we can
end up with too many MOSDBoot messages in flight and the monitor may
apply an old one instead of a new one.  For example:

- cosd starts
- send_boot with address set A
- get an osdmap update
- send_boot again with address set A
- get an osdmap update.  now we're up.
- get osdmap update, now we're marked down,
- bind to address set B
- send_boot with address set B

and the monitor may apply the second MOSDBoot (with adddress set A).

This results in an online OSD using a cluster address that differs from
that in the OSDMap.  Which causes problems with peering, among other
things.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agotest_unfound.sh: kill cosds rather than mark out
Colin Patrick McCabe [Wed, 26 Jan 2011 17:29:39 +0000 (09:29 -0800)]
test_unfound.sh: kill cosds rather than mark out

For this test, we need to kill cosds rather than mark them as out.
Otherwise, we cannot force objects to become unfound.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agodisable scrubs during test_unfound
Colin Patrick McCabe [Tue, 25 Jan 2011 11:00:29 +0000 (03:00 -0800)]
disable scrubs during test_unfound

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrados: Remove rados_pool_t& usage, and pointless consts.
Greg Farnum [Wed, 26 Jan 2011 22:05:35 +0000 (14:05 -0800)]
librados: Remove rados_pool_t& usage, and pointless consts.

For some reason when I wrote this I passed rados_pool_t by reference
in some functions instead of by value. It's just a void*, so this is
silly.
Also silly, some of the passed-by-value rados_pool_ts were declared
to be const. WTF?

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomon: implement PGMonitor::get_health
Colin Patrick McCabe [Wed, 26 Jan 2011 14:11:01 +0000 (06:11 -0800)]
mon: implement PGMonitor::get_health

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomon: OSDMonitor::get_health: const cleanup
Colin Patrick McCabe [Wed, 26 Jan 2011 13:54:10 +0000 (05:54 -0800)]
mon: OSDMonitor::get_health: const cleanup

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomon: MonitorStore::mkfs: use run_cmd
Colin Patrick McCabe [Wed, 26 Jan 2011 13:47:28 +0000 (05:47 -0800)]
mon: MonitorStore::mkfs: use run_cmd

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoos: FileStore: use run_cmd instead of system
Colin Patrick McCabe [Wed, 26 Jan 2011 11:27:36 +0000 (03:27 -0800)]
os: FileStore: use run_cmd instead of system

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agocommon: Add run_cmd
Colin Patrick McCabe [Wed, 26 Jan 2011 11:27:15 +0000 (03:27 -0800)]
common: Add run_cmd

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoReplicatedPG: _rollback_to fix the just cloned condition
Samuel Just [Tue, 25 Jan 2011 21:58:36 +0000 (13:58 -0800)]
ReplicatedPG: _rollback_to fix the just cloned condition

_rollback_to in the case that head was just cloned and that clone
includes snapid does not need to do anything.  Previously, snapid would
have to match the snap on the clone, but the condition should be that
snapid is contained within the clone's snaps set.

This bug was introduced in e189222f06ee287eeb6fd7f46cff7a6727806dea

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agomon: remove PGMap::pg_set
Colin Patrick McCabe [Tue, 25 Jan 2011 17:40:18 +0000 (09:40 -0800)]
mon: remove PGMap::pg_set

We don't need an additional data structure to hold the keys to pg_stat.
We can just look at the keys of pg_stat.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomon: PGMap::apply_incremental must maintain pg_set
Colin Patrick McCabe [Tue, 25 Jan 2011 16:58:59 +0000 (08:58 -0800)]
mon: PGMap::apply_incremental must maintain pg_set

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoos: readdir_r: read into PATH_MAX-sized buf
Colin Patrick McCabe [Tue, 25 Jan 2011 15:09:06 +0000 (07:09 -0800)]
os: readdir_r: read into PATH_MAX-sized buf

Fix the readdir_r uses in FileStore.cc

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>