Commit Graph

16702 Commits

Author SHA1 Message Date
Sage Weil
3d2f89fac2 mon: make other send_incremental variant handle map discontinuity
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-06 16:17:14 -07:00
Sage Weil
64935d4c24 auth: fix authorizer leak fix
We were never reusing the authorizer, so make it local.  This fixes a crash
(double-free) on reset().

Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-06 16:17:14 -07:00
Sage Weil
6e04f60ed4 mon: fix osdmap trimming unsigned overflow
This was trimming way to aggressively for early epochs due to the unsigned
version overflowing.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-06 16:17:14 -07:00
Sage Weil
4fe9cca5dd objecter: cope with missing osdmaps in history
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-06 16:17:14 -07:00
Josh Durgin
b344d7979b osd, pg: ignore responses to obsolete queries
This adds a query_epoch to notify and log messages, which are
sent in response to queries from the primary during peering. To
guarantee we don't try to process old logs and notifies after
restarting peering, query_epoch is set to the epoch at which the
query was sent. If query_epoch is less than last_peering_reset,
the primary discards the message.

This caused a "bad state machine event" crash in the following
scenario:

1. Primary tells a stray to generate a backlog at epoch 199.
2. The up set changes because a stray goes up.
3. Primary restarts peering at epoch 200.
4. Stray gets new map for epoch 200, sees that acting set did not
change, and sends log to primary.
5. Primary crashes.

Related to #1403, #1449
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-10-06 15:45:36 -07:00
Josh Durgin
ad48ada8c4 pg: rename warm_restart and last_warm_restart
These names make more sense, since last_warm_restart was updated
outside of the warm_restart function.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-10-06 15:45:36 -07:00
Samuel Just
85bbc2f993 .gitignore: add multi_stress_watch
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-10-06 15:59:47 -07:00
Samuel Just
6bfae03ad9 ReplicatedPG: assert *_FLUSHING unreachable for AccessMode
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-10-06 14:51:21 -07:00
Samuel Just
5840ae46e2 test/multi_stress_watch.cc: add watch notify tester for teuthology
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-10-06 14:51:21 -07:00
Sage Weil
088d0dfa56 qa: rados-api: try harder to make these pool names unique
Still getting -17 sometimes on sepia... :/

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-10-06 13:56:58 -07:00
Sage Weil
646ef6aaac xlist: more assertive
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-10-06 13:39:33 -07:00
Sage Weil
07c88609d9 Revert "osd: simplify the session ref-counting branches"
This reverts commit f002144ef7.
2011-10-06 13:12:16 -07:00
Sage Weil
fce176170a osd: boot with map of oldest-1
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-06 12:58:23 -07:00
Sage Weil
d2721464cf radosgw-admin: UTC for time in 'log show', local time in separate field
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-06 12:35:28 -07:00
Sage Weil
e8dd1f8b30 utime: add gmtime() output function
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-06 12:35:27 -07:00
Sage Weil
77cfbfbbf5 radosgw-admin: for date filtering for 'log list'
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-06 12:35:27 -07:00
Greg Farnum
6e0a3df8dc Merge branch 'wip-leaks' 2011-10-06 10:30:45 -07:00
Greg Farnum
d926201434 cephx: don't leak Authorizers on each request
It's not clear to me why this is a class member -- it's only
written to or read from in this function, which allocates a fresh
one each time it's called.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-10-06 09:58:48 -07:00
Greg Farnum
5d7e4bd58e osd: put session ref in ms_handle_reset
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-10-06 09:44:48 -07:00
Greg Farnum
f002144ef7 osd: simplify the session ref-counting branches
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-10-06 09:44:44 -07:00
Sage Weil
d78286e1e2 rgw: fix chdir result warning
warning: rgw/rgw_main.cc:265: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result

Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-06 09:40:09 -07:00
Sage Weil
ca3662c8d4 rgw: fix rgw_switch_url_previx printf arg
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-06 08:52:35 -07:00
Sage Weil
02be99385b osd: same_acting_since -> same_interval_since
Interval is (currently) defined as same acting and up sets.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-06 08:50:50 -07:00
Sage Weil
5ab7f8fab3 osd: fix same_acting_since update
same_acting_since actually means "same acting AND up set since".  This is
what the other same_acting_since update does (see a22511d).

