]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agorgw: NULL terminate buffer before parsing it
Yehuda Sadeh [Wed, 11 Sep 2013 20:46:31 +0000 (13:46 -0700)]
rgw: NULL terminate buffer before parsing it

Fixes: #6175
Backport: dumpling
We get a buffer off the remote gateway which might
not be NULL terminated. The JSON parser needs the
buffer to be NULL terminated even though we provide
a buffer length as it calls strlen().

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit e7f7483192cddca1159aba439ce62b1e78669d51)

11 years agorgw: don't call list::size() in ObjectCache
Yehuda Sadeh [Thu, 12 Sep 2013 05:30:12 +0000 (22:30 -0700)]
rgw: don't call list::size() in ObjectCache

Fixes: #6286
Use an external counter instead of calling list::size()

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 31e3a51e933429d286104fe077e98ea883437ad6)

11 years agorgw: drain pending requests before completing write
Yehuda Sadeh [Tue, 10 Sep 2013 19:18:55 +0000 (12:18 -0700)]
rgw: drain pending requests before completing write

Fixes: #6268
When doing aio write of objects (either regular or multipart parts) we
need to drain pending aio requests. Otherwise if gateway goes down then
object might end up corrupted.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 626669afaa333d73707553a85f5c874e99e9cbd8)

11 years agorgw: fix get cors, delete cors
Yehuda Sadeh [Sat, 7 Sep 2013 05:33:38 +0000 (22:33 -0700)]
rgw: fix get cors, delete cors

Remove a couple of variables that overrode class member. Not
really clear how it was working before, might have been a bad
merge / rebase.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 13872785aeeddbe1b8dd97e49fd6a2d879514f8d)

11 years agoMerge branch 'wip-6078-dumpling' into dumpling
Yehuda Sadeh [Wed, 11 Sep 2013 16:47:10 +0000 (09:47 -0700)]
Merge branch 'wip-6078-dumpling' into dumpling

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorgw: fix certain return status cases in CORS
Yehuda Sadeh [Thu, 29 Aug 2013 04:25:20 +0000 (21:25 -0700)]
rgw: fix certain return status cases in CORS

Change return values in certain cases, reorder
checks, etc.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: add COPY method to be handled by CORS
Yehuda Sadeh [Thu, 29 Aug 2013 04:24:36 +0000 (21:24 -0700)]
rgw: add COPY method to be handled by CORS

Was missing this http method.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: fix CORS rule check
Yehuda Sadeh [Wed, 28 Aug 2013 02:38:45 +0000 (19:38 -0700)]
rgw: fix CORS rule check

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: don't handle CORS if rule not found (is NULL)
Yehuda Sadeh [Wed, 28 Aug 2013 02:38:18 +0000 (19:38 -0700)]
rgw: don't handle CORS if rule not found (is NULL)

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: tie CORS header response to all relevant operations
Yehuda Sadeh [Thu, 22 Aug 2013 20:38:55 +0000 (13:38 -0700)]
rgw: tie CORS header response to all relevant operations

Have the CORS responses on all relevant operations. Also add headers
on failure cases.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: add a generic CORS response handling
Yehuda Sadeh [Thu, 22 Aug 2013 17:00:53 +0000 (10:00 -0700)]
rgw: add a generic CORS response handling

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: OPTIONS request doesn't need to read object info
Yehuda Sadeh [Thu, 22 Aug 2013 00:22:46 +0000 (17:22 -0700)]
rgw: OPTIONS request doesn't need to read object info

This is a bucket-only operation, so we shouldn't look at the
object. Object may not exist and we might respond with Not
Exists response which is not what we want.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: remove use of s->bucket_cors
Yehuda Sadeh [Wed, 21 Aug 2013 21:43:28 +0000 (14:43 -0700)]
rgw: remove use of s->bucket_cors

Some old code still tried to use s->bucket_cors, which was
abandoned in a cleanup work.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agov0.67.3 v0.67.3
Gary Lowell [Mon, 9 Sep 2013 19:50:11 +0000 (12:50 -0700)]
v0.67.3

11 years agoMerge pull request #574 from dalgaaf/fix/da-dumpling-cherry-picks
Sage Weil [Sat, 7 Sep 2013 20:34:45 +0000 (13:34 -0700)]
Merge pull request #574 from dalgaaf/fix/da-dumpling-cherry-picks

