Commit Graph

28159 Commits

Author SHA1 Message Date
Sage Weil
fefe0c602f 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>
2013-08-15 13:42:50 -07:00
Sage Weil
ea79bb2913 Merge pull request #496 from ceph/wip-monstore-copy
tools: ceph-monstore-tool: copy a store's contents to another store
2013-08-15 11:01:35 -07:00
Josh Durgin
4422f21a65 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>
2013-08-14 16:07:52 -07:00
Josh Durgin
34da9cbc33 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 783b7ec847,
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>
2013-08-14 16:07:30 -07:00
Sage Weil
16ed0b9af8 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>
2013-08-14 09:51:01 -07:00
Josh Durgin
7a52e2ff50 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>
2013-08-14 09:50:12 -07:00
Gary Lowell
8ff6901141 Merge branch 'next' 2013-08-13 18:59:06 -07:00
Sage Weil
d1a8165450 client: add enclosing object for asok dumps
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-13 17:28:54 -07:00
Sage Weil
0c23633762 pybind/ceph_argparse: GPL -> LGPL2
Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Dan Mick <dan.mick@inktank.com>

both consented to this change via email.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-13 17:17:54 -07:00
Sage Weil
2206f55761 rbd.cc: relicense as LGPL2
All past authors for rbd.cc have consented to relicensing from GPL to
LGPL2 via email:

---

Date: Sat, 27 Jul 2013 01:59:36 +0200
From: Sylvain Munaut <s.munaut@whatever-company.com>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change

I hereby consent to the relicensing of any contribution I made to the
aforementioned rbd.cc file from GPL to LGPL2.1.