We should rename it same_interval_since or something similar.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-10-05 21:41:15 -07:00
Sage Weil
8f62c3bb18 rgw: use conf for rgw_swift_url[_prefix] instead of fcgi env
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-05 21:30:29 -07:00
Sage Weil
85cf0a8d90 rgw: use conf for rgw_print_continue instead of fcgi environment
Also remove unused expect100cont bool.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-05 21:30:29 -07:00
Sage Weil
24e05e32bf rgw: use conf for rgw_dns_name instead of fcgi environment
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-05 21:30:29 -07:00
Sage Weil
5235b9708b rgw: add conf rgw_remote_addr_param instead of using fcgi environment
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-05 21:30:29 -07:00
Sage Weil
9d53b3d32c osd: fix pg stats encoding for unfound
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-10-05 15:16:36 -07:00
Sage Weil
1e151664c3 vstart: use normal name for .asok files
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-10-05 15:16:36 -07:00
Sage Weil
ed87871584 rgw: fix initscript default user
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-05 13:48:46 -07:00
Sage Weil
4ab2a8520d rgw: daemonize by default
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-05 13:37:10 -07:00
Sage Weil
5af012a811 rgw: set locator key before calling get_obj_state()
get_obj_state assumes the io_ctx is ready to go.  Set the locator key
earlier rather than later.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-05 13:07:59 -07:00
Sage Weil
c4b51e30bb objecter: normalize oloc.key
If oloc.key == oid, clear it.  Users can set it to the oid or leave it
blank; they are equivalent.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-05 13:05:49 -07:00
Greg Farnum
a3316f4479 cli: fix test contents again.
I don't know why this didn't come across properly from my wip branch...

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-10-05 12:02:50 -07:00
Sage Weil
e4a69004b1 osd: fix map epoch check in handle_osd_map
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-10-05 11:13:23 -07:00
Sage Weil
b38cba2da2 paxos: update first_committed
Otherwise this stays at 0, which isn't accurate.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-10-05 11:13:23 -07:00
Greg Farnum
a76f8d4209 rgw: fix mis-merge issues.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-10-05 10:45:23 -07:00
Greg Farnum
20e0d36a75 Merge branch 'wip-rgw-pools'
Conflicts:
	src/rgw/rgw_bucket.cc
	src/rgw/rgw_main.cc
2011-10-05 09:54:59 -07:00
Greg Farnum
b5c27aec40 monclient: add an initialized bool to guard shutdown.
The addition of a Finisher in 9c56070bc2
broke shutdown in the case where MonClient::init() was never called, so
add a guard variable to keep track.

I'm not sure this is actually the best solution (Timer guard itself,
for instance; maybe Finisher should too?), but I don't want to change
the Finisher interface without looking at it more carefully than I'm
going to right now.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-10-05 09:50:51 -07:00
Greg Farnum
1c2ff9d60d rgw: remove the rgw_buckets files
We don't need them any more. Hurrah!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-10-05 09:25:55 -07:00
Greg Farnum
f723f0a51d rgw: remove the rgw_get_bucket_info functions
Push them down into the RGWAccess layers.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-10-05 09:25:55 -07:00
Greg Farnum
1247278559 rgw: move rgw_store_bucket_info into RGWRados.
create_bucket is the only user, so just make it a simple helper.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-10-05 09:25:55 -07:00
Greg Farnum
5f960f8247 rgw: remove select_bucket_placement from RGWAccess interface.
RGWRados::create_bucket is the only user now, so make it private
and make the interface a little tighter.

(We are going to need to handle placement at some point in the future,
but the interface needs to be designed a lot more carefully than this
one [wasn't].)

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-10-05 09:25:55 -07:00
Greg Farnum
13d480300a rgw: remove rgw_create_bucket.
Push all its extra functionality down into RGWRados::create_bucket. Convert
callers to the different interface (there's no reason to pass in the
bucket name apart from the bucket, and all callers know if they're
using a system bucket or not).

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-10-05 09:25:55 -07:00
Greg Farnum
98f15e648f rgw: new command to add pools to the list of available places for storage.
Do this by adding an add_bucket_placement function to RGWAccess. Hurray
leaky abstractions! :(

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-10-05 09:25:48 -07:00
Sage Weil
3bb6ad9d20 Merge branch 'stable' 2011-10-04 20:36:04 -07:00
Sage Weil
a788bfdb93 osd: fix PG::up calculation on startup
We weren't filling in pg->up, which meant we booked an incorrect past
interval in PG::warm_restart(), leading to unknown strangeness down the
line.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-10-04 20:35:48 -07:00
Sage Weil
36aaa774ad mon: fix maps sent after osd boot
This was a bad hunk that crept in while I was rebasing wip-oldmaps.  :(

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-10-04 20:30:15 -07:00
Sage Weil
7cbb68d86f Merge branch 'wip-rgw-log' 2011-10-04 16:08:15 -07:00