Commit Graph

22666 Commits

Author SHA1 Message Date
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
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
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
Samuel Just
e2c4e2f63b PG: maintain osd local last_epoch_started for find_best_info
In order to proceed with peering, we need an osd with a log including
the last commit sent to a client.  This translates to the oldest
last_update from the infos of the most recent acting set to go active.
history.last_epoch_started gives us a lower bound on the last time the
entire acting set persisted authoratative logs/infos.  However, it
doesn't indicate anything about the info/log on the osd which sent it.
Thus, we will maintain an osd local info.last_epoch_started to determine
which osds were actually active (and thus have the required log
entries).  The max info.last_epoch_started in the prior set gives us an
upper bound on the last interval during which writes occurred.  The min
last_update among the infos with that last_epoch_started must therefore
be an upper bound on the oldest operation which clients consider
committed.  Any osd with an info.last_updated past that version must be
sufficient.

The observed bug was there was an empty pg info with a
last_epoch_started at the most recent interval which pushed
min_last_update_acceptable to eversion_t().  There were two down osds,
but peering proceeded since the backfill peer did survive.  However,
its info was later disregarded due to incomplete.  An empty osd was
then chosen as the best_info since it's last_update was equal to
min_last_update_acceptable.  This caused the contents of the pg to be
lost.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-11-29 13:51:52 -08:00
Samuel Just
82517f1bf0 hobject_t: make max private
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-11-29 13:51:51 -08:00
tamil
0b55fbdbea Script to install and configure radosgw.
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2012-11-29 13:46:43 -08:00
Greg Farnum
e58008e0c0 Merge branch 'wip-mon-store-errorcheck' into next
Reviewed-by: Joao Luis <joao.luis@inktank.com>
2012-11-29 13:23:26 -08:00
Yehuda Sadeh
b0b8bfbdec Merge remote-tracking branch 'origin/wip-rgw-leak' into next
Conflicts:
	src/rgw/rgw_main.cc

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-11-29 13:07:09 -08:00
Joao Eduardo Luis
079dd19044 mon: Monitor: don't allow '+' or '-' prefixed values on parse_pos_long()
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-11-29 21:03:05 +00:00
Joao Eduardo Luis
c6cc476f18 mon: OSDMonitor: return -EINVAL on not-a-uuid during 'osd create'
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-11-29 21:01:46 +00:00
Gary Lowell
4c3d5dce88 test_cls_rgw.c: Call to cls_rgw_bucket_complete_op() needs new parameter.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
2012-11-28 18:11:47 -08:00
Greg Farnum
24d61fa419 mon: add WARN_UNUSED_RESULT to the MonitorStore functions that return error codes
Signed-off-by: Greg Farnum <greg@inktank.com>
2012-11-28 16:28:58 -08:00
Greg Farnum
c762f91a51 mon: remove the silly write_bl_ss write_bl_ss_impl distinction
It was introduced at the same time as all these unchecked return codes,
but I can't tell why.

Signed-off-by: Greg Farnum <greg@inktank.com>
2012-11-28 16:28:58 -08:00
Greg Farnum
399f269d4f mon: convert store users with unchecked return codes to just assert on issues
This will make them much more noticeable and reduce the odds of something
writing data which assumes the previous op succeeded.

Signed-off-by: Greg Farnum <greg@inktank.com>
2012-11-28 16:28:58 -08:00
Greg Farnum
ab312f8deb mon: update Paxos::read()'s successful read check
It was returning success if it got back an error code; don't do that!

Signed-off-by: Greg Farnum <greg@inktank.com>
2012-11-28 16:28:58 -08:00
Greg Farnum
3fe7c6cbe0 mon: add new get_bl_[sn|ss]_safe functions
These functions are like the non-safe versions, but assert that
there were no disk errors and have void return types. Change a
bunch of callers who weren't checking the return code to use
these variants instead.
(Unfortunately we can't make them default safe because several of
the callers depend on getting back the length, and are perfectly happy
with ENOENT producing a 0 return value.)

Signed-off-by: Greg Farnum <greg@inktank.com>
2012-11-28 16:28:51 -08:00
Greg Farnum
60f60ff738 mon: In MonitorStore, wrap all uses of ::close and assert success
Signed-off-by: Greg Farnum <greg@inktank.com>
2012-11-28 16:28:44 -08:00
Alex Elder
dd3a24a647 create qa/workunits/rbd/map-unmap.sh
This adds a bash script that creates an rbd image, then repeatedly
maps and unmaps it for a specified duration (5 minutes by default).

