Commit Graph

15851 Commits

Author SHA1 Message Date
Colin Patrick McCabe
2c9949e0ca config: add proper locking, fix comments
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-04 16:49:55 -07:00
Yehuda Sadeh
f53cc374df rgw: mark ops as atomic 2011-08-04 16:44:16 -07:00
Greg Farnum
d305a5e281 osd: remove unnecessary history creation.
The history is coming from an MOSDPGNotify, but that is covered
by a require_same_or_newer_map check, so we're all good.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-04 16:28:33 -07:00
Greg Farnum
8bb4c0a7f5 osdmon: remove default values for prepare_new_pool
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-04 16:23:10 -07:00
Yehuda Sadeh
3b459efcb4 rgw: conditional clone, depends on src_cmpxattr result 2011-08-04 16:21:57 -07:00
Yehuda Sadeh
454d7de45b librados: modify src_cmpxattr interface 2011-08-04 16:12:47 -07:00
Greg Farnum
5bb07df6aa pgmon: create PGs with a creation epoch that matches the pool's
Previously, the PGs were created with a creation date of the current
OSDMap. However, under some circumstances the PG creation can occur
under a later OSDMap epoch. This could lead to client requests that
were sent under epoch n, while the OSD insisted that the PG was
created in epoch n+1 so the client request was invalid. Since the
OSD expects the client to resubmit requests in such circumstances,
and the client thought all was well, this led to hanging client
requests.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-04 16:11:43 -07:00
Yehuda Sadeh
84ee468b1d librados: get it compiled 2011-08-04 16:07:36 -07:00
Yehuda Sadeh
476f5c64cd rgw: prepare for conditional clone_range 2011-08-04 15:58:34 -07:00
Yehuda Sadeh
128e948d81 rgw: adapt some more rados calls to the new atomic structure 2011-08-04 15:58:34 -07:00
Yehuda Sadeh
a2bcbf2694 librados: restructure ObjectOperation 2011-08-04 15:58:34 -07:00
Yehuda Sadeh
bcf25bd564 rgw: a few more operations are using atomic infrastructure 2011-08-04 15:58:34 -07:00
Yehuda Sadeh
b03930fa02 rgw: atomic get, various fixes 2011-08-04 15:58:34 -07:00
Yehuda Sadeh
10dda20895 rgw: fix decoding 2011-08-04 15:58:34 -07:00
Yehuda Sadeh
70cdd5dad7 rgw: atomic get, basic flow for severl rados ops
not working yet
2011-08-04 15:58:33 -07:00
Yehuda Sadeh
71a6481825 librados, objecter: add operations to support rgw atomic get 2011-08-04 15:58:33 -07:00
Yehuda Sadeh
8d63e14077 rgw: introduce context to specific access calls 2011-08-04 15:58:33 -07:00
Colin Patrick McCabe
7ec6909b13 Merge branch 'rgw-formatter' 2011-08-04 15:33:27 -07:00
Colin Patrick McCabe
76880e3e3c In RGW, use the common/Formatter
Implement a new subclass of Formatter, RGWFormatter_Plain, using code
from the old RGWFormatter and RGWFormatter_Plain classes.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-04 14:48:23 -07:00
Sage Weil
0bc7e28fcd filestore: remove unused var
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-04 14:35:26 -07:00
Greg Farnum
22e25247c3 osd: Fix last_epoch_started initialization on new PGs
This used to be safe by virtue of assigning same_acting_since
to osdmap->get_epoch(), but since we fixed bugs by handling
that better we now need to update the last_epoch_started
initialization.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-04 14:34:57 -07:00
Greg Farnum
9baa00966c osd: rename variables in project_pg_history.
These are always the current sets; I don't know why they would
ever be called lastup and it confused me when I started looking
at this. Confusion means something needs to change!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-04 14:32:55 -07:00
Colin Patrick McCabe
0413e2acd6 Formatter: add open_object_section_in_ns, etc.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-04 14:27:14 -07:00
Colin Patrick McCabe
041a22cc90 test/formatter: test stream clearing
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-04 14:11:42 -07:00
Colin Patrick McCabe
434be6c0f6 Formatter: must use str("") to clear ostreams
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-04 14:07:53 -07:00
Colin Patrick McCabe
e2cbfb6299 More changes towards using common/Formatter in rgw
* rename RgwFormatter::init to RgwForamtter::reset.
Roll old reset() into base_reset().

