]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agomds: assert segements not emtpy in get_current_segment()
Sage Weil [Thu, 29 Nov 2012 05:21:15 +0000 (21:21 -0800)]
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>
13 years agomds: be explicit about MDRequest killed state
Sage Weil [Thu, 29 Nov 2012 05:19:37 +0000 (21:19 -0800)]
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>
13 years agomds: drop redundant mdr->committing = true
Sage Weil [Thu, 29 Nov 2012 05:16:31 +0000 (21:16 -0800)]
mds: drop redundant mdr->committing = true

journal_and_reply() does this.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomds: fix request_kill()
Sage Weil [Thu, 29 Nov 2012 05:19:01 +0000 (21:19 -0800)]
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>
13 years agoclient: only dump cache on umount if we time out
Sage Weil [Fri, 30 Nov 2012 00:45:52 +0000 (16:45 -0800)]
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>
13 years agorgw: treat lack of swift token as anonymous user access
Yehuda Sadeh [Fri, 30 Nov 2012 00:04:41 +0000 (16:04 -0800)]
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>
13 years agoMerge branch 'next'
Sage Weil [Thu, 29 Nov 2012 23:48:54 +0000 (15:48 -0800)]
Merge branch 'next'

Conflicts:
src/rgw/rgw_admin.cc

13 years agoMerge remote-tracking branch 'gh/wip_next_bugs' into next
Sage Weil [Thu, 29 Nov 2012 23:47:26 +0000 (15:47 -0800)]
Merge remote-tracking branch 'gh/wip_next_bugs' into next

13 years agoMerge remote-tracking branch 'gh/wip-mon-osd-create-fix' into next
Sage Weil [Thu, 29 Nov 2012 23:34:32 +0000 (15:34 -0800)]
Merge remote-tracking branch 'gh/wip-mon-osd-create-fix' into next

13 years agoradosgw-admin: close storage before exit
Yehuda Sadeh [Thu, 29 Nov 2012 23:30:17 +0000 (15:30 -0800)]
radosgw-admin: close storage before exit

Fixes: #3560
This will remove watches off notification objects.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agoclient: Fix for #3490 and config option to test
Sam Lang [Thu, 29 Nov 2012 18:19:51 +0000 (12:19 -0600)]
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>
13 years agotest/libcephfs: Test reading an empty file
Sam Lang [Thu, 29 Nov 2012 18:14:19 +0000 (12:14 -0600)]
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>
13 years agoPG: scrubber.end should be exactly a boundary
Samuel Just [Wed, 28 Nov 2012 23:10:43 +0000 (15:10 -0800)]
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>
13 years agoReplicatedPG: remove from snap_collections even without objects to trim
Samuel Just [Thu, 15 Nov 2012 21:35:47 +0000 (13:35 -0800)]
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>
13 years agoOSD: get_or_create_pg return null if pool is gone
Samuel Just [Thu, 29 Nov 2012 19:28:25 +0000 (11:28 -0800)]
OSD: get_or_create_pg return null if pool is gone

Signed-off-by: Samuel Just <sam.just@inktank.com>
13 years agoOSD: history.last_epoch_started should start at 0
Samuel Just [Wed, 28 Nov 2012 00:00:03 +0000 (16:00 -0800)]
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>
13 years agoPG: maintain osd local last_epoch_started for find_best_info
Samuel Just [Wed, 21 Nov 2012 21:59:22 +0000 (13:59 -0800)]
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>
13 years agohobject_t: make max private
Samuel Just [Thu, 29 Nov 2012 21:51:41 +0000 (13:51 -0800)]
hobject_t: make max private

Signed-off-by: Samuel Just <sam.just@inktank.com>
13 years agoScript to install and configure radosgw.
tamil [Thu, 29 Nov 2012 21:46:43 +0000 (13:46 -0800)]
Script to install and configure radosgw.

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
13 years agoMerge branch 'wip-mon-store-errorcheck' into next
Greg Farnum [Thu, 29 Nov 2012 21:23:02 +0000 (13:23 -0800)]
Merge branch 'wip-mon-store-errorcheck' into next

Reviewed-by: Joao Luis <joao.luis@inktank.com>
13 years agoMerge remote-tracking branch 'origin/wip-rgw-leak' into next
Yehuda Sadeh [Thu, 29 Nov 2012 21:07:09 +0000 (13:07 -0800)]
Merge remote-tracking branch 'origin/wip-rgw-leak' into next

