Commit Graph

17739 Commits

Author SHA1 Message Date
Sage Weil
3dcaf6c3f3 osd: do not backfill if any objects are missing on the primary
Someday we need to do something smarter so that a single unfound object
doesn't hold up replication of other objects.  For now, this is the
simplest thing to do.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-30 15:51:45 -08:00
Yehuda Sadeh
949f24d560 rgw: create default constructors for some structs
this will silence valgrind a bit
2011-12-30 14:31:16 -08:00
Sage Weil
251fc3d5f7 osd: handle backfill_target for pick_newest_available
The it may not be missing on the backfill_target if it is after the
last_backfill marker.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-12-30 12:23:02 -08:00
Sage Weil
a352589113 osd: return EINVAL if multi op specified with no src object name
This avoids crashing later in do_osd_ops() with something like

osd/ReplicatedPG.cc: In function 'int ReplicatedPG::do_osd_ops(ReplicatedPG::OpContext*, std::vector<OSDOp, std::allocator<OSDOp> >&, ceph::bufferlist&)', in thread '7f27e2d7e700'
osd/ReplicatedPG.cc: 1386: FAILED assert(src_obc)

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-12-30 12:19:32 -08:00
Sage Weil
e686c1b657 hobject_t: fix operator==, !=
These weren't comparing key.

While we're at it, clean this up by using generic macros for writing
these operators, so we don't get it wrong half the time.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-12-30 11:39:30 -08:00
Sage Weil
063ab2e40f cmp.h: define macros for creating comparison operators
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-12-30 11:38:16 -08:00
Sage Weil
7969cc4f28 Merge remote branch 'gh/master' into wip-backfill 2011-12-30 10:43:33 -08:00
Josh Durgin
6687ccf5dc workunits: update rbd test for new error format
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-12-30 10:32:05 -08:00
Sage Weil
85719b0ed8 config: use autoconf $libdir for default rados class dir
Fixes: #1722
Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-30 09:50:36 -08:00
Sage Weil
0d9507c2b0 .gitignore: src/ocf/ceph
Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-30 09:17:06 -08:00
Florian Haas
9b6422dbc7 Spec: conditionally build ceph-resource-agents package
Put OCF resource agents in a separate subpackage,
to be enabled with a separate build conditional
(--with ocf).

Make the subpackage depend on the resource-agents
package, which provides the ocf-shellfuncs library
that the Ceph RAs use.