init-radosgw*: fix status return value if radosgw isn't running

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoinit-radosgw*: fix status return value if radosgw isn't running 574/head
Danny Al-Gaaf [Sat, 7 Sep 2013 09:30:15 +0000 (11:30 +0200)]
init-radosgw*: fix status return value if radosgw isn't running

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit b5137baf651eaaa9f67e3864509e437f9d5c3d5a)

11 years agoFileStore: add config option to disable the wbthrottle
Samuel Just [Thu, 22 Aug 2013 18:19:37 +0000 (11:19 -0700)]
FileStore: add config option to disable the wbthrottle

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

11 years agoWBThrottle: use fdatasync instead of fsync
Samuel Just [Thu, 22 Aug 2013 18:19:52 +0000 (11:19 -0700)]
WBThrottle: use fdatasync instead of fsync

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

11 years agoPGLog: initialize writeout_from in PGLog constructor
Samuel Just [Thu, 29 Aug 2013 22:08:58 +0000 (15:08 -0700)]
PGLog: initialize writeout_from in PGLog constructor

Fixes: 6151
Backport: dumpling
Signed-off-by: Samuel Just <sam.just@inktank.com>
Introduced: f808c205c503f7d32518c91619f249466f84c4cf
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 42d65b0a7057696f4b8094f7c686d467c075a64d)

11 years agoPGLog: maintain writeout_from and trimmed
Samuel Just [Tue, 27 Aug 2013 15:49:14 +0000 (08:49 -0700)]
PGLog: maintain writeout_from and trimmed

This way, we can avoid omap_rmkeyrange in the common append
and trim cases.

Fixes: #6040
Backport: Dumpling
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit f808c205c503f7d32518c91619f249466f84c4cf)

11 years agoPGLog: don't maintain log_keys_debug if the config is disabled
Samuel Just [Tue, 27 Aug 2013 14:27:26 +0000 (07:27 -0700)]
PGLog: don't maintain log_keys_debug if the config is disabled

Fixes: #6040
Backport: Dumpling
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 1c0d75db1075a58d893d30494a5d7280cb308899)

11 years agoPGLog: move the log size check after the early return
Samuel Just [Tue, 27 Aug 2013 06:19:45 +0000 (23:19 -0700)]
PGLog: move the log size check after the early return

There really are stl implementations (like the one on my ubuntu 12.04
machine) which have a list::size() which is linear in the size of the
list.  That assert, therefore, is quite expensive!

Fixes: #6040
Backport: Dumpling
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit fe68b15a3d82349f8941f5b9f70fcbb5d4bc7f97)

11 years agorbd.cc: relicense as LGPL2
Sage Weil [Wed, 14 Aug 2013 00:16:08 +0000 (17:16 -0700)]
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>
(cherry picked from commit 2206f55761c675b31078dea4e7dd66f2666d7d03)

11 years agorgw: flush pending data when completing multipart part upload
Yehuda Sadeh [Fri, 23 Aug 2013 22:39:20 +0000 (15:39 -0700)]
rgw: flush pending data when completing multipart part upload

Fixes: #6111
Backport: dumpling
When completing the part upload we need to flush any data that we
aggregated and didn't flush yet. With earlier code didn't have to deal
with it as for multipart upload we didn't have any pending data.
What we do now is we call the regular atomic data completion
function that takes care of it.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 9a551296e0811f2b65972377b25bb28dbb42f575)

11 years agorgw: check object name after rebuilding it in S3 POST
Yehuda Sadeh [Tue, 27 Aug 2013 02:46:43 +0000 (19:46 -0700)]
rgw: check object name after rebuilding it in S3 POST

Fixes: #6088
Backport: bobtail, cuttlefish, dumpling

When posting an object it is possible to provide a key
name that refers to the original filename, however we
need to verify that in the end we don't end up with an
empty object name.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit c8ec532fadc0df36e4b265fe20a2ff3e35319744)

11 years agomon/MonClient: release pending outgoing messages on shutdown
Sage Weil [Fri, 23 Aug 2013 00:46:45 +0000 (17:46 -0700)]
mon/MonClient: release pending outgoing messages on shutdown

This fixes a small memory leak when we have messages queued for the mon
when we shut down.  It is harmless except for the valgrind leak check
noise that obscures real leaks.

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

11 years agorgw: change watch init ordering, don't distribute if can't
Yehuda Sadeh [Thu, 29 Aug 2013 20:06:33 +0000 (13:06 -0700)]
rgw: change watch init ordering, don't distribute if can't

Backport: dumpling

