]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoceph-disk: specify the filetype when mounting
Alfredo Deza [Fri, 23 Aug 2013 12:56:07 +0000 (08:56 -0400)]
ceph-disk: specify the filetype when mounting

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit f040020fb2a7801ebbed23439159755ff8a3edbd)

12 years agov0.67.2 v0.67.2
Gary Lowell [Fri, 23 Aug 2013 02:10:55 +0000 (19:10 -0700)]
v0.67.2

12 years ago.gitignore: ignore test-driver
Sage Weil [Fri, 9 Aug 2013 19:49:57 +0000 (12:49 -0700)]
.gitignore: ignore test-driver

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit edf2c3449ec96d91d3d7ad01c50f7a79b7b2f7cc)

12 years agofuse: fix warning when compiled against old fuse versions
Sage Weil [Fri, 9 Aug 2013 19:42:49 +0000 (12:42 -0700)]
fuse: fix warning when compiled against old fuse versions

client/fuse_ll.cc: In function 'void invalidate_cb(void*, vinodeno_t, int64_t, int64_t)':
warning: client/fuse_ll.cc:540: unused variable 'fino'

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 9833e9dabe010e538cb98c51d79b6df58ce28f9e)

12 years agojson_spirit: remove unused typedef
Sage Weil [Fri, 9 Aug 2013 19:40:34 +0000 (12:40 -0700)]
json_spirit: remove unused typedef

In file included from json_spirit/json_spirit_writer.cpp:7:0:
json_spirit/json_spirit_writer_template.h: In function 'String_type json_spirit::non_printable_to_string(unsigned int)':
json_spirit/json_spirit_writer_template.h:37:50: warning: typedef 'Char_type' locally defined but not used [-Wunused-local-typedefs]
         typedef typename String_type::value_type Char_type;

(Also, ha ha, this file uses \r\n.)

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 6abae35a3952e5b513895267711fea63ff3bad09)

12 years agogtest: add build-aux/test-driver to .gitignore
Sage Weil [Fri, 9 Aug 2013 19:31:41 +0000 (12:31 -0700)]
gtest: add build-aux/test-driver to .gitignore

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit c9cdd19d1cd88b84e8a867f5ab85cb51fdc6f8e4)

12 years agoobjecter: resend unfinished lingers when osdmap is no longer paused
Josh Durgin [Wed, 21 Aug 2013 21:28:49 +0000 (14:28 -0700)]
objecter: resend unfinished lingers when osdmap is no longer paused

Plain Ops that haven't finished yet need to be resent if the osdmap
transitions from full or paused to unpaused.  If these Ops are
triggered by LingerOps, they will be cancelled instead (since
should_resend = false), but the LingerOps that triggered them will not
be resent.

Fix this by checking the registered flag for all linger ops, and
resending any of them that aren't paused anymore.

Fixes: #6070
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
(cherry picked from commit 38a0ca66a79af4b541e6322467ae3a8a4483cc72)

12 years agopybind: fix Rados.conf_parse_env test
Sage Weil [Tue, 20 Aug 2013 18:23:46 +0000 (11:23 -0700)]
pybind: fix Rados.conf_parse_env test

This happens after we connect, which means we get ENOSYS always.
Instead, parse_env inside the normal setup method, which had the added
benefit of being able to debug these tests.

Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 6ef1970340c57d6e02f947348fb38882b51d131c)

12 years agolibrados: fix MWatchNotify leak
Sage Weil [Tue, 13 Aug 2013 20:14:59 +0000 (13:14 -0700)]
librados: fix MWatchNotify leak

Do not leak the message if the watcher is not registered.  Also, simplify
this block.

Fixes (part of): #5949
Backport: dumpling, cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 6f5d8036f3e70c5e30edf7e36fb8ff9a56197f60)

12 years agoPG: remove old log when we upgrade log version
Samuel Just [Tue, 20 Aug 2013 00:23:44 +0000 (17:23 -0700)]
PG: remove old log when we upgrade log version

Otherwise the log_oid will be non-empty and the next
boot will cause us to try to upgrade again.

Fixes: #6057
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 1f851cb2489a95526de932ec6734ebf413e43490)