Signed-off-by: Florian Haas <florian@hastexo.com>
2011-12-30 09:00:31 -08:00
Florian Haas
92cfad4203 Add OCF-compliant resource agent for Ceph daemons
Add a wrapper around the ceph init script that makes
MDS, OSD and MON configurable as Open Cluster Framework
(OCF) compliant cluster resources. Allows Ceph
daemons to tie in with cluster resource managers that
support OCF, such as Pacemaker (http://www.clusterlabs.org).

Disabled by default, configure --with-ocf to enable.

Signed-off-by: Florian Haas <florian@hastexo.com>
2011-12-30 09:00:30 -08:00
Sage Weil
66170633ff mon: fix full ratio updates
- update them independently
- only if we are leader
- fix type for nearfull_ratio

Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-30 08:06:55 -08:00
Sage Weil
f2e4109796 mon: don't ignore first full ratio update callback
We get a callack on startup.  Don't ignore it.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-30 08:06:06 -08:00
Sage Weil
a693438e13 mon: only update full_ratio if we're the leader
Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-30 07:45:21 -08:00
Sage Weil
47d0227187 Merge remote branch 'gh/wip-cleanup' 2011-12-30 07:42:20 -08:00
Sage Weil
df84594f20 mon: make full ratio config change callback safe
We can't propose_pending() from any context; do this in the tick() thread,
with the proper locking.  Among other things, this fixes the crash on
startup that is now triggered due to eba235f2.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-29 17:15:07 -08:00
Josh Durgin
585fb5cef9 clitests: update for new error format
This was changed in 1f434da8a3

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-12-29 15:43:55 -08:00
Josh Durgin
cec2692ea3 clitests: update monmaptool test
e93961c111 changed output format.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-12-29 15:28:16 -08:00
Florian Haas
48df71c854 init script: be LSB compliant for exit code on status
An exit code of 1 on status is defined in LSB as
"program is dead, but pid file exists". Check for existence
of this pid file, and only set the exit status 1 if it's still there.
Set it to 3 ("program is not running") otherwise.

Reference: http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

Signed-off-by: Florian Haas <florian@hastexo.com>
2011-12-29 12:00:02 -08:00
Sage Weil
3b2ca7cf9b keyring: print more useful errors to log/err
Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-29 11:58:28 -08:00
Sage Weil
eba235f26c common: trigger all observers on startup
Among other things, this makes err-to-stderr and friends initialize
properly in the DoutStreamBuf.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-29 11:57:55 -08:00
Sage Weil
1f434da8a3 common: make cpp_strerror output prettier
Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-29 11:24:50 -08:00
Sage Weil
04c8db001a librados: check for monclient::init() error
I think this fixes #1835.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-29 11:24:12 -08:00
Sage Weil
37013b6fe5 qa: load-gen-mix-small.sh 2011-12-29 09:59:26 -08:00
Yehuda Sadeh
1a59405c2f rgw: turn on cache by default 2011-12-29 09:59:26 -08:00
Sage Weil
959fd71f69 osd: explicitly track leading edge of backfill
backfill_pos is the leading edge; last_backfill is the trailing edge.
Anything inbetween is either pushed, doesn't exist, or in
backfills_in_flight.

For operations on non-degraded (in-progress) objects in that window, book
the stats update in pending_backfill_updates so that it will get applied
when last_backfill is advanced.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-12-29 09:41:00 -08:00
Sage Weil
d24ea23585 mds: assert if we get an EINVAL on our truncate
Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-29 09:09:01 -08:00
Sage Weil
47013c289e osd: get fsid from monmap, not osdmap
We may not have a valid OSDMap in all of these cases (notably, during
boot).  Always take the fsid from the monmap, which will be valid after
we've authenticated.

This fixes messages like

2011-12-29 08:53:44.530830 7ff3595e2700 mon.a@0(leader).pg v5 handle_statfs on fsid 00000000-0000-0000-0000-000000000000 != f8a6383d-5fbe-4f65-907e-f8d09e1d540d

on the monitor from MPGStats messages with a bad fsid right after osd boot.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-29 09:00:46 -08:00
Sage Weil
05cc4eb93c monc: get latest monmap during authentication
Tell the monitor which monmap version we have in our initial auth message.
Make the monitor send the latest monmap if it has something newer.  This
ensures that once authentication completes the monclient has the latest
monmap and a valid fsid.

Fixes: #1848
Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-29 08:59:00 -08:00
Sage Weil
300c758421 osd: catch authenticate error on startup
Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-29 08:44:03 -08:00
Greg Farnum
5d5c9b6fc3 osdmap: add const markers to some unfixed functions
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-12-29 08:44:03 -08:00
Yehuda Sadeh
e18b1c9734 rgw: removing swift user index when removing user 2011-12-28 17:00:19 -08:00
Yehuda Sadeh
997e35aeee rgw-admin: remove subuser index when required 2011-12-28 16:50:36 -08:00
Sage Weil
1f40031f43 osd: fix push completion check
Only check backfill if we pushed to the backfill target.  And avoid teh hash
lookup in the general case.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-12-28 16:42:00 -08:00
Yehuda Sadeh
2dc90d032d rgw: clone operation should only update index for main category 2011-12-28 16:34:03 -08:00
Yehuda Sadeh
bb52b18725 rgw: fix cache interface (was not overloading method) 2011-12-28 16:33:14 -08:00
Yehuda Sadeh
0db9a42330 rgw: fix bucket creation 2011-12-28 15:10:10 -08:00
Yehuda Sadeh
4ac04e8978 rgw: write bucket info in one operation 2011-12-23 12:47:16 -08:00
Greg Farnum
60bbf68891 Objecter: fix local reads one more time.
Document it a little since we've gotten it wrong so often.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-12-23 09:56:42 -08:00
Samuel Just
eb37637f73 Merge remote branch 'upstream/master' into wip-backfill
Conflicts:
	src/include/object.h

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-12-22 17:41:40 -08:00
Samuel Just
1f02e34cb5 ReplicatedPG: objects currently begin backfilled are degraded
pending_stat_updates has also been renamed to pending_backfill_updates.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-12-22 17:38:39 -08:00
Samuel Just
d2eb119a3d ReplicatedPG: fill in backfill_peer in on_activate
Previously, there was a race between issue_repop/do_op and
start_recovery_ops.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-12-22 17:24:13 -08:00
Samuel Just
517ddf8435 ReplicatedPG: only pull in one backfill peer at a time
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-12-22 17:17:40 -08:00
Sage Weil
855e93b6de filestore: fix config observer
Actually, I don't think this was fully implemented to begin with, so it's
not a 'fix' per se.  This will let you use injectargs to adjust the
filestore config options during runtime.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-12-22 15:25:20 -08:00
Samuel Just
decdc363f2 MOSDPGRepScrub: Fix typo in MOSDPGRepScrub
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-12-22 15:18:20 -08:00
Samuel Just
8b8aab8473 PG: update stats from master only if not backfilling
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-12-22 14:33:21 -08:00
Samuel Just
298b134981 PG: backfill info should be cleared on recovery reset
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-12-22 14:33:21 -08:00
Samuel Just
3b90df0de1 ReplicatedPG: init backfill infos to last_backfill
We can scan starting from last_backfill to avoid rescanning portions
of the collection recovered by normal recovery.  collection_list_partial
now includes begin if present.  next will be <= the next object in the
collection.  This way we can scan starting at last_backfill without
skipping last_backfill.

Signed-off-by: Samuel Just <rexludorum@gmail.com>
2011-12-22 14:33:21 -08:00
Samuel Just
db04d680f6 ReplicatedPG: update last_backfill when pushes complete
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-12-22 14:33:21 -08:00