]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agorbd: set default pool when none is specified
Josh Durgin [Thu, 22 Sep 2011 22:39:58 +0000 (15:39 -0700)]
rbd: set default pool when none is specified

096e3b6353e5035362cffdcbd2e4a4f5572aa2ba broke this by only using
set_pool_image_name for commands that accept the snapshot
parameter. This whole undocumented format parsing should be reworked
or removed at some point.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agomount.ceph: use ":/" instead of just ":" as ip/path delimiter
Sage Weil [Thu, 22 Sep 2011 21:46:56 +0000 (14:46 -0700)]
mount.ceph: use ":/" instead of just ":" as ip/path delimiter

This is tolerant of colons in the mount subdir.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agotest/rados-api/test.cc: Add ability to set client id
Samuel Just [Tue, 20 Sep 2011 00:50:10 +0000 (17:50 -0700)]
test/rados-api/test.cc: Add ability to set client id

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agotest/test_stress_watch.cc: added simple watch stress test
Samuel Just [Mon, 19 Sep 2011 23:27:03 +0000 (16:27 -0700)]
test/test_stress_watch.cc: added simple watch stress test

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoPG: set log.backlog to false on corrupt log
Samuel Just [Thu, 22 Sep 2011 16:46:12 +0000 (09:46 -0700)]
PG: set log.backlog to false on corrupt log

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agovstart: debug filestore = 20
Sage Weil [Wed, 21 Sep 2011 23:26:57 +0000 (16:26 -0700)]
vstart: debug filestore = 20

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix PG::copy_after vs backlog
Sage Weil [Wed, 21 Sep 2011 22:46:37 +0000 (15:46 -0700)]
osd: fix PG::copy_after vs backlog

If you call copy_after(..., 0) on a log with a backlog, you get all the
backlog entries, but no backlog flag.  That's invalid.  You either need
the _complete_ backlog + the flag, or no backlog entries; getting only
some of them is useless information.

Make copy_after stop when it hits the tail.  Callers who need the backlog
are already checking for that and copying the whole log as appropriate.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix traverse snap vs forward check
Sage Weil [Wed, 21 Sep 2011 18:39:03 +0000 (11:39 -0700)]
mds: fix traverse snap vs forward check

This should compare against the forward attempt, not retry attempt.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorbd: fix progress redraw
Sage Weil [Wed, 21 Sep 2011 18:23:21 +0000 (11:23 -0700)]
rbd: fix progress redraw

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agodoc: Content for Getting Started with cephfs and rbd.
Tommi Virtanen [Wed, 21 Sep 2011 21:55:11 +0000 (14:55 -0700)]
doc: Content for Getting Started with cephfs and rbd.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Content for Getting Started with RADOS.
Tommi Virtanen [Wed, 21 Sep 2011 20:43:32 +0000 (13:43 -0700)]
doc: Content for Getting Started with RADOS.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Structure for Getting Started.
Tommi Virtanen [Wed, 21 Sep 2011 18:55:37 +0000 (11:55 -0700)]
doc: Structure for Getting Started.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Separate key management from mounting.
Tommi Virtanen [Wed, 21 Sep 2011 00:02:15 +0000 (17:02 -0700)]
doc: Separate key management from mounting.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Move config reference to top-level.
Tommi Virtanen [Tue, 20 Sep 2011 23:57:36 +0000 (16:57 -0700)]
doc: Move config reference to top-level.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Split data placement into concrete operations and recommendations.
Tommi Virtanen [Tue, 20 Sep 2011 23:39:54 +0000 (16:39 -0700)]
doc: Split data placement into concrete operations and recommendations.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Reorganize ops/manage/
Tommi Virtanen [Tue, 20 Sep 2011 23:33:20 +0000 (16:33 -0700)]
doc: Reorganize ops/manage/

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Move recommendations under /rec.
Tommi Virtanen [Tue, 20 Sep 2011 22:59:07 +0000 (15:59 -0700)]
doc: Move recommendations under /rec.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Move ops/grow under ops/manage.
Tommi Virtanen [Tue, 20 Sep 2011 22:51:16 +0000 (15:51 -0700)]
doc: Move ops/grow under ops/manage.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Split manage into multiple pages.
Tommi Virtanen [Tue, 20 Sep 2011 22:47:44 +0000 (15:47 -0700)]
doc: Split manage into multiple pages.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Split install into multiple pages.
Tommi Virtanen [Tue, 20 Sep 2011 22:45:08 +0000 (15:45 -0700)]
doc: Split install into multiple pages.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Clean reStructuredText syntax.
Tommi Virtanen [Tue, 20 Sep 2011 22:22:01 +0000 (15:22 -0700)]
doc: Clean reStructuredText syntax.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoMerge branch 'stable'
Sage Weil [Wed, 21 Sep 2011 20:37:45 +0000 (13:37 -0700)]
Merge branch 'stable'