12 years agoPGLog: add a config to disable PGLog::check()
Samuel Just [Mon, 19 Aug 2013 07:02:24 +0000 (00:02 -0700)]
PGLog: add a config to disable PGLog::check()

This is a debug check which may be causing excessive
cpu usage.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 00080d785f6695b800f71317a3048a21064e61cb)

12 years agoceph: parse CEPH_ARGS environment variable
Sage Weil [Mon, 19 Aug 2013 19:48:50 +0000 (12:48 -0700)]
ceph: parse CEPH_ARGS environment variable

Fixes: #6052
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 67a95b9880c9bc6e858150352318d68d64ed74ad)

12 years agorados pybind: add conf_parse_env()
Sage Weil [Mon, 19 Aug 2013 19:48:40 +0000 (12:48 -0700)]
rados pybind: add conf_parse_env()

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit eef7cacdb19313907a9367187b742db5382ee584)

12 years agorgw: drain requests before exiting
Yehuda Sadeh [Tue, 13 Aug 2013 20:16:07 +0000 (13:16 -0700)]
rgw: drain requests before exiting

Fixes: #5953
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 3cbf6a7b031c2ce8072733c5c0b7ceb53fdcb090)

12 years agorgw: do not leak handler in get_handler() error path
Sage Weil [Tue, 13 Aug 2013 18:16:17 +0000 (11:16 -0700)]
rgw: do not leak handler in get_handler() error path

If we fail to initialize, delete the handler.

Fixes (part of): #5949
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 810c52de36719c3ee6cf2bdf59d5cde8840bbe55)

12 years agorgw: fix leak of RGWDataChangesLog::renew_thread
Sage Weil [Sat, 27 Jul 2013 06:20:54 +0000 (23:20 -0700)]
rgw: fix leak of RGWDataChangesLog::renew_thread

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 25948319c4d256c4aeb0137eb88947e54d14cc79)

12 years agorgw: free resolver on shutdown
Sage Weil [Sat, 27 Jul 2013 06:17:10 +0000 (23:17 -0700)]
rgw: free resolver on shutdown

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit a31356338b8ae55df59d829d9080ffad70b97d10)

12 years agorgw: fix up signal handling
Sage Weil [Sat, 27 Jul 2013 06:22:20 +0000 (23:22 -0700)]
rgw: fix up signal handling

OMG libfcgi is annoying with shutdown and signals.  You need to close
the fd *and* resend a signal to ensure that you kick the accept loop
hard enough to make it shut down.

Document this, and switch to the async signal handlers.  Put them
tightly around the runtime loop as we do with other daemons.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 59b13cebee600dad2551d2c7dc3482b05eaf8b22)

12 years agov0.67.1 v0.67.1
Gary Lowell [Sat, 17 Aug 2013 02:39:41 +0000 (19:39 -0700)]
v0.67.1

12 years agoceph.in: --admin-daemon was not returning EINVAL on bad command
Dan Mick [Fri, 16 Aug 2013 00:10:56 +0000 (17:10 -0700)]
ceph.in: --admin-daemon was not returning EINVAL on bad command

Fix by restructuring code to hoist common code and have only one
place where admin_socket is actually called.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 266460e97ec9ef9711e9eaa4bd954f3188d8da69)

12 years agomon: use str_join instead of std::copy
Sage Weil [Thu, 15 Aug 2013 21:37:07 +0000 (14:37 -0700)]
mon: use str_join instead of std::copy

The std::copy method leaves a trailing separator.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 35565ee64e41d7fddc7849c6006692c78227132c)

12 years agoconfig: fix stringification of config values
Sage Weil [Thu, 15 Aug 2013 21:36:57 +0000 (14:36 -0700)]
config: fix stringification of config values

The std::copy construct leaves a trailing separator character, which breaks
parsing for booleans (among other things) and probably mangles everything
else too.

Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit fc23cfe3fe567b30413d8af0c614a32fec238939)

12 years agocommon: add str_join helper
Sage Weil [Thu, 15 Aug 2013 21:36:49 +0000 (14:36 -0700)]
common: add str_join helper

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit ce3a0944d9b47f7b178fe7775c9d105305b238e0)