Moving back the watch initialization after the zone init,
as the zone info holds the control pool name. Since zone
init might need to create a new system object (that needs
to distribute cache), don't try to distribute cache if
watch is not yet initialized.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 1d1f7f18dfbdc46fdb09a96ef973475cd29feef5)

11 years agoceph-post-file: use mktemp instead of tempfile
Sage Weil [Fri, 30 Aug 2013 16:41:29 +0000 (09:41 -0700)]
ceph-post-file: use mktemp instead of tempfile

tempfile is a debian thing, apparently; mktemp is present everywhere.

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

11 years agomon: discover mon addrs, names during election state too
Sage Weil [Wed, 28 Aug 2013 16:50:11 +0000 (09:50 -0700)]
mon: discover mon addrs, names during election state too

Currently we only detect new mon addrs and names during the probing phase.
For non-trivial clusters, this means we can get into a sticky spot when
we discover enough peers to form an quorum, but not all of them, and the
undiscovered ones are enough to break the mon ranks and prevent an
election.

One way to work around this is to continue addr and name discovery during
the election.  We should also consider making the ranks less sensitive to
the undefined addrs; that is a separate change.

Fixes: #4924
Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Tested-by: Bernhard Glomm <bernhard.glomm@ecologic.eu>
(cherry picked from commit c24028570015cacf1d9e154ffad80bec06a61e7c)

11 years agoceph_rest_api.py: create own default for log_file
Dan Mick [Fri, 23 Aug 2013 00:30:24 +0000 (17:30 -0700)]
ceph_rest_api.py: create own default for log_file

common/config thinks the default log_file for non-daemons should be "".
Override that so that the default is
    /var/log/ceph/{cluster}-{name}.{pid}.log
since ceph-rest-api is more of a daemon than a client.

Fixes: #6099
Backport: dumpling
Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 2031f391c3df68e0d9e381a1ef3fe58d8939f0a8)

11 years agoceph-post-file: single command to upload a file to cephdrop
Sage Weil [Sat, 17 Aug 2013 00:59:11 +0000 (17:59 -0700)]
ceph-post-file: single command to upload a file to cephdrop

Use sftp to upload to a directory that only this user and ceph devs can
access.

Distribute an ssh key to connect to the account.  This will let us revoke
the key in the future if we feel the need.  Also distribute a known_hosts
file so that users have some confidence that they are connecting to the
real ceph drop account and not some third party.

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

11 years agoceph.spec.in: remove trailing paren in previous commit
Gary Lowell [Thu, 22 Aug 2013 20:29:32 +0000 (13:29 -0700)]
ceph.spec.in:  remove trailing paren in previous commit

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
11 years agoceph.spec.in: Don't invoke debug_package macro on centos.
Gary Lowell [Thu, 22 Aug 2013 18:07:16 +0000 (11:07 -0700)]
ceph.spec.in:  Don't invoke debug_package macro on centos.

If the redhat-rpm-config package is installed, the debuginfo rpms will
be built by default.   The build will fail when the package installed
and the specfile also invokes the macro.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
11 years agoosd: install admin socket commands after signals
Sage Weil [Sat, 24 Aug 2013 21:04:09 +0000 (14:04 -0700)]
osd: install admin socket commands after signals

This lets us tell by the presence of the admin socket commands whether
a signal will make us shut down cleanly.  See #5924.

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

11 years agoceph-disk: partprobe after creating journal partition
Sage Weil [Wed, 21 Aug 2013 05:39:09 +0000 (22:39 -0700)]
ceph-disk: partprobe after creating journal partition

At least one user reports that a partprobe is needed after creating the
journal partition.  It is not clear why sgdisk is not doing it, but this
fixes ceph-disk for them, and should be harmless for other users.

Fixes: #5599
Tested-by: lurbs in #ceph
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 2af59d5e81c5e3e3d7cfc50d9330d7364659c5eb)
(cherry picked from commit 3e42df221315679605d68b2875aab6c7eb6b3cc4)

11 years agomon/Paxos: always refresh after any store_state
Sage Weil [Tue, 20 Aug 2013 18:27:23 +0000 (11:27 -0700)]
mon/Paxos: always refresh after any store_state

If we store any new state, we need to refresh the services, even if we
are still in the midst of Paxos recovery.  This is because the
subscription path will share any committed state even when paxos is
still recovering.  This prevents a race like:

 - we have maps 10..20
 - we drop out of quorum
 - we are elected leader, paxos recovery starts
 - we get one LAST with committed states that trim maps 10..15
 - we get a subscribe for map 10..20
   - we crash because 10 is no longer on disk because the PaxosService
     is out of sync with the on-disk state.