14 years agoclient: tear down dir when setting I_COMPLETE on empty
Sage Weil [Wed, 21 Sep 2011 17:10:54 +0000 (10:10 -0700)]
client: tear down dir when setting I_COMPLETE on empty

If the dir is supposed to be empty and we are setting I_COMPLETE, empty
it out and close it.  This ensures we don't return bad results on a
subsequent readdir().

_Maybe_ related to #1509.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorados: accept '-b' as an argument.
Greg Farnum [Wed, 21 Sep 2011 16:50:29 +0000 (09:50 -0700)]
rados: accept '-b' as an argument.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agov0.35 v0.35
Sage Weil [Wed, 21 Sep 2011 16:36:14 +0000 (09:36 -0700)]
v0.35

14 years agoMakefile: include config_opts.h
Sage Weil [Wed, 21 Sep 2011 16:46:32 +0000 (09:46 -0700)]
Makefile: include config_opts.h

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge branch 'master' of github.com:NewDreamNetwork/ceph
Greg Farnum [Wed, 21 Sep 2011 16:42:41 +0000 (09:42 -0700)]
Merge branch 'master' of github.com:NewDreamNetwork/ceph

14 years agoosd: set reply version for dup requests
Sage Weil [Mon, 19 Sep 2011 23:50:48 +0000 (16:50 -0700)]
osd: set reply version for dup requests

If we get a dup request, set the version in the reply.  That means the
client knows the client was successful and committed, and they know the
version.  They don't get anything else (e.g., data payload resulting from
mutations).

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoauth: keyring: whitespace
Sage Weil [Wed, 21 Sep 2011 16:28:48 +0000 (09:28 -0700)]
auth: keyring: whitespace

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: make fsync vs sync threshold configurable
Sage Weil [Wed, 21 Sep 2011 16:28:38 +0000 (09:28 -0700)]
mon: make fsync vs sync threshold configurable

If mon+osd+client are on the same machine, sync() can deadlock.  Setting it
to 0 disables the big sync.  And the cutoff is now tunable.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: remove unused MonitorStore::sync()
Sage Weil [Wed, 21 Sep 2011 16:26:37 +0000 (09:26 -0700)]
mon: remove unused MonitorStore::sync()

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomkcephfs: create /var/run/ceph (or wherever pid_file and admin_socket live)
Sage Weil [Wed, 21 Sep 2011 00:02:04 +0000 (17:02 -0700)]
mkcephfs: create /var/run/ceph (or wherever pid_file and admin_socket live)

Fixes: #1546
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocconf: do not common_init_finish
Sage Weil [Wed, 21 Sep 2011 00:01:38 +0000 (17:01 -0700)]
cconf: do not common_init_finish