12 years agorados.py: fix Rados() unicode checking
Josh Durgin [Wed, 14 Aug 2013 22:50:59 +0000 (15:50 -0700)]
rados.py: fix Rados() unicode checking

Check new parameters and check that rados_id is not None again to
catch the empty string.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
(cherry picked from commit 4422f21a6586467a63ce6841552d0f60aa849cf1)

12 years agorados.py: fix Rados() backwards compatibility
Josh Durgin [Wed, 14 Aug 2013 22:28:19 +0000 (15:28 -0700)]
rados.py: fix Rados() backwards compatibility

Previously it had no name parameter, so the default will be used by
old clients. However, if an old client set rados_id, a new check that
both rados_id and name are set would result in an error. Fix this by
only applying the default names after the check, and add tests of this
behavior.

This was introduced in 783b7ec847c7f987ac1814c9c41c91921cac4eba,
so it does not affect cuttlefish.

Fixes: #5970
Reported-by: Michael Morgan <mmorgan@dca.net>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
(cherry picked from commit 34da9cbc33205623cf64aee1989f53dfb2c5bddd)

12 years agolibrados: fix async aio completion wakeup
Sage Weil [Tue, 13 Aug 2013 19:52:41 +0000 (12:52 -0700)]
librados: fix async aio completion wakeup

For aio flush, we register a wait on the most recent write.  The write
completion code, however, was *only* waking the waiter if they were waiting
on that write, without regard to previous writes (completed or not).
For example, we might have 6 and 7 outstanding and wait on 7.  If they
finish in order all is well, but if 7 finishes first we do the flush
completion early.  Similarly, if we

 - start 6
 - start 7
 - finish 7
 - flush; wait on 7
 - finish 6

we can hang forever.

Fix by doing any completions that are prior to the oldest pending write in
the aio write completion handler.

Refs: #5919

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Tested-by: Oliver Francke <Oliver.Francke@filoo.de>
(cherry picked from commit 16ed0b9af8bc08c7dabead1c1a7c1a22b1fb02fb)

12 years agolibrados: fix locking for AioCompletionImpl refcounting
Josh Durgin [Tue, 13 Aug 2013 02:17:09 +0000 (19:17 -0700)]
librados: fix locking for AioCompletionImpl refcounting

Add an already-locked helper so that C_Aio{Safe,Complete} can
increment the reference count when their caller holds the
lock. C_AioCompleteAndSafe's caller is not holding the lock, so call
regular get() to ensure no racing updates can occur.

This eliminates all direct manipulations of AioCompletionImpl->ref,
and makes the necessary locking clear.

The only place C_AioCompleteAndSafe is used is in handling
aio_flush_async(). This could cause a missing completion.

Refs: #5919
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Tested-by: Oliver Francke <Oliver.Francke@filoo.de>
(cherry picked from commit 7a52e2ff5025754f3040eff3fc52d4893cafc389)

12 years agov0.67 v0.67
Gary Lowell [Tue, 13 Aug 2013 17:45:14 +0000 (10:45 -0700)]
v0.67

12 years agorgw: fix multi delete
Yehuda Sadeh [Mon, 12 Aug 2013 17:05:44 +0000 (10:05 -0700)]
rgw: fix multi delete

Fixes: #5931
Backport: bobtail, cuttlefish

Fix a bad check, where we compare the wrong field. Instead of
comparing the ret code to 0, we compare the string value to 0
which generates implicit casting, hence the crash.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoceph-disk: fix mount options passed to move_mount
Sage Weil [Sat, 10 Aug 2013 01:02:32 +0000 (18:02 -0700)]
ceph-disk: fix mount options passed to move_mount

Commit 6cbe0f021f62b3ebd5f68fcc01a12fde6f08cff5 added a mount_options but
in certain cases it may be blank.  Fill in with the defaults, just as we
do in mount().

Backport: cuttlefish
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoconfig_opts.h: reduce osd_recovery_max_active and osd_recovery_max_single_start
Samuel Just [Sat, 10 Aug 2013 02:09:08 +0000 (19:09 -0700)]
config_opts.h: reduce osd_recovery_max_active and osd_recovery_max_single_start

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
12 years agoceph: retry new-style mon command if we get EINVAL from the old-style command
Sage Weil [Fri, 9 Aug 2013 22:14:56 +0000 (15:14 -0700)]
ceph: retry new-style mon command if we get EINVAL from the old-style command

