Commit Graph

22709 Commits

Author SHA1 Message Date
Sage Weil
595dd0ec60 Merge branch 'next' 2012-12-03 15:33:29 -08:00
Sage Weil
26045573e8 test_rados_api_misc: fix dup rmmkey test
We now expect ENONET as of 9961640f76
again.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-03 15:33:03 -08:00
John Wilkins
f2c7a60c90 doc: Fixed many hyperlinks, a few typos, and some minor clarifications.
fixes: #3564

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-12-03 12:22:37 -08:00
John Wilkins
a7a3cbf8fc doc: Clarified example for root user.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-12-03 10:48:10 -08:00
Sage Weil
5bea57bfd0 config: we still want osd_thread_recovery_timeout
Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-03 03:56:15 -08:00
Sam Lang
e686cb14e9 config: Remove unused options
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-12-03 03:44:36 -08:00
Sam Lang
6b105ae0b7 client: Fix ceph_mount() when subdir is specified
If a subdirectory is specified to ceph_mount, the
root inode does not have an ino of CEPH_INO_ROOT, so
cwd will fail to ever find root and eventially hits
an assertion in in->get_first_parent().  This fix uses
the inode stored in the root member instead, ensuring
that we stop wherever the mount is rooted.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-12-03 03:44:34 -08:00
Sage Weil
f57a79809c osd: EINVAL on unknown TMAP op code
The old/slow implementation did this, but the optimized version did
not.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-03 03:42:17 -08:00
Sage Weil
4870b43cab mds: use TMAP_RMSLOPPY op when removing dentries
After replay, we don't know if the dentry removal has already been
committed.  Use a sloppy removal so that we succeed even if we are
repeating the operation.

Conveniently, the previous implementation (pre v0.55) silently ignored
tmap op codes it did not understand, which means this new RMSLOPPY will
be interpreted the same as an actual RMSLOPPY.  That means an v0.55
mds can run against an older osd (say, argonaut) without problems.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-03 03:42:17 -08:00
Sage Weil
272e89d913 osd: add TMAP_RMSLOPPY op
Remove a key, but succeed if key already does not exist.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-03 03:42:17 -08:00
Sage Weil
9961640f76 osd: ENOENT on TMAP_RM on non-existent key
This reverts 29fae494d0b1459c8bb934d42446e0ada7355402 and fixes the
alternate implmentation added by 8e91d00b52808aa1a4e3a838deda34a439.
librbd relies the ENOENT return value.

Reported-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-03 03:42:17 -08:00
Sage Weil
c10958e4fb osd: fix RepModify when past last_peering_reset
If we apply or commit a RepModify from a prevous perring interval, we need
to free it.

This fixes 'slow request' messages when in fact clients requests are not
delayed, and plugs the related memory leak.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-01 22:41:27 -08:00
Yehuda Sadeh
2d0cfce8bd Merge remote-tracking branch 'origin/wip-coverity' 2012-12-01 19:32:07 -08:00
Sage Weil
fab0976d16 Merge remote-tracking branch 'gh/next' 2012-12-01 18:23:02 -08:00
Sage Weil
880a185625 OutputDataSocket: fix uninit var
CID 745933 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "data_size" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-01 16:57:00 -08:00
Sage Weil
3a064dcfb7 rgw: fix uninit var
CID 745935 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "expiration" is not initialized in this constructor nor in any functions that it calls.

At (2): Non-static class member "min_len" is not initialized in this constructor nor in any functions that it calls.
At (4): Non-static class member "max_len" is not initialized in this constructor nor in any functions that it calls.
At (6): Non-static class member "ret" is not initialized in this constructor nor in any functions that it calls.
At (8): Non-static class member "len" is not initialized in this constructor nor in any functions that it calls.
At (10): Non-static class member "ofs" is not initialized in this constructor nor in any functions that it calls.
At (12): Non-static class member "supplied_md5_b64" is not initialized in this constructor nor in any functions that it calls.
At (14): Non-static class member "supplied_etag" is not initialized in this constructor nor in any functions that it calls.
CID 745934 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
At (16): Non-static class member "data_pending" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-01 16:57:00 -08:00
Sage Weil
648c7f0cec test/osdc/FakeWriteback: fix uninit var
CID 745936 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "m_off" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-01 16:56:50 -08:00
Sage Weil
0dac9e69e3 osd: fix missing unlock; simplify
Instead of a special-case exit, just skip the con replacement.  Continue
on to mark the old con down.