Fixes: #6045
Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 981eda9f7787c83dc457f061452685f499e7dd27)

11 years agomon/Paxos: return whether store_state stored anything
Sage Weil [Tue, 20 Aug 2013 18:27:09 +0000 (11:27 -0700)]
mon/Paxos: return whether store_state stored anything

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 7e0848d8f88f156a05eef47a9f730b772b64fbf2)

11 years agomon/Paxos: cleanup: use do_refresh from handle_commit
Sage Weil [Tue, 20 Aug 2013 18:26:57 +0000 (11:26 -0700)]
mon/Paxos: cleanup: use do_refresh from handle_commit

This avoid duplicated code by using the helper created exactly for this
purpose.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit b9dee2285d9fe8533fa98c940d5af7b0b81f3d33)

11 years agoosdc/ObjectCacher: do not merge rx buffers
Sage Weil [Fri, 16 Aug 2013 04:48:06 +0000 (21:48 -0700)]
osdc/ObjectCacher: do not merge rx buffers

We do not try to merge rx buffers currently.  Make that explicit and
documented in the code that it is not supported.  (Otherwise the
last_read_tid values will get lost and read results won't get applied
to the cache properly.)

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

11 years agoosdc/ObjectCacher: match reads with their original rx buffers
Sage Weil [Fri, 16 Aug 2013 04:47:18 +0000 (21:47 -0700)]
osdc/ObjectCacher: match reads with their original rx buffers

Consider a sequence like:

 1- start read on 100~200
       100~200 state rx
 2- truncate to 200
       100~100 state rx
 3- start read on 200~200
       100~100 state rx
       200~200 state rx
 4- get 100~200 read result

Currently this makes us crash on

osdc/ObjectCacher.cc: 738: FAILED assert(bh->length() <= start+(loff_t)length-opos)

when processing the second 200~200 bufferhead (it is too big).  The
larger issue, though, is that we should not be looking at this data at
all; it has been truncated away.

Fix this by marking each rx buffer with the read request that is sent to
fill it, and only fill it from that read request.  Then the first reply
will fill the first 100~100 extend but not touch the other extent; the
second read will do that.

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

11 years agomon/Paxos: fix another uncommitted value corner case
Sage Weil [Thu, 22 Aug 2013 22:54:48 +0000 (15:54 -0700)]
mon/Paxos: fix another uncommitted value corner case

It is possible that we begin the paxos recovery with an uncommitted
value for, say, commit 100.  During last/collect we discover 100 has been
committed already.  But also, another node provides an uncommitted value
for 101 with the same pn.  Currently, we refuse to learn it, because the
pn is not strictly > than our current uncommitted pn... even though it is
the next last_committed+1 value that we need.

There are two possible fixes here:

 - make this a >= as we can accept newer values from the same pn.
 - discard our uncommitted value metadata when we commit the value.

Let's do both!

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

11 years agoos: make readdir_r buffers larger
Sage Weil [Fri, 23 Aug 2013 18:45:35 +0000 (11:45 -0700)]
os: make readdir_r buffers larger

PATH_MAX isn't quite big enough.

Backport: dumpling, cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 99a2ff7da99f8cf70976f05d4fe7aa28dd7afae5)

11 years agoos: fix readdir_r buffer size
Sage Weil [Fri, 23 Aug 2013 18:45:08 +0000 (11:45 -0700)]
os: fix readdir_r buffer size

The buffer needs to be big or else we're walk all over the stack.

Backport: dumpling, cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 2df66d9fa214e90eb5141df4d5755b57e8ba9413)

Conflicts:

src/os/BtrfsFileStoreBackend.cc

11 years agorgw: fix crash when creating new zone on init
Yehuda Sadeh [Thu, 22 Aug 2013 17:53:12 +0000 (10:53 -0700)]
rgw: fix crash when creating new zone on init

Moving the watch/notify init before the zone init,
as we might need to send a notification.

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

11 years agorgw: change cache / watch-notify init sequence
Yehuda Sadeh [Mon, 19 Aug 2013 15:40:16 +0000 (08:40 -0700)]
rgw: change cache / watch-notify init sequence

Fixes: #6046
We were initializing the watch-notify (through the cache
init) before reading the zone info which was much too
early, as we didn't have the control pool name yet. Now
simplifying init/cleanup a bit, cache doesn't call watch/notify
init and cleanup directly, but rather states its need
through a virtual callback.

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