All that common_init_finish() does is indicate that we're done initializing
and we're allowed to start up extra threads and do the wonky things that
daemons like to do (like set up the admin socket).  Since cconf is just
examining the config, we don't want to do any of that.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorbd: error out gracefully when snapname specified for command that doesn't use it
Sage Weil [Tue, 20 Sep 2011 23:24:18 +0000 (16:24 -0700)]
rbd: error out gracefully when snapname specified for command that doesn't use it

Fixes: #1545
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: 'osd set pool <foo> crush_ruleset <num>'
Sage Weil [Tue, 20 Sep 2011 23:17:51 +0000 (16:17 -0700)]
mon: 'osd set pool <foo> crush_ruleset <num>'

You can set the crush rule on pool creation.  Let people change existing
pool rulesets too.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoOSD: return NULL when the OSD does not have the pg in lookup_lock_raw_pg
Samuel Just [Tue, 20 Sep 2011 20:34:31 +0000 (13:34 -0700)]
OSD: return NULL when the OSD does not have the pg in lookup_lock_raw_pg

Previously, we returned NULL if the osd lacked the pool, but not if the
osd had the pool and lacked the pg.  In that case, the assert in
_lookup_lock_pg would crash the osd.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoReplicatedPG: populate obc watchers on sub_op_push
Samuel Just [Tue, 20 Sep 2011 17:50:07 +0000 (10:50 -0700)]
ReplicatedPG: populate obc watchers on sub_op_push

Previously, obc->unconnected_watchers did not get filled in during
sub_op_push.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoosd: remove throttle_op_queue()
Sage Weil [Tue, 20 Sep 2011 17:58:20 +0000 (10:58 -0700)]
osd: remove throttle_op_queue()

There are subtle annoying problems with throttling and requeueing, and
throttling at this particular point in the stack makes little sense
anyway.  We have

 - messenger queue.  throttled based on total bytes/payload
 - op_queue, throttled before we queue items.

There is no real value in throttling a message before checking whether it
is valid (sent to the right osd, etc.) or putting it on the op_queue,
where it will sit until a worker thread picks it up and processes it.

When we get an osd_map, for instance, we pause op_queue, requeue
everything on the op_queue for reprocessing, and do the map update, so
not having a load of messages on that queue doesn't hurt us.  It just
complicates requeueing in the throttle_op_queue case, and delays the
checks for non-existent PGs or misdirected requests.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: preserve ordering when throttling races with missing/degraded requeue
Sage Weil [Tue, 20 Sep 2011 01:23:10 +0000 (18:23 -0700)]
osd: preserve ordering when throttling races with missing/degraded requeue

When we delay an op because the op_queue is full, we can violate the op
order:

 - op1 comes in, waits because object is missing
 - op2 comes in, throttles on op queue
 - op1 is requeued (no longer missing)
 - queue drains, op2 happens
 - op1 happens

To avoid this, if we delay, requeue ourselves... after whatever else is
on the queue.

Fixes: #1490
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: set reply version for dup requests
Sage Weil [Mon, 19 Sep 2011 23:50:48 +0000 (16:50 -0700)]
osd: set reply version for dup requests

If we get a dup request, set the version in the reply.  That means the
client knows the client was successful and committed, and they know the
version.  They don't get anything else (e.g., data payload resulting from
mutations).

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoCDir: put delete with pop so we don't read free'd memory in output
Greg Farnum [Mon, 19 Sep 2011 21:09:44 +0000 (14:09 -0700)]
CDir: put delete with pop so we don't read free'd memory in output

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoosd: clear need_up_thru in build_prior as appropriate
Sage Weil [Mon, 19 Sep 2011 21:00:59 +0000 (14:00 -0700)]
osd: clear need_up_thru in build_prior as appropriate

The only time need_up_thru is cleared is in the Peering state AdvMap
handler, but it doesn't get called if prior_set_affected() and we go
into build_prior().  Build_prior() sets need_up_thru if it's needed, but
it doesn't clear it if its not, which means the pg never goes active.