Signed-off-by: Alex Elder <elder@inktank.com>
2012-11-28 17:22:49 -06:00
Yehuda Sadeh
6a36ac5bd6 Merge branch 'wip-3532-2' 2012-11-28 13:56:27 -08:00
Yehuda Sadeh
5d6da25c78 rgw: bucket check --check-objects
A new option that goes through the indexed objects, verifies
their actual state and updates the index accordingly.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-11-28 13:53:29 -08:00
Yehuda Sadeh
e5dc46f6aa rgw: check_disk_state() removes multipart parts from index
Besides suggesting changes to the object's index, we also need
to remove the parts that build the object. This only applies to
parts of multipart objects.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-11-28 13:52:44 -08:00
Sage Weil
78286b1403 log: 10,000 recent log entries
This is what we were (wrongly) doing before, so there are no memory
utilization surprises.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-28 13:00:36 -08:00
Sage Weil
4de7748b72 log: fix log_max_recent config
<facepalm>

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-28 12:59:43 -08:00
Greg Farnum
39b93f5898 mon: check all uses of fsync in the MonitorStore for errors
This can sometimes return errors since it's a storage access, and
we're pretty sure ignoring it is the cause of a broken store we've seen.

Signed-off-by: Greg Farnum <greg@inktank.com>
2012-11-28 12:35:11 -08:00
Noah Watkins
88a3e7d148 Makefile: fix libcephfs for gcov and cleanups
Adds EXTRALIBS, removes unused CFLAGS.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Joe Buck <jbbuck@gmail.com>
2012-11-28 11:59:45 -08:00
Dan Mick
80c506d4b9 rbd: fix import from stdin, add test
Make import work; do I/O in image native block size.
Note: creating sparse images is not currently attempted; could
scan for runs of zeros and write discontiguous chunks to image.

Fixes: #3503
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit c99d9c3ae7)
2012-11-28 11:45:31 -08:00
Dan Mick
fcebe04801 rbd: allow export to stdout, add tests
Fixes: #3502
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit a738f44bc4)
2012-11-28 11:45:27 -08:00
Sage Weil
a176800396 mon: fix compiler warning
signed/unsigned comparison

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-28 11:11:53 -08:00
Danny Al-Gaaf
653f134785 os/DBObjectMap.h: remove twice included <string>
Fix includes: remove twice included <string>

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2012-11-28 08:25:43 -08:00
Danny Al-Gaaf
e7f8e56228 mds/journal.cc: remove twice included common/config.h
Fix includes: remove twice included common/config.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2012-11-28 08:25:43 -08:00
Danny Al-Gaaf
1f3e5ad23e mon/Monitor.cc: remove twice included osd/OSDMap.h
Fix includes: remove twice included osd/OSDMap.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2012-11-28 08:25:43 -08:00
Danny Al-Gaaf
ec2f261762 messages/MClientRequest.h: remove twice included sys/types.h
Fix includes: remove twice included sys/types.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2012-11-28 08:25:43 -08:00
Danny Al-Gaaf
34f6d2911a mount/canonicalize.c: remove twice included string.h
Fix includes: remove twice included string.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2012-11-28 08:25:42 -08:00
Danny Al-Gaaf
54da979d20 common/pipe.c: remove twice included unistd.h
Fix includes: remove twice included unistd.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2012-11-28 08:25:42 -08:00
Danny Al-Gaaf
1341e6d70d crushtool.cc: remove twice included sys/stat.h
Fix includes: remove twice included sys/stat.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2012-11-28 08:25:42 -08:00
Danny Al-Gaaf
0718c1523f rgw/rgw_rest.cc: remove twice included rgw_formats.h
Cleanup includes: Remove twice included rgw_formats.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2012-11-28 08:25:42 -08:00
Danny Al-Gaaf
947b33a231 os/DBObjectMap.cc: remove twice included headers
Fix includes: remove twice included <string> and <tr1/memory>

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2012-11-28 08:25:42 -08:00
Danny Al-Gaaf
a0d978f615 remove twice included linux/types.h
Cleanup includes: remove twice included linux/types.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2012-11-28 08:25:42 -08:00
Danny Al-Gaaf
238f9321db rados.cc: remove twice included headers
Fix includes: remove twice included common/obj_bencher.h and
common/errno.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2012-11-28 08:25:42 -08:00
Danny Al-Gaaf
428d974c17 osdmaptool.cc: remove twice included sys/stat.h
Fix includes: remove twice included sys/stat.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2012-11-28 08:25:42 -08:00