We can race with a mon upgrade:

- get command descriptions, get EINVAL
- mons upgrade, new quorum
- send old-style command
- get EINVAL

In this case, we should try one last time to get the command descriptions.

Fixes: #5788
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocommon: pick_addresses: fix bug with observer class that triggered #5205
Joao Eduardo Luis [Fri, 9 Aug 2013 21:48:15 +0000 (14:48 -0700)]
common: pick_addresses: fix bug with observer class that triggered #5205

The Observer class we defined to observe conf changes and thus avoid
triggering #5205 (as fixed by eb86eebe1ba42f04b46f7c3e3419b83eb6fe7f9a),
was returning always the same const static array, which would lead us to
always populate the observer's list with an observer for 'public_addr'.

This would of course become a problem when trying to obtain the observer
for 'cluster_add' during md_config_t::set_val() -- thus triggering the
same assert as initially reported on #5205.

Backport: cuttlefish
Fixes: #5205
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorgw: return 423 Locked response when failing to lock object
Yehuda Sadeh [Fri, 9 Aug 2013 18:52:25 +0000 (11:52 -0700)]
rgw: return 423 Locked response when failing to lock object

Fixes: #5882
Translate the EBUSY we get when trying to lock a shard / object
to 423 Locked response. Beforehand it was just translated to the
default 500.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: make RGWHTTPClient callback methods pure virtual
Yehuda Sadeh [Fri, 9 Aug 2013 17:29:17 +0000 (10:29 -0700)]
rgw: make RGWHTTPClient callback methods pure virtual

This will make it easier to catch interface changes, like the
ones that triggered #5921.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: rename read_header() to receive_header() where needed
Yehuda Sadeh [Fri, 9 Aug 2013 17:26:53 +0000 (10:26 -0700)]
rgw: rename read_header() to receive_header() where needed

The same as with #5921, fixing a missed interface change.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: rename data receive callbacks in swift token revocation
Yehuda Sadeh [Fri, 9 Aug 2013 16:31:28 +0000 (09:31 -0700)]
rgw: rename data receive callbacks in swift token revocation

Fixes: #5921
As part of the work that was made for dumpling, the http
client in-data callback was renamed in order to avoid confusion.
However, we missed the rename in a couple of places, which this
patch amend.

Reported-by: Roald van Loon <roaldvanloon@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoRadosClient: shutdown monclient after dropping lock
Samuel Just [Thu, 8 Aug 2013 22:12:46 +0000 (15:12 -0700)]
RadosClient: shutdown monclient after dropping lock

Otherwise, the monclient shutdown may deadlock waiting
on a context trying to take the RadosClient lock.

Fixes: #5897
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agobuffer: change #include order
Sage Weil [Wed, 7 Aug 2013 01:36:00 +0000 (18:36 -0700)]
buffer: change #include order

huangjun <hjwsm1989@gmail.com> reports that this fixes the compilation on
CentOS5.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomake sure we are using the mount options
Alfredo Deza [Thu, 8 Aug 2013 23:09:26 +0000 (16:09 -0700)]
make sure we are using the mount options

Signed-off-by: Alfredo Deza <alfredo@deza.pe>
(cherry picked from commit 34831d0989d4bcec4920068b6ee09ab6b3234c91)

12 years agoMerge pull request #487 from ceph/wip-5746
Sage Weil [Fri, 9 Aug 2013 01:29:57 +0000 (18:29 -0700)]
Merge pull request #487 from ceph/wip-5746

ceph.in: Re-enable ceph interactive mode (missing its output).

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #488 from dmick/wip-dmick-daemon-einval
Sage Weil [Thu, 8 Aug 2013 19:33:43 +0000 (12:33 -0700)]
Merge pull request #488 from dmick/wip-dmick-daemon-einval

Wip dmick daemon einval

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoceph.in: return EINVAL on daemon command error 488/head
Dan Mick [Thu, 8 Aug 2013 17:23:34 +0000 (10:23 -0700)]
ceph.in: return EINVAL on daemon command error

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoceph.in: Re-enable ceph interactive mode (missing its output). 487/head
Dan Mick [Tue, 6 Aug 2013 01:18:59 +0000 (18:18 -0700)]
ceph.in: Re-enable ceph interactive mode (missing its output).