* add write_raw_data to Formatter, to support DTDs.
Remove other DTD support code.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-04 14:05:59 -07:00
Sage Weil
72b0851fcb osd: expect heartbeats from anyone peering depends on
We were getting heartbeats from just acting replicas.  That's really not
enough if we want to be sure to detect failures of OSDs we depend on,
which includes any stray or up OSDs as well.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-04 13:48:55 -07:00
Sage Weil
cd01d14abf osd: restructure heartbeats
Primary sends explicit message to replicas asking for heartbeats to start,
or to stop.  Replicas never send heartbeats unless explicitly requested
to.

Do not try to mark down old heartbeat relationships; that gets messy, and
the overhead of open sockets is too small to worry about right now.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-04 13:35:57 -07:00
Greg Farnum
2f0d3b1309 osd: refactor PG creation slightly.
We want to carefully set up the PG History. In most cases this will
do the same thing as previously, since it's a brand new PG. However,
it's possible for the monitor to send out MOSDPGCreate messages for
the same PG to more than one OSD over many epochs if the OSDs are down
or are slow to respond. In that case we need to carefully track
history to make sure we don't lose old data.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-04 12:44:41 -07:00
Greg Farnum
a8f3602dce osd: fix comment for project_pg_history
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-04 12:44:41 -07:00
Greg Farnum
b4b61d62a3 osd: Initialize new PGs with correct info.history.same_primary_since
Previously we were initializing based on the local osdmap epoch, which
is often correct, but if we process the MOSDPGCreate in an epoch after
the PG was created in the OSDMap, we could have problems with clients
sending out messages based on the creation epoch which the OSD would
reject as being earlier than same_primary_since. See bug #1357.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-04 12:44:41 -07:00
Greg Farnum
92f02378fc messages: add print functions to the MOSDPG messages
This should help with debugging any future issues.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-04 12:44:34 -07:00
Greg Farnum
cf88ce5e7c messages: change = to result = for less confusion!
Every time I see "ondisk = 0" I think it means that the message
is an ack, not a commit. Now I won't, and neither will anybody else!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-04 08:39:08 -07:00
Greg Farnum
9bdc43fac3 osdcaps: allow the default UID to have full caps on its own pools.
The explicit skip in the check was just a wrongheaded attempt to
stay secure, I think.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-04 08:39:08 -07:00
Greg Farnum
309d157997 osdmon: always send in the CRUSH rule.
Not sure why this wasn't there before...looks like the CRUSH option
is newer than the code and it didn't all get updated.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-04 08:39:08 -07:00
Sage Weil
7078c34cb2 mds: add hooks to test multimds link/unlink failures
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-03 18:04:33 -07:00
Sage Weil
1c1d92ec83 qa: move fsx.sh 2011-08-03 18:04:33 -07:00
Sage Weil
ab537f1e04 Revert "qa: Remove fsx workunit."
This reverts commit a66da4af25.  Still useful
to have this around.
2011-08-03 18:04:33 -07:00
Colin Patrick McCabe
6a920bb93a os/FileStore: print out BTRFS_IOC_SNAP_CREATE errs
Print out the errno for BTRFS_IOC_SNAP_CREATE errors if they happen.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-03 17:56:19 -07:00
Sage Weil
efc1566c17 osd: add CATEGORIES incompat feature
Care should be taken to upgrade the monitors first, then osds.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-03 16:24:48 -07:00
Sage Weil
a71adf1b67 librados: add create in specific category to c++ api
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-03 15:01:41 -07:00
Sage Weil
fdd9332c06 osd: allow 'category' to be set on object creation
Allow a string category to be set on object creation.  Object stats will
be included in the category total (in addition to the overall total).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-03 14:55:46 -07:00
Sage Weil
ee4460d0c1 osd: segregate stats into categories
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-03 14:35:05 -07:00
Colin Patrick McCabe
8981a23200 rgw_rest: don't leak formatters
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-03 11:39:40 -07:00
Colin Patrick McCabe
cec04ca9de XmlFormatter: add DTD option
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 17:05:53 -07:00
Colin Patrick McCabe
ede86e7df1 Formatter.cc: add get_len method
Add get_len method because rgw needs it.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 16:11:11 -07:00
Colin Patrick McCabe
24a7b5f7ad RGWFormatter: get rid of one flush variant
This flush variant won't exist in common/Formatter.cc.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 16:04:14 -07:00
Colin Patrick McCabe
dbbce9377c rgw_formats: introduce dump_unsigned, dump_int,etc
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 15:42:17 -07:00
Colin Patrick McCabe
7b239448ae rgw: rename dump_value_str to dump_format
rename dump_value_str to dump_format for compatibility with Formatter.cc

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 15:29:32 -07:00
Colin Patrick McCabe
9dbeeaaf0e rados tool: fix cmdline parsing for --block-size
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 15:26:46 -07:00