CID 745920 (#1 of 1): Missing unlock (LOCK)
At (8): Returning without unlocking "this->heartbeat_lock._m".

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-01 16:56:48 -08:00
Dan Mick
7794de61b5 rbd: report striping as a feature in rbd info
Fixes: #3549
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-11-30 23:14:05 -08:00
Samuel Just
dccf6ee4d5 ceph-osd: put g_ceph_context before exit
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-11-30 20:57:04 -08:00
Samuel Just
49f32cee64 ReplicatedPG: only increment active_scrub on primary for final push
We only queue the _applied_recovered_object callback on the primary for the
final push.  It is this callback which decrements active_pushes.  It's ok to
not increment active_pushes for the intermediate pushes since these only affact
a temp file.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-11-30 14:04:53 -08:00
Sage Weil
246eb7b2af Merge remote-tracking branch 'gh/wip-osd-msgr' 2012-11-30 12:12:23 -08:00
Samuel Just
a928b6dbf6 OSDService: make messengers private
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-11-30 11:20:41 -08:00
Samuel Just
47699f39b9 osd/: make OSDService messenger helpers return ConnectionRef
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-11-30 11:08:55 -08:00
Joao Eduardo Luis
494711e6c9 mon: PaxosService: cancel proposal timer after election
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-11-30 09:37:07 -08:00
Sage Weil
7412bd3675 Merge remote-tracking branch 'gh/wip-mds-ls2'
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-11-30 08:26:25 -08:00
Sage Weil
9cd730bd50 doc: update kernel recs
Mention which stable kernels we recommend.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-30 08:22:00 -08:00
David Zafman
dc93132d8c logrotate: fix rotation
Fixes: #3554
Always reload with Upstart because in some configs the init.d script doesn't work

Signed-off-by: David Zafman <david.zafman@inktank.com>
2012-11-29 18:18:13 -08:00
Sage Weil
909b92e812 mds: assert segements not emtpy in get_current_segment()
Only one caller can tolerate no segments; make a new
peek_current_segment() for them.

Motivated by paranoia tracking down a crash during client unmount, but
it wasn't this.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-29 17:21:52 -08:00
Sage Weil
f0c2920e02 mds: be explicit about MDRequest killed state
Set the killed flag and use that instead of inferring things from
the session xlist.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-29 17:21:45 -08:00
Sage Weil
41ef9bbbe8 mds: drop redundant mdr->committing = true
journal_and_reply() does this.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-29 17:20:27 -08:00
Sage Weil
44bc687d98 mds: fix request_kill()
Only request_cleanup() if the request isn't already committing.  If it
is, wait for it to commit before we clean up.

It might fix all of #3531, #3210, #1947, and #1548.  Maybe.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-29 17:20:16 -08:00
Sage Weil
0ffafb3106 Revert "osd: fix leak of heartbeat con on reset"
This reverts commit b31a99abda.
2012-11-29 17:03:30 -08:00
Sage Weil
abd9e36c5d client: only dump cache on umount if we time out
We don't want to dump the cache every time an item is trimmed and the
mount_cond gets signaled; this can make umount crazy-slow when logging is
turned up.

Instead, only dump if we wait 5 seconds without making any progress on
shrinking the cache.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-29 16:47:26 -08:00
Yehuda Sadeh
bea3ecf074 rgw: treat lack of swift token as anonymous user access
Fixes: 3534
If a swift token hasn't been provided, set user as anonymous.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-11-29 16:06:11 -08:00
Sage Weil
c26dc1885d Merge branch 'next'
Conflicts:
	src/rgw/rgw_admin.cc
2012-11-29 15:48:54 -08:00
Sage Weil
77711ddee3 Merge remote-tracking branch 'gh/wip_next_bugs' into next 2012-11-29 15:47:26 -08:00
Sage Weil
ef39773c18 Merge remote-tracking branch 'gh/wip-mon-osd-create-fix' into next 2012-11-29 15:34:32 -08:00
Yehuda Sadeh
6a69083dce radosgw-admin: close storage before exit
Fixes: #3560
This will remove watches off notification objects.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-11-29 15:33:22 -08:00
Sage Weil
774d5bf14c osd: move next_osdmap under separate lock
It doesn't actually interfere with publish_lock, and the current osdmap
ref.

Document what is going on.

Always preceed publish_map() with one or more pre_publish_map() calls.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-29 15:15:31 -08:00
Sage Weil
b31a99abda osd: fix leak of heartbeat con on reset
If we replace our old con, drop the reference.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-29 15:15:31 -08:00
Sage Weil
3ceaec4ced osd: use safe con helpers for scrub
Note that if we don't get a con our behavior largely does not matter, since
we know we are about to get a Reset event anyway.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-29 15:15:31 -08:00
Sage Weil
f865f26067 osd: use safe con helpers from do_{infos,queries,notifies}
Ensure we don't reopen connections to downloads.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-29 15:15:30 -08:00
Sage Weil
30832f5aed osd: make _share_map_outgoing() use a Connection
Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-29 15:15:30 -08:00
Sam Lang
7d27e2e95c client: Fix for #3490 and config option to test
If the mds revokes our cache cap, and we follow
the _read_sync() path, on a zero-byte file the
osd returns ENOENT.  We need to replace ENOENT
with a return of 0 in this case.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-11-29 15:04:06 -08:00
Sam Lang
f9056f5bd7 test/libcephfs: Test reading an empty file
This tests a bug (#3490) in the Client::_read_sync
codepath, and should be run with conf->client_read_sync_always
set to true.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-11-29 15:04:06 -08:00
Samuel Just
5c8cbd2820 PG: scrubber.end should be exactly a boundary
Let scrubber.end be (foo, HEAD, 10) where the oid is foo , HEAD is the
snap, and 10 is the hash and scrubber.begin similarly be (bar, 5, 1).

After choosing to scan [(bar, 5, 1), (foo, HEAD, 10)), we block writes
on that interval.

1) A write might then come in for foo (which isn't blocked) which
creates a new snap (foo, 400, 10) which happens to fall in the interval.
This will result in a crash in _scrub() when it attempts to compare
clones since it will get (foo, 400, 10) but not the head object
(foo, HEAD, 10).

2) Alternately, the write from 1) has already happened.  When we scan
the log, we find 34'10 and 34'11 are the clone operation creating
(foo, 400, 10) and the modify on (foo, HEAD, 10) respectively.  Both
primary and replica will wait for last_update_applied to be 34'10
before scanning, but last_update_applied will in fact skip to 34'11
since 34'10 and 34'11 happened in the same transaction.  This can
result in IO hanging on the scrubber interval.

Instead, we ensure that scrubber.end is exactly a hash boundary
(min hobject_t a with the specified hash).  No such object can
exist since we don't create objects with empty oids, so no writes
can occur on that object.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-11-29 13:57:55 -08:00
Samuel Just
206f39e3b8 ReplicatedPG: remove from snap_collections even without objects to trim
Also, make sure to write_info after updating snap_collections.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-11-29 13:51:52 -08:00
Samuel Just
8218d8ac0b OSD: get_or_create_pg return null if pool is gone
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-11-29 13:51:52 -08:00
Samuel Just
f4f93f82e5 OSD: history.last_epoch_started should start at 0
history.last_epoch_started marks a lower bound on the last epoch at
which the pg went active.  As with info.last_epoch_started, it should be
0 prior to the first activation.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-11-29 13:51:52 -08:00