Also, loop on error.  There's no reason to exit the interpreter loop on
an error, and it's probably less annoying if we don't.  Print the error,
and any output, and continue.

Fixes: #5746
Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agomon: fix 'osd crush rule rm ...' dup arg
Sage Weil [Thu, 8 Aug 2013 15:30:01 +0000 (08:30 -0700)]
mon: fix 'osd crush rule rm ...' dup arg

This was broken way back in 0d66c9ebbf626117c641c975a8682a0aaba588c4, but
we were ignoring the dup until recently.
t
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoqa/workunits/cephtool/test.sh: test set/unset of all osd flags
Sage Weil [Wed, 7 Aug 2013 15:35:48 +0000 (08:35 -0700)]
qa/workunits/cephtool/test.sh: test set/unset of all osd flags

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/MonCommands: fix typo nobackfile -> nobackfill
Sage Weil [Wed, 7 Aug 2013 15:32:08 +0000 (08:32 -0700)]
mon/MonCommands: fix typo nobackfile -> nobackfill

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoAdd back the mistakenly removed "ceph osd set noscrub/nodeep-scrub"
Dan Mick [Wed, 7 Aug 2013 01:33:38 +0000 (18:33 -0700)]
Add back the mistakenly removed "ceph osd set noscrub/nodeep-scrub"

Fixes: #5868
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-recovery-op-warn' into next
Samuel Just [Wed, 7 Aug 2013 01:05:06 +0000 (18:05 -0700)]
Merge branch 'wip-recovery-op-warn' into next

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoOSD: suspend timeout on process_peering_events pg lock
Samuel Just [Tue, 6 Aug 2013 22:04:33 +0000 (15:04 -0700)]
OSD: suspend timeout on process_peering_events pg lock

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoMerge pull request #476 from dalgaaf/wip-CID-1058791
Yehuda Sadeh [Tue, 6 Aug 2013 21:25:52 +0000 (14:25 -0700)]
Merge pull request #476 from dalgaaf/wip-CID-1058791

Fix CID 1058791

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoOSD: only start osd_recovery_max_single_start at once
Samuel Just [Tue, 6 Aug 2013 20:02:24 +0000 (13:02 -0700)]
OSD: only start osd_recovery_max_single_start at once

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoReplicatedPG: ping tphandle between pushes
Samuel Just [Tue, 6 Aug 2013 19:59:15 +0000 (12:59 -0700)]
ReplicatedPG: ping tphandle between pushes

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoReplicatedPG: ping TPHandle during scan_range
Samuel Just [Tue, 6 Aug 2013 00:21:46 +0000 (17:21 -0700)]
ReplicatedPG: ping TPHandle during scan_range

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD: also suspend timeout while grabbing recovery_tp lock
Samuel Just [Mon, 5 Aug 2013 20:51:05 +0000 (13:51 -0700)]
OSD: also suspend timeout while grabbing recovery_tp lock

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOpRequest: don't warn as quickly for slow recovery ops
Samuel Just [Mon, 5 Aug 2013 20:25:37 +0000 (13:25 -0700)]
OpRequest: don't warn as quickly for slow recovery ops

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agomon, osd: Clean up "flush(stringstream)" continued
Dan Mick [Sat, 27 Jul 2013 05:52:27 +0000 (22:52 -0700)]
mon, osd: Clean up "flush(stringstream)" continued

Missing files in last commit; sorry!

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agomon, osd: Clean up "flush(stringstream); bl.append(stringstream.str())
Dan Mick [Sat, 27 Jul 2013 05:52:27 +0000 (22:52 -0700)]
mon, osd: Clean up "flush(stringstream); bl.append(stringstream.str())