(I hope that'll be impressive enough, I did my best :p)

btw, tnt@246tNt.com and s.munaut@whatever-company.com are both me.


Cheers,

    Sylvain

---

Date: Fri, 26 Jul 2013 17:00:48 -0700
From: Yehuda Sadeh <yehuda@inktank.com>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change

I consent.

---

Date: Fri, 26 Jul 2013 17:02:24 -0700
From: Josh Durgin <josh.durgin@inktank.com>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change

I consent.

---

Date: Fri, 26 Jul 2013 18:17:46 -0700
From: Stanislav Sedov <stas@freebsd.org>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change

I consent.

Thanks for taking care of it!

---

Date: Fri, 26 Jul 2013 18:24:15 -0700
From: Colin McCabe <cmccabe@alumni.cmu.edu>

I consent.

cheers,
Colin

---

Date: Sat, 27 Jul 2013 07:08:12 +0200
From: Christian Brunner <christian@brunner-muc.de>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change

I consent

Christian

---

Date: Sat, 27 Jul 2013 12:17:34 +0300
From: Stratos Psomadakis <psomas@grnet.gr>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change

Hi,

I consent with the GPL -> LGL2.1 re-licensing.

Thanks
Stratos

---

Date: Sat, 27 Jul 2013 16:13:13 +0200
From: Wido den Hollander <wido@42on.com>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change

I consent!

You have my permission to re-license the code I wrote for rbd.cc to LGPL2.1

---

Date: Sun, 11 Aug 2013 10:40:32 +0200
From: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Subject: Re: btw

Hi Sage,

I agree to switch the license of ceph_argparse.py and rbd.cc from GPL2
to LGPL2.

Regards

Danny Al-Gaaf

---

Date: Tue, 13 Aug 2013 17:15:24 -0700
From: Dan Mick <dan.mick@inktank.com>
Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change

I consent to relicense any contributed code that I wrote under LGPL2.1 license.

---

...and I consent too.  Drop the exception from COPYING and debian/copyright
files.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-13 17:16:08 -07:00
Sage Weil
6f5d8036f3 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>
2013-08-13 13:21:01 -07:00
Sage Weil
810c52de36 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>
2013-08-13 13:21:01 -07:00
Gary Lowell
e3b7bc5bce v0.67 2013-08-13 10:45:14 -07:00
Sage Weil
e9d4f9b048 Merge pull request #497 from ksperis/rbdmap.init-3
Rbdmap.init 3

Reviewed-by: Sage Weil <sage@inktank.com>
2013-08-13 10:11:39 -07:00
Sage Weil
977b7f5838 doc/release-notes: fix rst
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-13 09:49:05 -07:00
Sage Weil
f501ec7778 doc/release-notes: upgrade sequence
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-13 09:40:50 -07:00
Sage Weil
de7bbdbc4c doc/release-notes: roll-up of upgrade/compat notes from cuttlefish to dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-13 09:27:32 -07:00
Laurent Barbe
6df75da3d1 init-rbdmap: minor fix no rbd exist
Avoid error if stop when no rbd device exist

Signed-off-by: Laurent Barbe <laurent@ksperis.com>
2013-08-13 18:07:46 +02:00
Laurent Barbe
d9cb2ead36 init-rbdmap: fix for recursive umount
Umount is not always done in the correct order.
For exemple in that case :
/dev/rbd1 on /myrbd
/dev/rbd2 on /myrbd/.snapshots/@GMT-2013.08.09-10.14.44
rbd2 should be umounted before rbd1

Signed-off-by: Laurent Barbe <laurent@ksperis.com>
2013-08-13 18:06:14 +02:00
Gary Lowell
b9a5664bbb Makefile.am: fix libglobal.la races
Several targets had libglobal.la in the  _LDFLAGS macro definition
when it should have been in the _LDADD macro.  Remove those occurrance
and add the LIBGLOBAL_LDA macro to the targets _LDADD instead.

See related commit 71f3e56d4b

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-08-12 23:29:46 -07:00
Joao Eduardo Luis
c81edf1ec9 tools: ceph-monstore-tool: allow copying store contents to a new location
Usage:

ceph-monstore-tool --mon-store-path <in-path> --out <out-path> \
                   --command store-copy

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-08-12 16:04:46 -07:00
Yehuda Sadeh
2632846e24 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>
2013-08-12 14:29:19 -07:00
Sage Weil
cb50b5a7f1 ceph-disk: fix mount options passed to move_mount
Commit 6cbe0f021f 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>
2013-08-09 21:24:08 -07:00
Samuel Just
b66a3d6029 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>
2013-08-09 19:19:00 -07:00
Sage Weil
b221a42ef7 doc/release-notes: adjust whitespace
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-09 16:15:02 -07:00
Sage Weil
bec6f09cc5 doc/release-notes: v0.67 release notes
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-09 16:14:52 -07:00
Sage Weil
d3d56ee502 Merge remote-tracking branch 'gh/next' 2013-08-09 16:03:27 -07:00
Sage Weil
44b093c808 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>
2013-08-09 15:38:39 -07:00
Joao Eduardo Luis
7ed6de9dd7 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 eb86eebe1b),
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>
2013-08-09 14:48:15 -07:00
Yehuda Sadeh
9baaf86258 Merge pull request #486 from kri5/wip-s3-compliance-doc
Wip s3 compliance doc

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-08-09 13:57:11 -07:00
Yehuda Sadeh
068baae719 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>
2013-08-09 12:49:10 -07:00
Yehuda Sadeh
9029555f58 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>
2013-08-09 12:33:54 -07:00
Yehuda Sadeh
71177fe3c7 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>
2013-08-09 12:33:38 -07:00
Yehuda Sadeh
1563613d83 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>
2013-08-09 12:33:06 -07:00
Sage Weil
d5aa3a90a5 Merge remote-tracking branch 'gh/wip-5648-c'
Reviewed-by: Sage Weil <sage@inktank.com>
2013-08-09 09:41:41 -07:00
Sage Weil
eade36df24 PendingReleaseNotes: note 'ceph daemon ...' argument behavior change
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-09 09:07:04 -07:00
Christophe Courtaut
5082fec18f doc: Add a page about rgw S3 API compliance
Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
2013-08-09 10:26:06 +02:00
Samuel Just
0aacd10e25 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>
2013-08-08 22:40:53 -07:00
Yan, Zheng
ca3987fff1 mds: notify clients about deleted inode
To make sure clients trim the deleted inode from the their cache
ASAP. After all clients release the inode, we can reclaim space.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-08-08 22:29:59 -07:00
Sage Weil
151e6d24e4 Merge remote-tracking branch 'yan/wip-mds'
Reviewed-by: Sage Weil <sage@inktank.com>
2013-08-08 22:19:21 -07:00
Sage Weil
7e285149fb Merge remote-tracking branch 'gh/next' 2013-08-08 22:18:16 -07:00
Sage Weil
b2515b9e0b buffer: change #include order
huangjun <hjwsm1989@gmail.com> reports that this fixes the compilation on
CentOS5.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-08 18:38:50 -07:00
Alfredo Deza
6cbe0f021f make sure we are using the mount options
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
(cherry picked from commit 34831d0989)
2013-08-08 18:38:08 -07:00
Sage Weil
469d30b851 Merge pull request #480 from dachary/master
Add the definition of PG temp to the glossary

Reviewed-by: Sage Weil <sage@inktank.com>
2013-08-08 18:34:19 -07:00
Sage Weil
f4aa05a44f 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>
2013-08-08 18:29:57 -07:00
Sage Weil
5bdbe9d617 Merge pull request #489 from ceph/wip-5903
make sure we are using the mount options

Backport: dumpling, cuttlefish
Reviewed-by: Sage Weil <sage@inktank.com>
2013-08-08 18:06:16 -07:00
Alfredo Deza
34831d0989 make sure we are using the mount options
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
2013-08-08 16:09:26 -07:00
Sage Weil
a71fc46b4b Merge pull request #488 from dmick/wip-dmick-daemon-einval
Wip dmick daemon einval

Reviewed-by: Sage Weil <sage@inktank.com>
2013-08-08 12:33:43 -07:00
Dan Mick
fd1923589c ceph.in: return EINVAL on daemon command error
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-08-08 10:23:34 -07:00
Dan Mick
0be14757e2 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>
2013-08-08 09:38:04 -07:00