Conflicts:
src/rgw/rgw_main.cc

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agomon: Monitor: don't allow '+' or '-' prefixed values on parse_pos_long()
Joao Eduardo Luis [Thu, 29 Nov 2012 21:03:05 +0000 (21:03 +0000)]
mon: Monitor: don't allow '+' or '-' prefixed values on parse_pos_long()

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agomon: OSDMonitor: return -EINVAL on not-a-uuid during 'osd create'
Joao Eduardo Luis [Thu, 29 Nov 2012 16:42:16 +0000 (16:42 +0000)]
mon: OSDMonitor: return -EINVAL on not-a-uuid during 'osd create'

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agotest_cls_rgw.c: Call to cls_rgw_bucket_complete_op() needs new parameter.
Gary Lowell [Thu, 29 Nov 2012 02:11:47 +0000 (18:11 -0800)]
test_cls_rgw.c:  Call to cls_rgw_bucket_complete_op() needs new parameter.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
13 years agomon: add WARN_UNUSED_RESULT to the MonitorStore functions that return error codes
Greg Farnum [Thu, 29 Nov 2012 00:26:54 +0000 (16:26 -0800)]
mon: add WARN_UNUSED_RESULT to the MonitorStore functions that return error codes

Signed-off-by: Greg Farnum <greg@inktank.com>
13 years agomon: remove the silly write_bl_ss write_bl_ss_impl distinction
Greg Farnum [Thu, 29 Nov 2012 00:17:24 +0000 (16:17 -0800)]
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>
13 years agomon: convert store users with unchecked return codes to just assert on issues
Greg Farnum [Thu, 29 Nov 2012 00:16:15 +0000 (16:16 -0800)]
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>
13 years agomon: update Paxos::read()'s successful read check
Greg Farnum [Wed, 28 Nov 2012 22:35:20 +0000 (14:35 -0800)]
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>
13 years agomon: add new get_bl_[sn|ss]_safe functions
Greg Farnum [Wed, 28 Nov 2012 22:27:10 +0000 (14:27 -0800)]
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>
13 years agomon: In MonitorStore, wrap all uses of ::close and assert success
Greg Farnum [Wed, 28 Nov 2012 20:35:25 +0000 (12:35 -0800)]
mon: In MonitorStore, wrap all uses of ::close and assert success

Signed-off-by: Greg Farnum <greg@inktank.com>
13 years agocreate qa/workunits/rbd/map-unmap.sh
Alex Elder [Wed, 28 Nov 2012 23:07:43 +0000 (17:07 -0600)]
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>
13 years agoMerge branch 'wip-3532-2'
Yehuda Sadeh [Wed, 28 Nov 2012 21:56:27 +0000 (13:56 -0800)]
Merge branch 'wip-3532-2'

13 years agorgw: bucket check --check-objects
Yehuda Sadeh [Wed, 28 Nov 2012 21:50:08 +0000 (13:50 -0800)]
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>
13 years agorgw: check_disk_state() removes multipart parts from index
Yehuda Sadeh [Wed, 28 Nov 2012 00:35:48 +0000 (16:35 -0800)]
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>
13 years agolog: 10,000 recent log entries
Sage Weil [Wed, 28 Nov 2012 21:00:36 +0000 (13:00 -0800)]
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>
13 years agolog: fix log_max_recent config
Sage Weil [Wed, 28 Nov 2012 20:59:43 +0000 (12:59 -0800)]
log: fix log_max_recent config

<facepalm>

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: check all uses of fsync in the MonitorStore for errors
Greg Farnum [Wed, 28 Nov 2012 20:35:11 +0000 (12:35 -0800)]
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>
13 years agoMakefile: fix libcephfs for gcov and cleanups
Noah Watkins [Wed, 28 Nov 2012 19:28:52 +0000 (11:28 -0800)]
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>
13 years agorbd: fix import from stdin, add test
Dan Mick [Wed, 28 Nov 2012 00:54:43 +0000 (16:54 -0800)]
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 c99d9c3ae782597984f0c67dd1488fb95bd2ce54)

13 years agorbd: allow export to stdout, add tests
Dan Mick [Wed, 28 Nov 2012 01:06:43 +0000 (17:06 -0800)]
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 a738f44bc4e23c8ad18f24a835fe253d5b27b9d9)

13 years agomon: fix compiler warning
Sage Weil [Wed, 28 Nov 2012 19:11:53 +0000 (11:11 -0800)]
mon: fix compiler warning

signed/unsigned comparison

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoos/DBObjectMap.h: remove twice included <string>
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:31 +0000 (13:57 +0100)]
os/DBObjectMap.h: remove twice included <string>