Reported-by: Sam Lang <samlang@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge branch 'wip-flock'
Greg Farnum [Mon, 19 Sep 2011 17:40:45 +0000 (10:40 -0700)]
Merge branch 'wip-flock'

14 years agoflock: clean up waiting records of a lock when adding it succeeds
Greg Farnum [Mon, 19 Sep 2011 16:48:13 +0000 (09:48 -0700)]
flock: clean up waiting records of a lock when adding it succeeds

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoflock: add a replay parameter to add_lock
Greg Farnum [Mon, 19 Sep 2011 16:47:37 +0000 (09:47 -0700)]
flock: add a replay parameter to add_lock

Only insert locks into the waiting lost when NOT replaying
an already-attempted lock.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoceph_common.sh: Do not sudo to root unless needed
Tommi Virtanen [Mon, 19 Sep 2011 16:47:11 +0000 (09:47 -0700)]
ceph_common.sh: Do not sudo to root unless needed

Using do_root_cmd() doesn't really need to sudo to root
if you're already root.

Commit 71dc75bdafe62a098c0493ad62f2d0d2a6ca7946 causes a regression:
when system "foo" has a sudoers config that requires a tty,
init-ceph now fails like this:
  sudo: sorry, you must have a tty to run sudo

when it is invoked by root with something like this:
   ssh foo /etc/init.d/init-ceph start

Signed-off-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoflock: move operator<<() to flock header, remove extra line
Greg Farnum [Mon, 19 Sep 2011 16:37:40 +0000 (09:37 -0700)]
flock: move operator<<() to flock header, remove extra line

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoflock: remove doubled debug output
Greg Farnum [Mon, 19 Sep 2011 16:20:10 +0000 (09:20 -0700)]
flock: remove doubled debug output

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agofix .gitignore for test_addrs
Sage Weil [Mon, 19 Sep 2011 01:30:37 +0000 (18:30 -0700)]
fix .gitignore for test_addrs

14 years agotest/test_addrs: unit tests for addr parsing
Sage Weil [Sat, 17 Sep 2011 22:19:40 +0000 (15:19 -0700)]
test/test_addrs: unit tests for addr parsing

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoRemove various unused variables
Wido den Hollander [Sat, 17 Sep 2011 14:25:36 +0000 (16:25 +0200)]
Remove various unused variables

Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomsgr: parse ipv6 addresses without []'s
Sage Weil [Sat, 17 Sep 2011 04:59:46 +0000 (21:59 -0700)]
msgr: parse ipv6 addresses without []'s

inet_pton() is annoying.  Be less lazy and work around it.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agodoc/dev/logs.rst: Add performance counter writeup
Colin Patrick McCabe [Fri, 16 Sep 2011 21:58:59 +0000 (14:58 -0700)]
doc/dev/logs.rst: Add performance counter writeup

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agodoc: Add section about changing config values
Colin Patrick McCabe [Fri, 16 Sep 2011 21:58:28 +0000 (14:58 -0700)]
doc: Add section about changing config values

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: use target obj locator for source object if empty
Yehuda Sadeh [Fri, 16 Sep 2011 18:18:03 +0000 (11:18 -0700)]
osd: use target obj locator for source object if empty

14 years agoconf: allow ; as a list separator
Sage Weil [Wed, 14 Sep 2011 19:59:22 +0000 (12:59 -0700)]
conf: allow ; as a list separator

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge branch 'wip-1477'
Colin Patrick McCabe [Wed, 14 Sep 2011 23:05:42 +0000 (16:05 -0700)]
Merge branch 'wip-1477'

14 years agoMake g_conf constant for all conf variable types
Colin Patrick McCabe [Wed, 14 Sep 2011 22:25:28 +0000 (15:25 -0700)]
Make g_conf constant for all conf variable types

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconst-ify integer config values
Colin Patrick McCabe [Wed, 14 Sep 2011 21:54:35 +0000 (14:54 -0700)]
const-ify integer config values

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconfig: define config vars once in config_opts.h
Colin Patrick McCabe [Wed, 14 Sep 2011 20:31:56 +0000 (13:31 -0700)]
config: define config vars once in config_opts.h