Also: One redundant flush in AuthMonitor, two in PGMonitor, and
a ds << that should have been conditional in Monitor.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoqa/workunits/cephtool/test.sh: add tests for 'pg dump ...'
Sage Weil [Mon, 5 Aug 2013 20:06:21 +0000 (13:06 -0700)]
qa/workunits/cephtool/test.sh: add tests for 'pg dump ...'

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PGMonitor: add 'pg dump pgs_brief' subcommand
Dan Mick [Sat, 3 Aug 2013 04:26:51 +0000 (21:26 -0700)]
mon/PGMonitor: add 'pg dump pgs_brief' subcommand

It is useful to map OSDs to PGs and vice-versa; pg dump gives that
information, but gives a lot of other stuff.  This is the same dump
as pg dump pgs, but omitting everything except pgid, state, and
osd up and acting sets.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-python-cleanup' into next
Dan Mick [Mon, 5 Aug 2013 20:03:21 +0000 (13:03 -0700)]
Merge branch 'wip-python-cleanup' into next

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorgw: only log (as in ops logging) certain operations
Yehuda Sadeh [Mon, 5 Aug 2013 18:38:27 +0000 (11:38 -0700)]
rgw: only log (as in ops logging) certain operations

Fixes: #5875
ops logging should (at this point) should only include object
store related operations.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorgw_admin: flush replicalog entries
Yehuda Sadeh [Sat, 3 Aug 2013 05:35:12 +0000 (22:35 -0700)]
rgw_admin: flush replicalog entries

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agocephtool/test.sh, rest/test.py: add tell command tests
Dan Mick [Sat, 27 Jul 2013 07:26:41 +0000 (00:26 -0700)]
cephtool/test.sh, rest/test.py: add tell command tests

Also add HTTP method to test.py output

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoceph.in, ceph_rest_api.py: import only used syms from ceph_argparse.py
Dan Mick [Sat, 27 Jul 2013 06:30:52 +0000 (23:30 -0700)]
ceph.in, ceph_rest_api.py: import only used syms from ceph_argparse.py

This makes pyflakes/pylint happier and is better practice in general

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agocephtool/test.sh: add a few tests for invalid command args
Dan Mick [Sat, 3 Aug 2013 03:50:20 +0000 (20:50 -0700)]
cephtool/test.sh: add a few tests for invalid command args

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoceph_argparse.py: add stderr note if nonrequired param is invalid
Dan Mick [Sat, 3 Aug 2013 03:46:00 +0000 (20:46 -0700)]
ceph_argparse.py: add stderr note if nonrequired param is invalid

If we run across a user-supplied parameter that doesn't validate against
a non-required descriptor, it may be that it's a valid entry for a later
descriptor...or it may be that it's supposed to match.  We can't really tell.
A possible heuristic would be to call it invalid-for-sure if we're at the
end of the descriptor list, but that's not very generic.

Warn about it and try to drive on anyway.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoFix "too few args validate"
Dan Mick [Fri, 2 Aug 2013 05:35:08 +0000 (22:35 -0700)]
Fix "too few args validate"

Check that number of validated arguments matches the number of required
arguments in the signature.  Also, sort all possible matches by
length of signature.  This way "ceph osd crush set" and
"ceph osd crush set <args>" can work while still insisting that
extra args or too few args are errors.

Also, restructure and factor out some of the work of validate() to make
its inner loop smaller and hopefully more comprehensible.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoqa/workunits/cephtool/test_daemon.sh: we should error on bad command
Sage Weil [Sun, 4 Aug 2013 22:24:49 +0000 (15:24 -0700)]
qa/workunits/cephtool/test_daemon.sh: we should error on bad command

See #5872.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoPG: set !flushed in Reset()
Samuel Just [Fri, 2 Aug 2013 18:58:52 +0000 (11:58 -0700)]
PG: set !flushed in Reset()

Otherwise, we might serve a pull before we start_flush in the
ReplicaActive constructor.

Fixes: #5799
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-5831' into next
Yehuda Sadeh [Fri, 2 Aug 2013 01:27:34 +0000 (18:27 -0700)]
Merge branch 'wip-5831' into next

12 years agoMerge branch 'wip-5810' into next
Yehuda Sadeh [Fri, 2 Aug 2013 01:27:20 +0000 (18:27 -0700)]
Merge branch 'wip-5810' into next

12 years agorgw: only fetch cors info when needed
Yehuda Sadeh [Thu, 1 Aug 2013 20:20:19 +0000 (13:20 -0700)]
rgw: only fetch cors info when needed