Fix includes: remove twice included <string>

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
13 years agomds/journal.cc: remove twice included common/config.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:26 +0000 (13:57 +0100)]
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>
13 years agomon/Monitor.cc: remove twice included osd/OSDMap.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:28 +0000 (13:57 +0100)]
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>
13 years agomessages/MClientRequest.h: remove twice included sys/types.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:27 +0000 (13:57 +0100)]
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>
13 years agomount/canonicalize.c: remove twice included string.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:29 +0000 (13:57 +0100)]
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>
13 years agocommon/pipe.c: remove twice included unistd.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:18 +0000 (13:57 +0100)]
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>
13 years agocrushtool.cc: remove twice included sys/stat.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:19 +0000 (13:57 +0100)]
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>
13 years agorgw/rgw_rest.cc: remove twice included rgw_formats.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:37 +0000 (13:57 +0100)]
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>
13 years agoos/DBObjectMap.cc: remove twice included headers
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:30 +0000 (13:57 +0100)]
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>
13 years agoremove twice included linux/types.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:36 +0000 (13:57 +0100)]
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>
13 years agorados.cc: remove twice included headers
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:35 +0000 (13:57 +0100)]
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>
13 years agoosdmaptool.cc: remove twice included sys/stat.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:34 +0000 (13:57 +0100)]
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>
13 years agoos/IndexManager.cc: remove twice included FlatIndex.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:32 +0000 (13:57 +0100)]
os/IndexManager.cc: remove twice included FlatIndex.h

Fix includes: remove twice included FlatIndex.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
13 years agoosd/OSD.h: remove twice included OpRequest.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:33 +0000 (13:57 +0100)]
osd/OSD.h: remove twice included OpRequest.h

Fix includes: remove twice included OpRequest.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
13 years agotools/common.cc: remove twice included headers
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:38 +0000 (13:57 +0100)]
tools/common.cc: remove twice included headers

Cleanup includes: Remove twice included  sys/stat.h and  osd/OSDMap.h.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
13 years agomds/Resetter.h: remove twice included msg/Messenger.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:25 +0000 (13:57 +0100)]
mds/Resetter.h: remove twice included msg/Messenger.h

Fix includes: remove twice included msg/Messenger.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
13 years agomds/Migrator.cc: remove twice included Migrator.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:24 +0000 (13:57 +0100)]
mds/Migrator.cc: remove twice included Migrator.h

Fix includes: remove twice included Migrator.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
13 years agomds/Dumper.h: remove twice included msg/Messenger.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:23 +0000 (13:57 +0100)]
mds/Dumper.h: remove twice included msg/Messenger.h

Fix includes: remove twice included msg/Messenger.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
13 years agolibrados/RadosClient.cc: remove twice included sys/stat.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:22 +0000 (13:57 +0100)]
librados/RadosClient.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>
13 years agoinclude/buffer.h: remove twice included stdio.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:21 +0000 (13:57 +0100)]
include/buffer.h: remove twice included stdio.h

Fix includes: remove twice included stdio.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
13 years agomonmaptool.cc: remove twice included sys/stat.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:20 +0000 (13:57 +0100)]
monmaptool.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>
13 years agoclient/SyntheticClient.cc: remove twice included headers
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:17 +0000 (13:57 +0100)]
client/SyntheticClient.cc: remove twice included headers

Fix includes: remove twice included common/config.h and sys/types.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
13 years agofusetrace_ll.cc: remove twice included sys/time.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:09 +0000 (13:57 +0100)]
fusetrace_ll.cc: remove twice included sys/time.h

Fix includes: remove twice included sys/time.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
13 years agoceph_syn.cc: remove twice included sys/stat.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:14 +0000 (13:57 +0100)]
ceph_syn.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>
13 years agoceph_osd.cc: remove twice included sys/stat.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:13 +0000 (13:57 +0100)]
ceph_osd.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>
13 years agoclient/MetaRequest.cc: remove twice included client/Dentry.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:16 +0000 (13:57 +0100)]
client/MetaRequest.cc: remove twice included client/Dentry.h

Fix includes: remove twice included client/Dentry.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
13 years agoclient/Client.cc: remove twice included headers
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:15 +0000 (13:57 +0100)]
client/Client.cc: remove twice included headers

Fix includes: remove twice included common/config.h". Remove include
of sys/param.h in special __FreeBSD__ section, since this file is
included in general anyway

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
13 years agoceph_mds.cc: remove twice included sys/stat.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:11 +0000 (13:57 +0100)]
ceph_mds.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>
13 years agoceph_fuse.cc: remove twice included sys/stat.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:10 +0000 (13:57 +0100)]
ceph_fuse.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>
13 years agoceph_mon.cc: remove twice included sys/stat.h
Danny Al-Gaaf [Wed, 28 Nov 2012 12:57:12 +0000 (13:57 +0100)]
ceph_mon.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>
13 years agomon: do not crash on invalid 'mon tell N ...' target
Sage Weil [Wed, 28 Nov 2012 04:47:31 +0000 (20:47 -0800)]
mon: do not crash on invalid 'mon tell N ...' target