11 years agoenable mds rejoin with active inodes' old parent xattrs
Alexandre Oliva [Thu, 22 Aug 2013 06:40:22 +0000 (03:40 -0300)]
enable mds rejoin with active inodes' old parent xattrs

When the parent xattrs of active inodes that the mds attempts to open
during rejoin lack pool info (struct_v < 5), this field will be filled
in with -1, causing the mds to retry fetching a backtrace with a pool
number that matches the expected value, which fails and causes the
err==-ENOENT branch to be taken and retry pool 1, which succeeds, but
with pool -1, and so keeps on bouncing between the two retry cases
forever.

This patch arranges for the mds to go along with pool -1 instead of
insisting that it be refetched, enabling it to complete recovery
instead of eating cpu, network bandwidth and metadata osd's resources
like there's no tomorrow, in what AFAICT is an infinite and very busy
loop.

This is not a new problem: I've had it even before upgrading from
Cuttlefish to Dumpling, I'd just never managed to track it down, and
force-unmounting the filesystem and then restarting the mds was an
easier (if inconvenient) work-around, particularly because it always
hit when the filesystem was under active, heavy-ish use (or there
wouldn't be much reason for caps recovery ;-)

There are two issues not addressed in this patch, however.  One is
that nothing seems to proactively update the parent xattr when it is
found to be outdated, so it remains out of date forever.  Not even
renaming top-level directories causes the xattrs to be recursively
rewritten.  AFAICT that's a bug.

The other is that inodes that don't have a parent xattr (created by
even older versions of ceph) are reported as non-existing in the mds
rejoin message, because the absence of the parent xattr is signaled as
a missing inode (?failed to reconnect caps for missing inodes?).  I
suppose this may cause more serious recovery problems.

I suppose a global pass over the filesystem tree updating parent
xattrs that are out-of-date would be desirable, if we find any parent
xattrs still lacking current information; it might make sense to
activate it as a background thread from the backtrace decoding
function, when it finds a parent xattr that's too out-of-date, or as a
separate client (ceph-fsck?).

Backport: dumpling, cuttlefish
Signed-off-by: Alexandre Oliva <oliva@gnu.org>
Reviewed-by: Zheng, Yan <zheng.z.yan@intel.com>
(cherry picked from commit 617dc36d477fd83b2d45034fe6311413aa1866df)

11 years agomds: remove waiting lock before merging with neighbours
David Disseldorp [Mon, 29 Jul 2013 15:05:44 +0000 (17:05 +0200)]
mds: remove waiting lock before merging with neighbours

CephFS currently deadlocks under CTDB's ping_pong POSIX locking test
when run concurrently on multiple nodes.
The deadlock is caused by failed removal of a waiting_locks entry when
the waiting lock is merged with an existing lock, e.g:

Initial MDS state (two clients, same file):
held_locks -- start: 0, length: 1, client: 4116, pid: 7899, type: 2
      start: 2, length: 1, client: 4110, pid: 40767, type: 2
waiting_locks -- start: 1, length: 1, client: 4116, pid: 7899, type: 2

Waiting lock entry 4116@1:1 fires:
handle_client_file_setlock: start: 1, length: 1,
    client: 4116, pid: 7899, type: 2

MDS state after lock is obtained:
held_locks -- start: 0, length: 2, client: 4116, pid: 7899, type: 2
      start: 2, length: 1, client: 4110, pid: 40767, type: 2
waiting_locks -- start: 1, length: 1, client: 4116, pid: 7899, type: 2

Note that the waiting 4116@1:1 lock entry is merged with the existing
4116@0:1 held lock to become a 4116@0:2 held lock. However, the now
handled 4116@1:1 waiting_locks entry remains.

When handling a lock request, the MDS calls adjust_locks() to merge
the new lock with available neighbours. If the new lock is merged,
then the waiting_locks entry is not located in the subsequent
remove_waiting() call because adjust_locks changed the new lock to
include the old locks.
This fix ensures that the waiting_locks entry is removed prior to
modification during merge.

Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit 476e4902907dfadb3709ba820453299ececf990b)

11 years agomon/PGMap: OSD byte counts 4x too large (conversion to bytes overzealous)
Dan Mick [Tue, 20 Aug 2013 18:10:42 +0000 (11:10 -0700)]
mon/PGMap: OSD byte counts 4x too large (conversion to bytes overzealous)

Fixes: #6049
Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit eca53bbf583027397f0d5e050a76498585ecb059)

11 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)

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

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

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

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

11 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)

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

11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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)

11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>