Fixes: #5831
This commit moves around the cors handling code. Beforehand
we were unnecessarily reading the cors headers for every
request whether that was needed or not. Moved that code to
be only called when needed. While at it, cleaned up the
layering a bit so that not to mix S3 specific code with
the generic functionality (except for debugging).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorgw: don't read cors attrs if there's no bucket in operation
Yehuda Sadeh [Wed, 31 Jul 2013 00:34:49 +0000 (17:34 -0700)]
rgw: don't read cors attrs if there's no bucket in operation

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorgw: rename sync-type to update-type
Yehuda Sadeh [Wed, 31 Jul 2013 19:24:36 +0000 (12:24 -0700)]
rgw: rename sync-type to update-type

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorgw: only check version if meta object exists
Yehuda Sadeh [Wed, 31 Jul 2013 19:23:17 +0000 (12:23 -0700)]
rgw: only check version if meta object exists

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge pull request #478 from dalgaaf/wip-da-spec-req
Gary Lowell [Thu, 1 Aug 2013 18:11:44 +0000 (11:11 -0700)]
Merge pull request #478 from dalgaaf/wip-da-spec-req

Fix BuildRequires in SPEC file
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoceph.spec.in: merge back JUnit handling from SUSE spec 478/head
Danny Al-Gaaf [Thu, 1 Aug 2013 13:01:22 +0000 (15:01 +0200)]
ceph.spec.in: merge back JUnit handling from SUSE spec

Merge back what we have in the (open)SUSE ceph spec file for JUnit.
Add missing Requires and the package is named junit4 on some SUSE
versions.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph.spec.in: move junit BuildRequires to the cephfs-java subpackage
Danny Al-Gaaf [Thu, 1 Aug 2013 11:37:48 +0000 (13:37 +0200)]
ceph.spec.in: move junit BuildRequires to the cephfs-java subpackage

JUnit is only needed by cephfs-java. Move the BuildRequires to this
subpackage.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph.spec.in: use snappy-devel only on RHEL derivatives
Danny Al-Gaaf [Thu, 1 Aug 2013 11:34:11 +0000 (13:34 +0200)]
ceph.spec.in: use snappy-devel only on RHEL derivatives

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph.spec.in: add missing buildrequires for Fedora
Erik Logtenberg [Thu, 1 Aug 2013 11:29:45 +0000 (13:29 +0200)]
ceph.spec.in: add missing buildrequires for Fedora

This patch adds two buildrequires to the ceph.spec file, that are needed
to build the rpms under Fedora. Danny Al-Gaaf commented that the
snappy-devel dependency should actually be added to the leveldb-devel
package. I will try to get that fixed too, in the mean time, this patch
does make sure Ceph builds on Fedora.

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
12 years agoMerge branch 'wip-5815' into next
Dan Mick [Thu, 1 Aug 2013 06:01:03 +0000 (23:01 -0700)]
Merge branch 'wip-5815' into next

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-5784' into next
David Zafman [Thu, 1 Aug 2013 04:24:28 +0000 (21:24 -0700)]
Merge branch 'wip-5784' into next

Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agomon/MDSMonitor: don't call all EINVALs "unrecognized command"
Dan Mick [Thu, 1 Aug 2013 01:10:04 +0000 (18:10 -0700)]
mon/MDSMonitor: don't call all EINVALs "unrecognized command"

Some of them are valid EINVALs (like mds setmap with the wrong epochnum)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agorest/test.py: retry mds setmap in case epoch has changed
Dan Mick [Thu, 1 Aug 2013 01:09:20 +0000 (18:09 -0700)]
rest/test.py: retry mds setmap in case epoch has changed

Loop 10 times retrying mds dump/getmap/setmap.

Fixes: #5815
Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agorest/test.py: expect_nofail() to allow examination of reason
Dan Mick [Thu, 1 Aug 2013 01:08:39 +0000 (18:08 -0700)]
rest/test.py: expect_nofail() to allow examination of reason

Also remove unused MyException

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoMerge tag 'v0.67-rc3' into next
Sage Weil [Thu, 1 Aug 2013 01:08:08 +0000 (18:08 -0700)]
Merge tag 'v0.67-rc3' into next