Fixes: #3545
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agorbd: fix import from stdin, add test
Dan Mick [Wed, 28 Nov 2012 00:54:43 +0000 (16:54 -0800)]
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>
13 years agorbd: allow export to stdout, add tests
Dan Mick [Wed, 28 Nov 2012 01:06:43 +0000 (17:06 -0800)]
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>
13 years agoconfig: make $pid a metavariable
Sage Weil [Tue, 27 Nov 2012 01:46:14 +0000 (17:46 -0800)]
config: make $pid a metavariable

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agotest_rados_api_misc: fix TMAPPUT sorting test
Sage Weil [Wed, 28 Nov 2012 00:52:30 +0000 (16:52 -0800)]
test_rados_api_misc: fix TMAPPUT sorting test

Several things wrong here.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoREADME: add the libboost-thread-dev dep to the list
Sam Lang [Tue, 27 Nov 2012 23:21:40 +0000 (17:21 -0600)]
README: add the libboost-thread-dev dep to the list

Signed-off-by: Sam Lang <sam.lang@inktank.com>
13 years agoMerge branch 'next'
Sage Weil [Tue, 27 Nov 2012 22:29:04 +0000 (14:29 -0800)]
Merge branch 'next'

13 years agoMerge branch 'wip-mds-next' into next
Sage Weil [Tue, 27 Nov 2012 22:13:09 +0000 (14:13 -0800)]
Merge branch 'wip-mds-next' into next

OSD bits Reviewed-by: Sam Just <sam.just@inktank.com>
MDS bits Reviewed-by: Sage Weil <sage@inktank.com>

13 years agoosd: detect (some) misordered ondisk tmaps
Sage Weil [Mon, 26 Nov 2012 21:17:30 +0000 (13:17 -0800)]
osd: detect (some) misordered ondisk tmaps

Detect a misordered ondisk tmap... if we are already decoding it.  We still
leave the trailing bits unchecked.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoosd: verify TMAPPUT data is sorted
Sage Weil [Mon, 26 Nov 2012 16:25:20 +0000 (08:25 -0800)]
osd: verify TMAPPUT data is sorted

The MDS may try to write unsorted data; make sure it is sorted before
we write it.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoosd: do not ENOENT on missing key on remove
Sage Weil [Sun, 25 Nov 2012 22:27:23 +0000 (14:27 -0800)]
osd: do not ENOENT on missing key on remove

The MDS may include RM ops in a tmap update for items that were already
removed: after restarting and replaying the journal, it doesn't know
which dentries were previously committed and which were not.

No other (known) users care about the error code.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoosd: tolerate misordered TMAP updates
Sage Weil [Sun, 25 Nov 2012 22:24:08 +0000 (14:24 -0800)]
osd: tolerate misordered TMAP updates

The previous tmap implementation requires that the update stream be
sorted or else it will behave erratically (by placing new keys in the
map out of order).  This can cause very strange failures: reads may
appear to return the correct result initially, but once intervening
keys are remove they will not... depending on how read is implemented
on the client side.

Fix this by doing the optimized updates initially, but falling back to
a slow implementation if an unsorted update is detected.  It is slow,
but such updates are rare.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoosd: move tmapup into a helper
Sage Weil [Sun, 25 Nov 2012 21:54:08 +0000 (13:54 -0800)]
osd: move tmapup into a helper

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agorbd workunit: Add tests for clones across pools
Dan Mick [Tue, 27 Nov 2012 05:29:53 +0000 (21:29 -0800)]
rbd workunit: Add tests for clones across pools

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit ece11b0ed97ac6207980b412e3b2afe869065fff)

13 years agorbd workunit: Make "remove_images" silent
Dan Mick [Tue, 27 Nov 2012 05:29:37 +0000 (21:29 -0800)]
rbd workunit: Make "remove_images" silent

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 0be9b15b7972252505cbd838fd9d45e0e04404bf)

13 years agorbd workunit: Add tests for cross-pool rename
Dan Mick [Tue, 27 Nov 2012 04:42:05 +0000 (20:42 -0800)]
rbd workunit: Add tests for cross-pool rename

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit a96ede944f1a227960877dee715b1f96895b4228)

13 years agorbd: tests for copy with explicit/implicit pool names
Dan Mick [Fri, 16 Nov 2012 06:49:16 +0000 (22:49 -0800)]
rbd: tests for copy with explicit/implicit pool names

