Commit Graph

17218 Commits

Author SHA1 Message Date
Sage Weil
10fed791e9 paxosservice: remove unused committed() callback
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-19 14:30:31 -08:00
Sage Weil
b521710f10 mon: mdsmon: tick() from on_active() instead of committed()
Same effect, and avoids useless committed().

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-19 14:30:31 -08:00
Sage Weil
becfce356c mon: share random osd map from update_from_paxos, not committed()
This will let us remove committed() entirely.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-19 14:30:31 -08:00
Sage Weil
9920a168c5 config: support --no-<foo> for bool options
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-19 13:56:21 -08:00
Sage Weil
1a468c7e0b config: whitespace
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-19 13:56:17 -08:00
Greg Farnum
cc5b5e17e6 osdmon: set the maps-to-keep floor to be at least epoch 0
Looks like this conditional was just set backwards by mistake. There
have been a number of issues with OSDMap versions that are probably
related to this...
(Thanks to some smarts in trim_to, we at least did not trim ALL of
our maps. But on every tick prior to epoch 500 [that's the default]
the leader was trimming all old maps off the system.)

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-11-18 16:13:29 -08:00
Samuel Just
45cf89c108 Revert "osd: simplify finalizing scrub on replica"
This reverts commit dd5087fabb.

Calling osr.flush() is not quite enough since the onreadable callbacks
may not have been called (thus, last_update_applied may still lag behind
the tail of the log).

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-11-18 15:57:00 -08:00
Samuel Just
57ad8b2ebf FileStore.cc: onreadable callbacks in OpSequencer order is enough
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-11-18 15:56:59 -08:00
Greg Farnum
dedf2c4a06 osd: error responses should trigger all requested notifications.
There's no good reason I can find to limit error code responses to
the ACK.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-11-18 09:49:57 -08:00
Greg Farnum
09c20c5129 objecter: trigger oncommit acks if the request returns an error code.
Many users only set oncommit acks, so if they get an error code
(which comes only as a CEPH_OSD_OP_ACK right now) the request
disappears into the ether.
(And remove stupid debug statements while we're at it.)

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-11-18 09:49:57 -08:00
Sage Weil
9800faeb92 paxos: do not create_pending if !active
This avoids a scenario like:

- _active()
  - proposes value
- _commit()
  - creates new pending, even though in updating state

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-18 09:49:03 -08:00
Sage Weil
fa5876870a Revert "mon: don't propose new state from update_from_paxos"
This reverts commit 66c628acc8.
2011-11-18 09:43:09 -08:00
Sage Weil
66c628acc8 mon: don't propose new state from update_from_paxos
Proposing a new state from within update_from_paxos() confuses some callers,
like PaxosService::_active().  Instead, do it in the on_active() callback.
This also let's us collapse the check_osd_map() caller into on_active(),
and makes it happen on leaders and peons alike, which ought to avoid some
of the pg creation lag we see sometimes (presumably when the osds have
sessions with peons instead of the leader).

Fixes: #1708
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-17 20:45:54 -08:00
Yehuda Sadeh
6ae0f81e17 rgw: if swift url is not set up, just use whatever client used 2011-11-17 16:55:48 -08:00
Sage Weil
ef5ca293a7 fuse: fix readdir return code
Ignore ENOSPC generated by our own callback, as it is only used to
terminate the loop.

Broken by commit cd90061239.

Fixes: #1728
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-17 15:01:25 -08:00
Sage Weil
d61ba6441b paxos: fix trimming when we skip over incrementals
Remove open-coded trimming of old states and use our method (that also
removes additional per-state files).  Fixes old stray state files.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-17 14:11:38 -08:00
Sage Weil
367ab142d7 paxos: store stashed state _and_ incrementals
Paxos::share_state() may share a stashed state and incrementals that
follow; we need to store the same.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-17 14:10:34 -08:00
Sage Weil
6bc9a544b6 mon: elector: always start election via monitor
Don't go from active -> electing without passing (monitor) go.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-17 13:53:52 -08:00
Sage Weil
685450b76b common: libraries should not log to stdout/stderr
Certainly not by default.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-17 12:07:34 -08:00
Sage Weil
f1dd56d93d objecter: set skipped_map if we skip a map
This ensures that we resend _all_ requests, since we aren't sure which
may have mapped to a different primary and then back.  This was missed in
the original implementation in 4fe9cca5dd.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-17 11:56:37 -08:00
Sage Weil
5afef0209f objecter: add is_locked() asserts
Sanity check.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-17 11:39:55 -08:00
Sage Weil
bf91177e57 objecter: send slow osd MPing via Connection*
This may address #1732 indirectly because we have a Connection* reference
here.  However, it's still not clear how we ended up with an OSDSession*
for an osd that doesn't exist.  :/

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-17 11:39:36 -08:00
Sage Weil
fa4b0fb961 osd: add pending_ops assert
Just a sanity check, hopefully helping us track down #1727.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-16 13:11:07 -08:00
Sage Weil
17fa1e0d4e mon: renamed get_latest* -> get_stashed*
This makes e.g. get_latest_version() vs get_last_committed() less
confusing.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-16 11:01:59 -08:00
Sage Weil
b9d5fbe494 mon: fix ver tracking for auth database
Local variable keys_ver needs to be updated when we slurp up latest stashed
version.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-16 10:57:23 -08:00
Sage Weil
b425f6d6ce mon: always load stashed version when version doesn't match
The slurp process can happen after the monitor has started and has some
in-memory version of the state, and that process may wipe out old
incrementals and change the stashed version.  That means that in
update_from_paxos, we need to pull the stashed version if it doesn't
match what we currently have or else we may not have the incrementals we
need to get up to date.

This simplifies and cleans up that code a bit so it is not specific to
monitor startup.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-16 10:54:59 -08:00
Yehuda Sadeh
2e195500b5 rgw: don't log entries with bad utf8 2011-11-14 17:02:08 -08:00
Yehuda Sadeh
0276eab440 rgw: adjust error code in swift copy failures 2011-11-14 14:39:18 -08:00
Yehuda Sadeh
1fe16923b4 rgw: fix swift responses encoding 2011-11-14 13:55:29 -08:00
Josh Pieper
2445fd8416 rgw: Fix some merge problems uncovered by gcc warnings:
* a refactor in e2100bce left the mod_ptr and unmod_ptr members set
   incorrectly in RGWCopyObj::init_common
 * a fix in 6752babd aggregated error returns, but then failed to do
   anything with them

Signed-off-by: Josh Pieper <jjp@pobox.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-14 13:23:29 -08:00
Josh Pieper
cd90061239 Resolve gcc warnings.
These should have no functional changes:
 * Check errors from functions that currently cannot return any
 * Initialize variables that gcc can't determine will be initialized
   in a following function call
 * Remove unused variables

Signed-off-by: Josh Pieper <jjp@pobox.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-14 13:23:18 -08:00
Sage Weil
a5b8c8518f osd: remove dead osd_max_opq code
This is no longer used as of a while ago!

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-14 12:15:14 -08:00
Josh Durgin
f418775d2c workunits: rados python workunit should be executable
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-11-14 08:18:47 -08:00
Sage Weil
102c434297 crush: send debug output to dout, not stdout/err
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-13 14:18:19 -08:00
Sage Weil
25eee416fd test/run_cmd: use mkstemp instead of mkstemps
my box didn't have mkstemps

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-13 14:16:52 -08:00
Sage Weil
18009866f2 ceph-authtool: fix clitests
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-13 14:07:01 -08:00
Sage Weil
d476ae2509 test_str_list: make sure ' ' and ', ' separaters work for str lists
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 15:17:29 -08:00
Sage Weil
ecd713c5c3 ceph-authtool: make error msg more helpful
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 14:55:39 -08:00
Sage Weil
4f39aaa7a9 keyring: don't print auid if it is the default
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 14:55:28 -08:00
Sage Weil
ee02a1e12b mon: implement 'fsid' command
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 14:55:06 -08:00
Sage Weil
5a3004e2c4 Merge branch 'stable' 2011-11-12 14:19:26 -08:00
Sage Weil
73f99a189f mon: fix 'osd crush add ..' weight
This was changed to floating point in commit 3f67893.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 14:08:02 -08:00
Sage Weil
1b843e0ef6 osdmap: build_simple with normal osd/host/rack/pool hierarchy
This will be useful in the general case where the cluster is created with
an empty map and useful crush hierarchy.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 14:05:15 -08:00
Sage Weil
ec97c852d7 mon: fix 'osd crush add ..' weight
This was changed to floating point in commit 3f67893.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 14:04:15 -08:00
Sage Weil
0349fa9625 vstart.sh: don't generate initial osdmap explicitly
This is simpler and exercises the monitors ability to start with a generic
osdmap and build it out as new osds are added to the cluster.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 13:42:38 -08:00
Sage Weil
30ddc85e54 mon: make initial osdmap optional
If an initial osdmap is not provided, we generate an empty one.  The user
add osds on their own after that.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 13:41:59 -08:00
Sage Weil
0d812252d7 osdmap: build_simple: create reasonable pools when numosd==0
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 13:41:05 -08:00
Sage Weil
8e150fb496 mon: add '--fsid foo' arg for setting generated monmap fsid
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 13:16:30 -08:00
Sage Weil
b51d817e23 mon: take '--fsid foo' arg with --mkfs
This will set the seed monmap's fsid.  This is useful if the monmap is
dynamically generated (e.g., based on ceph.conf or --mon-host list).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-11 21:04:58 -08:00
Sage Weil
0c731ed7a9 osd: fix warnings
osd/ReplicatedPG.cc: In member function 'virtual void ReplicatedPG::remove_watchers_and_notifies()':
osd/ReplicatedPG.cc:1167: warning: suggest a space before ';' or explicit braces around empty body in 'for' statement
osd/ReplicatedPG.cc:1176: warning: suggest a space before ';' or explicit braces around empty body in 'for' statement

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-11 21:04:56 -08:00