v0.67-rc3

12 years agoVerify that deleting op never in check_latest_map_ops map
David Zafman [Thu, 1 Aug 2013 00:04:09 +0000 (17:04 -0700)]
Verify that deleting op never in check_latest_map_ops map

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoosdc: op left in check_lastest_map_ops
David Zafman [Wed, 31 Jul 2013 18:08:34 +0000 (11:08 -0700)]
osdc: op left in check_lastest_map_ops

Call op_cancel_map_check before cancel_op() in send_linger()

Fixes: #5784
Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agorgw_rados.cc: fix invalid iterator comparison 476/head
Danny Al-Gaaf [Wed, 31 Jul 2013 22:34:41 +0000 (00:34 +0200)]
rgw_rados.cc: fix invalid iterator comparison

The iterator should be compared against the end() function of
the same iter() from region_conn_map.

CID 1058791 (#1 of 1): Invalid iterator comparison (MISMATCHED_ITERATOR)
  mismatched_comparison: Comparing "iter" from "this->region_conn_map" to
  "this->zone_conn_map.end()" from "this->zone_conn_map".

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoqa/workunits/cephtool/test_daemon.sh: sudo
Sage Weil [Wed, 31 Jul 2013 20:46:12 +0000 (13:46 -0700)]
qa/workunits/cephtool/test_daemon.sh: sudo

Fixes: #5814
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc: Add asserts that client_lock is held
David Zafman [Wed, 31 Jul 2013 18:10:51 +0000 (11:10 -0700)]
osdc: Add asserts that client_lock is held

Clarify locking by indicating that client_lock is held

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agotest: Fix valgrind found "Mismatched free() / delete / delete []"
David Zafman [Wed, 31 Jul 2013 01:41:14 +0000 (18:41 -0700)]
test: Fix valgrind found "Mismatched free() / delete / delete []"

Use delete[] in set_argv() so that valgrind runs clean

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoqa: Add workunit that hangs for manual thrasher testing
David Zafman [Wed, 31 Jul 2013 18:59:55 +0000 (11:59 -0700)]
qa: Add workunit that hangs for manual thrasher testing

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoceph: developer mode: set PATH, too
Sage Weil [Wed, 31 Jul 2013 06:08:58 +0000 (23:08 -0700)]
ceph: developer mode: set PATH, too

Otherwise the call to ceph-conf may fail if it is not installed on the
local machine.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocephtool/test.sh: add tests for mon daemon command
Sage Weil [Wed, 31 Jul 2013 06:04:41 +0000 (23:04 -0700)]
cephtool/test.sh: add tests for mon daemon command

[Also move into a separatate test script; validate result -sage]

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMake all AdminSocket commands use argparse/cmdmap.
Dan Mick [Wed, 31 Jul 2013 03:53:57 +0000 (20:53 -0700)]
Make all AdminSocket commands use argparse/cmdmap.

Fixes regression in daemon commands with arguments; also resolves
reported bug with existing daemon code for arguments with
embedded spaces.

Fixes: #5503
Fixes: #5800
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorgw: fix set_buckets_enabled(), set_bucket_owner()
Yehuda Sadeh [Tue, 30 Jul 2013 20:53:53 +0000 (13:53 -0700)]
rgw: fix set_buckets_enabled(), set_bucket_owner()

Fixes: 5808
We cannot call get_bucket_instance_info() at that point,
as the bucket structure wasn't initialized, so we don't
have the bucket instance location information. Just calling
get_bucket_info().

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoObjecter: set c->session to NULL if acting is empty
Samuel Just [Tue, 30 Jul 2013 22:46:22 +0000 (15:46 -0700)]
Objecter: set c->session to NULL if acting is empty

Otherwise, we might leave a session attached to the
CommandOp for an down OSD.  handle_osd_map will then
delete the session for the down OSD.  tick() will then
attempt to follow the invalid pointer to find a
connection over which to send a MPing.

Fixes: #5798
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agov0.67-rc3 v0.67-rc3
Gary Lowell [Tue, 30 Jul 2013 21:37:56 +0000 (14:37 -0700)]
v0.67-rc3