Commit Graph

16384 Commits

Author SHA1 Message Date
Sage Weil
97aa1aab7b 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>
2011-09-22 14:47:45 -07:00
Samuel Just
ac1a40d174 test/rados-api/test.cc: Add ability to set client id
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-22 13:20:03 -07:00
Samuel Just
4686b56dfa test/test_stress_watch.cc: added simple watch stress test
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-22 13:18:48 -07:00
Samuel Just
a01a947a21 PG: set log.backlog to false on corrupt log
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-22 09:56:25 -07:00
Sage Weil
8cb574626e vstart: debug filestore = 20
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-21 16:27:06 -07:00
Sage Weil
68fe748fc2 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>
2011-09-21 16:27:06 -07:00
Sage Weil
ca63faf551 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>
2011-09-21 16:27:06 -07:00
Sage Weil
82a1935197 rbd: fix progress redraw
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-21 16:27:06 -07:00
Tommi Virtanen
f488908c79 doc: Content for Getting Started with cephfs and rbd.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-21 14:55:11 -07:00
Tommi Virtanen
69fabca63d doc: Content for Getting Started with RADOS.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-21 13:46:04 -07:00
Tommi Virtanen
c3fae7e777 doc: Structure for Getting Started.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-21 13:46:04 -07:00
Tommi Virtanen
47dfe29fab doc: Separate key management from mounting.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-21 13:46:04 -07:00
Tommi Virtanen
c01d36cf5a doc: Move config reference to top-level.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-21 13:46:04 -07:00
Tommi Virtanen
093f4f3307 doc: Split data placement into concrete operations and recommendations.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-21 13:46:04 -07:00
Tommi Virtanen
bc9477af43 doc: Reorganize ops/manage/
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-21 13:46:04 -07:00
Tommi Virtanen
8648b7a55d doc: Move recommendations under /rec.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-21 13:46:04 -07:00
Tommi Virtanen
d292aee8fb doc: Move ops/grow under ops/manage.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-21 13:46:04 -07:00
Tommi Virtanen
9888fc6d5d doc: Split manage into multiple pages.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-21 13:46:04 -07:00
Tommi Virtanen
331510f308 doc: Split install into multiple pages.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-21 13:46:03 -07:00
Tommi Virtanen
c448c4c004 doc: Clean reStructuredText syntax.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-21 13:46:03 -07:00
Sage Weil
2c842053e6 Merge branch 'stable' 2011-09-21 13:37:45 -07:00
Sage Weil
894a8b66e4 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>
2011-09-21 10:43:59 -07:00
Greg Farnum
b9e32fff65 rados: accept '-b' as an argument.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-21 09:50:29 -07:00
Sage Weil
0afda37812 v0.35 2011-09-21 09:47:36 -07:00
Sage Weil
2c28e1c7eb Makefile: include config_opts.h
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-21 09:47:36 -07:00
Greg Farnum
fdd3d1dab0 Merge branch 'master' of github.com:NewDreamNetwork/ceph 2011-09-21 09:42:41 -07:00
Sage Weil
6068fc83d9 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>
2011-09-21 09:35:30 -07:00
Sage Weil
43967f5e9c auth: keyring: whitespace
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-21 09:35:03 -07:00
Sage Weil
b39f0808f5 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>
2011-09-21 09:35:03 -07:00
Sage Weil
0852ecfa19 mon: remove unused MonitorStore::sync()
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-21 09:35:03 -07:00
Sage Weil
56413b8e2e mkcephfs: create /var/run/ceph (or wherever pid_file and admin_socket live)
Fixes: #1546
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-20 17:02:04 -07:00
Sage Weil
f5c1632185 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>
2011-09-20 17:01:38 -07:00
Sage Weil
096e3b6353 rbd: error out gracefully when snapname specified for command that doesn't use it
Fixes: #1545
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-20 16:24:24 -07:00
Sage Weil
c329d00b0b 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>
2011-09-20 16:24:24 -07:00
Samuel Just
0b0e8446e8 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>
2011-09-20 13:43:37 -07:00
Samuel Just
0f7a490876 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>
2011-09-20 11:46:46 -07:00
Sage Weil
a711f2935c 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>
2011-09-20 10:58:20 -07:00
Sage Weil
46cfda7b82 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>
2011-09-19 18:23:10 -07:00
Sage Weil
4fb3d34a40 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>
2011-09-19 16:52:47 -07:00
Greg Farnum
0ac898556f CDir: put delete with pop so we don't read free'd memory in output
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-19 14:09:44 -07:00
Sage Weil
8c8e1d820b 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>
2011-09-19 14:05:49 -07:00
Greg Farnum
9cd0b5d226 Merge branch 'wip-flock' 2011-09-19 10:40:45 -07:00
Greg Farnum
d440a67412 flock: clean up waiting records of a lock when adding it succeeds
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-19 09:48:13 -07:00
Greg Farnum
39970c0f65 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>
2011-09-19 09:47:37 -07:00
Tommi Virtanen
d64237a6a5 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 71dc75bdaf 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>
2011-09-19 09:47:11 -07:00
Greg Farnum
ea6986a501 flock: move operator<<() to flock header, remove extra line
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-19 09:37:40 -07:00
Greg Farnum
3e3c0baea2 flock: remove doubled debug output
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-19 09:20:10 -07:00
Sage Weil
375b8f76b9 fix .gitignore for test_addrs 2011-09-18 18:30:37 -07:00
Sage Weil
7c5a216856 test/test_addrs: unit tests for addr parsing
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-17 15:19:40 -07:00
Wido den Hollander
362dea30bb Remove various unused variables
Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-17 10:27:36 -07:00