Validate change to not assume dest pool == src pool

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 39180430b9be14a94502b7e5bef30dd582ce3ad8)

13 years agorbd: fix import pool assumptions
Dan Mick [Fri, 16 Nov 2012 06:41:36 +0000 (22:41 -0800)]
rbd: fix import pool assumptions

import allows specifying one image, implicitly or explicitly the
"source" image, even though it's really the destination.  Fix up
the reassignment of 'source' to 'dest', and check for and complain
about specifying two different pools or images for import.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit c219698149c2fe4d2539f0bc1e2009b937aa4250)

13 years agorbd: change destpool assumptions.
Dan Mick [Thu, 15 Nov 2012 23:55:10 +0000 (15:55 -0800)]
rbd: change destpool assumptions.

Don't default destpool to srcpool; it's surprising, and
not useful/helpful enough to violate the convention that
"default pool is rbd"

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 3b0c36052806a4574ede6a9f0594dc83f7997bcc)

13 years agorbd: --size fixes
Dan Mick [Thu, 15 Nov 2012 22:52:39 +0000 (14:52 -0800)]
rbd: --size fixes

* require --size/-s for both create *and* resize
* explicitly permit create with size 0.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 08f47a42b5dcf77c40e3c1472739554452993412)

13 years agorbd: allow parsing image@snap even if --pool given
Dan Mick [Thu, 15 Nov 2012 22:41:46 +0000 (14:41 -0800)]
rbd: allow parsing image@snap even if --pool given

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit e452df6dadd443d135527b49784a47ad21429cc1)

13 years agoMerge remote-tracking branch 'gh/wip-mon-workloadgen' into next
Sage Weil [Tue, 27 Nov 2012 20:54:40 +0000 (12:54 -0800)]
Merge remote-tracking branch 'gh/wip-mon-workloadgen' into next

13 years agotest: mon: run_test.sh: helper script for the mon's workloadgen
Joao Eduardo Luis [Tue, 30 Oct 2012 21:47:33 +0000 (21:47 +0000)]
test: mon: run_test.sh: helper script for the mon's workloadgen

Takes advantage of qa/workunits/mon/workloadgen.sh to avoid duplicating
code.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agoqa: workunits: mon: add workloadgen's workunit
Joao Eduardo Luis [Sun, 4 Nov 2012 17:40:19 +0000 (17:40 +0000)]
qa: workunits: mon: add workloadgen's workunit

Uses test/mon/test_osd_workloadgen to generate a bunch of map
changes

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agotest: mon: workload generator
Joao Eduardo Luis [Fri, 26 Oct 2012 21:59:00 +0000 (22:59 +0100)]
test: mon: workload generator

User-space tool that interacts with the monitor, with the objective of
generating a workload mimicking a set of OSDs and clients.

As it is, the tool will mimic any number of OSDs, by keeping in-memory
stubs that will act as independent OSDs, generating random operations
that will induce map updates; the client stub, on the other hand,
performs no operations besides connecting to the monitor and whatever
happens between the Objecter class and the monitor (mainly keeping
updated with map updates).

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agomessages: MLog: make ctor's uuid argument a const
Joao Eduardo Luis [Sun, 4 Nov 2012 17:38:28 +0000 (17:38 +0000)]
messages: MLog: make ctor's uuid argument a const

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agomon: Monitor: use existing strict_strtol() on parse_pos_long()
Joao Eduardo Luis [Tue, 30 Oct 2012 22:46:24 +0000 (22:46 +0000)]
mon: Monitor: use existing strict_strtol() on parse_pos_long()

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agocrush: relax the order by which rules and buckets must be defined
Joao Eduardo Luis [Tue, 30 Oct 2012 21:37:47 +0000 (21:37 +0000)]
crush: relax the order by which rules and buckets must be defined

Before we only allowed buckets (say, 'root') to be defined *before*
rules.

With this patch, we allow buckets and rules to be defined by any order,
although some care should be taken when creating the plain-text crush
map, or the crushtool will error out when a rule uses a bucket only
defined later on in the file.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agocrushtool: rework how verbosity works
Joao Eduardo Luis [Tue, 30 Oct 2012 21:27:15 +0000 (21:27 +0000)]
crushtool: rework how verbosity works

'verbose' was a bool that would either be passed as one or zero to class
CrushCompile. However, most messages would only be outputted with a
verbose level > 1.

This patch makes it so that multiple '-v' increase the verbosity level;
i.e., -v mean verbose = 1; -v -v means verbose = 2; and so forth.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>