Rather than defining configuration variables twice, define them once in
config_opts.h. This makes it easier to work with them.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoinit-ceph.in: change init script status output
Samuel Just [Wed, 14 Sep 2011 18:13:00 +0000 (11:13 -0700)]
init-ceph.in: change init script status output

Per Kyle Bader's suggestion: add $name: to the status output.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoFileStore: use config observers
Colin Patrick McCabe [Fri, 9 Sep 2011 18:11:44 +0000 (11:11 -0700)]
FileStore: use config observers

Use config observers to avoid thread-safety and performance problems in
FileStore.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocfuse.cc: use apply_changes API
Colin Patrick McCabe [Fri, 9 Sep 2011 16:32:47 +0000 (09:32 -0700)]
cfuse.cc: use apply_changes API

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotestmsgr.cc: use set_val / apply_changes
Colin Patrick McCabe [Fri, 9 Sep 2011 16:30:17 +0000 (09:30 -0700)]
testmsgr.cc: use set_val / apply_changes

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd/OSD.cc: use set_val / apply_changes API
Colin Patrick McCabe [Fri, 9 Sep 2011 16:28:18 +0000 (09:28 -0700)]
osd/OSD.cc: use set_val / apply_changes API

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agodoc: Typo.
Tommi Virtanen [Wed, 14 Sep 2011 17:41:36 +0000 (10:41 -0700)]
doc: Typo.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoFix double dash handling
Colin Patrick McCabe [Wed, 14 Sep 2011 16:53:47 +0000 (09:53 -0700)]
Fix double dash handling

Several functions examine argv in order to set options. Only the last
argument parsing pass should remove the '--' from the argument vector.
If it is removed earlier than that, entries may be parsed as options,
when that was not the user's intent.

This changes fixes the common argument parsing loops so that they do not
remove the double dash. It also rearranges some programs so that the
user's argument parsing loop comes last, rather than coming before the
common argument parsing loops.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds/MDS.cc: don't crash on bad injectargs
Colin Patrick McCabe [Tue, 13 Sep 2011 23:19:31 +0000 (16:19 -0700)]
mds/MDS.cc: don't crash on bad injectargs

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agodoc: Instructions how to build RPMs.
Tommi Virtanen [Wed, 14 Sep 2011 15:58:03 +0000 (08:58 -0700)]
doc: Instructions how to build RPMs.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Say "radosgw" not "rgw".
Tommi Virtanen [Tue, 13 Sep 2011 19:34:11 +0000 (12:34 -0700)]
doc: Say "radosgw" not "rgw".

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Shrinking of MDSes is not supported yet.
Tommi Virtanen [Tue, 13 Sep 2011 19:32:31 +0000 (12:32 -0700)]
doc: Shrinking of MDSes is not supported yet.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoMakefile.am: fix test_librbd
Yehuda Sadeh [Wed, 14 Sep 2011 07:08:40 +0000 (00:08 -0700)]
Makefile.am: fix test_librbd

14 years agoosd/OSD.cc: don't crash on incorrect injectargs
Colin Patrick McCabe [Tue, 13 Sep 2011 20:34:30 +0000 (13:34 -0700)]
osd/OSD.cc: don't crash on incorrect injectargs

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoPG: fix typo in PgPriorSet constructor
Samuel Just [Tue, 13 Sep 2011 21:40:27 +0000 (14:40 -0700)]
PG: fix typo in PgPriorSet constructor

down.insert(o) rather than down.insert(0)

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agotools: fix compile
Colin Patrick McCabe [Tue, 13 Sep 2011 20:40:21 +0000 (13:40 -0700)]
tools: fix compile

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoGet rid of silly unused parameter
Colin Patrick McCabe [Mon, 12 Sep 2011 22:47:24 +0000 (15:47 -0700)]
Get rid of silly unused parameter

Apparently we were passing a string to the function so it could do:
rs = rs;

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomonclient: reopen session on monmap change
Sage Weil [Tue, 13 Sep 2011 04:23:00 +0000 (21:23 -0700)]
monclient: reopen session on monmap change

If our cur_mon is removed from the monmap, reopen the session.  Do not
call _pick_new_mon() directly or we won't reset state, won't
reauthenticate, etc.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomonclient: use cur_con throughout
Sage Weil [Tue, 13 Sep 2011 04:07:54 +0000 (21:07 -0700)]
monclient: use cur_con throughout

We choose a monitor and open a connection in exactly two places.  Use
cur_con and cur_con->get_peer_addr() everywhere else.

Simplify and clean up handle_monmap a bit.

Also add an assert to catch #1534.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomsgr: send_keepalive to a Connection
Sage Weil [Tue, 13 Sep 2011 03:54:06 +0000 (20:54 -0700)]
msgr: send_keepalive to a Connection

This avoids the lookup, if we already have a reference.  Mirrors the
send_message() Connection variant.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agotest_librbd: remove unsigned/signed comparison
Greg Farnum [Mon, 12 Sep 2011 23:02:43 +0000 (16:02 -0700)]
test_librbd: remove unsigned/signed comparison

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agolibrbd: Update .gitignore after moving to gtest.
Tommi Virtanen [Mon, 12 Sep 2011 22:14:03 +0000 (15:14 -0700)]
librbd: Update .gitignore after moving to gtest.

Commits e2ec946858b26788595b39e9da9dcc6ce9c78f73
and 5cb7b3729bfe139cbf15e9e8508a6661483964fe
changed the names of binaries created, ignore the
new name or "make distcheck" will whine.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoget_*_compat_set: get ctor param ordering right
Colin Patrick McCabe [Mon, 12 Sep 2011 21:25:17 +0000 (14:25 -0700)]
get_*_compat_set: get ctor param ordering right

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoPG: assemble backlog directly rather than queueing on corrupt log
Samuel Just [Mon, 12 Sep 2011 18:35:55 +0000 (11:35 -0700)]
PG: assemble backlog directly rather than queueing on corrupt log

The queue responsible for calling generate_backlog hasn't actually been
started at that stage of startup.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoqa: add test_librbd workunit
Sage Weil [Mon, 12 Sep 2011 17:58:44 +0000 (10:58 -0700)]
qa: add test_librbd workunit

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoRemove global ctors/dtors for CompatSet
Colin Patrick McCabe [Mon, 12 Sep 2011 18:32:03 +0000 (11:32 -0700)]
Remove global ctors/dtors for CompatSet

Instead of having global CompatSet objects, just have functions that can
return appropriate CompatSet objects. This avoids global constructor
and destructor ordering issues.

Fixes bug #1512

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrados: add conf_parse_env()
Sage Weil [Mon, 12 Sep 2011 17:56:37 +0000 (10:56 -0700)]
librados: add conf_parse_env()

With optional env var name, defaults to CEPH_ARGS.

Parse it for librados and librbd api gtests.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrbd: move c++ tests to gtest
Sage Weil [Mon, 12 Sep 2011 17:55:08 +0000 (10:55 -0700)]
librbd: move c++ tests to gtest

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrbd: convert C tests to gtest
Sage Weil [Mon, 12 Sep 2011 04:35:21 +0000 (21:35 -0700)]
librbd: convert C tests to gtest

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrbd: rev LIBRBD_VER_EXTRA for rbd_flush() addition
Sage Weil [Mon, 12 Sep 2011 03:14:01 +0000 (20:14 -0700)]
librbd: rev LIBRBD_VER_EXTRA for rbd_flush() addition

This allows qemu driver to conditionally call it if it exists.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrbd: implement rbd buffered write window
Sage Weil [Mon, 12 Sep 2011 02:19:32 +0000 (19:19 -0700)]
librbd: implement rbd buffered write window

Normal disks have a write cache and acknowledge writes before they reach
the platter.  Among other things, this masks write latency.  A flush
operation is needed when the user really cares that the writes are stable.

Implement a librbd write window that allows a window including the most
recent N bytes of writes to be immediately acked.  An flush operation
blocks while they are pushed out to disk.

This differs from the typical disk in that writes are always immediately
sent to the backend store, while disks will buffer small writes for a time
(and, in fact, can be made to hold small writes in the cache indefinitely
under certain workloads).

Thus, 'rbd_writeback_window' may be a bit of a misnomer...

Currently this applies only to aio writes, not sync writes.  That could
most easily be fixed by reimplementing write in terms of aio_write.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: fix odd crash on rename
Sage Weil [Mon, 12 Sep 2011 01:58:42 +0000 (18:58 -0700)]
client: fix odd crash on rename

If the old_dentry is in the same dir, and it is the last dentry, we need
to keep the dir open.

This is hard to hit because the rename itself will typically instantiate
a null dentry on the target, and it's hard to construct a working where
a racing process makes us drop it.  Fortunately this was triggered
reliably by the snaptest-git-ceph.sh workunit.

Fixes: #1519
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorbd: show progress
Sage Weil [Sun, 11 Sep 2011 21:54:33 +0000 (14:54 -0700)]
rbd: show progress

Show progress for any rbd _with_progress operations, and for import/export.

Resolves: #1495, #1496
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: stray PGInfo is not an error
Sage Weil [Sat, 10 Sep 2011 23:12:04 +0000 (16:12 -0700)]
mon: stray PGInfo is not an error

It is normal to get these immediately after we delete a pool.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix leak of osd_lock on pg lookup vs pool deletion race
Sage Weil [Sat, 10 Sep 2011 22:51:27 +0000 (15:51 -0700)]
osd: fix leak of osd_lock on pg lookup vs pool deletion race

Fixes: #1520
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agostore_test: fix warning
Sage Weil [Sat, 10 Sep 2011 20:56:23 +0000 (13:56 -0700)]
store_test: fix warning

test/store_test.cc:318: warning: suggest a space before ';' or explicit braces around empty body in 'for' statement

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoPG: generate backlog when confronted with corrupt log
Samuel Just [Sat, 10 Sep 2011 04:39:27 +0000 (21:39 -0700)]
PG: generate backlog when confronted with corrupt log

Currently we throw out the log and start up anyway.  With this change, we
would throw out the log, generate a fresh backlog, and then start up.
That may not be the best possible thing, but it's better than what we
currently do.  Indirectly fixes #1502.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoman: Generate manpages from doc/man.
Tommi Virtanen [Fri, 9 Sep 2011 23:25:14 +0000 (16:25 -0700)]
man: Generate manpages from doc/man.

Keeping the generated files in version control lets us
support builds from scratch without requiring the full
documentation toolchain to be installed.

The files were just copied over from build-doc/output/man,
after a ./admin/build-doc call. When redoing this, also
take care to remove any roff output if a file was removed
from doc/man, and update Makefile.am.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Convert manpages to doc/man/.
Tommi Virtanen [Fri, 9 Sep 2011 23:21:52 +0000 (16:21 -0700)]
doc: Convert manpages to doc/man/.

Includes various content cleanups: layout of synopsis, layout
of comments in examples, typos.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Hide TODO note in rbd.8
Tommi Virtanen [Fri, 9 Sep 2011 20:41:32 +0000 (13:41 -0700)]
doc: Hide TODO note in rbd.8

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agodoc: Make rbd.8 "pool-name", like the old man page.
Tommi Virtanen [Fri, 9 Sep 2011 20:40:42 +0000 (13:40 -0700)]
doc: Make rbd.8 "pool-name", like the old man page.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>