Commit Graph

28038 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Sage Weil
2e280874f6 mon: fix 'osd crush rule rm ...' dup arg
This was broken way back in 0d66c9ebbf, but
we were ignoring the dup until recently.
t
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-08 08:30:01 -07:00
Sage Weil
0c1fd629fa qa/workunits/cephtool/test.sh: test set/unset of all osd flags
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-07 08:35:48 -07:00
Sage Weil
298e7d876e mon/MonCommands: fix typo nobackfile -> nobackfill
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-07 08:32:08 -07:00
Dan Mick
afa21e8074 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>
2013-08-07 08:29:17 -07:00
Samuel Just
fb06bf60c1 Merge branch 'wip-recovery-op-warn' into next
Reviewed-by: Sage Weil <sage@inktank.com>
2013-08-06 18:05:08 -07:00
Samuel Just
6820390357 OSD: suspend timeout on process_peering_events pg lock
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-08-06 15:04:33 -07:00
Yehuda Sadeh
f71ec8e63a Merge pull request #476 from dalgaaf/wip-CID-1058791
Fix CID 1058791

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-08-06 14:25:52 -07:00
Samuel Just
944f3b7353 OSD: only start osd_recovery_max_single_start at once
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-08-06 13:51:51 -07:00
Samuel Just
8b53a14081 ReplicatedPG: ping tphandle between pushes
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-08-06 13:51:51 -07:00
Samuel Just
d0cbdde25e ReplicatedPG: ping TPHandle during scan_range
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-08-06 13:51:51 -07:00
Samuel Just
95b3604bef OSD: also suspend timeout while grabbing recovery_tp lock
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-08-06 13:51:51 -07:00
Samuel Just
321f57de97 OpRequest: don't warn as quickly for slow recovery ops
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-08-06 13:51:51 -07:00
Dan Mick
0017010735 mon, osd: Clean up "flush(stringstream)" continued
Missing files in last commit; sorry!

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-08-06 13:13:42 -07:00
Dan Mick
e904018872 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>
2013-08-06 06:28:45 -07:00
Sage Weil
db27c3f5a3 qa/workunits/cephtool/test.sh: add tests for 'pg dump ...'
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-05 13:06:42 -07:00
Dan Mick
42582f02f9 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>
2013-08-05 13:06:42 -07:00
Dan Mick
5a495b1ee6 Merge branch 'wip-python-cleanup' into next
Reviewed-by: Sage Weil <sage@inktank.com>
2013-08-05 13:03:21 -07:00
Yehuda Sadeh
9e88b1b48c 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>
2013-08-05 12:30:17 -07:00
Yehuda Sadeh
b165d33a89 rgw_admin: flush replicalog entries
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-08-05 12:30:17 -07:00
Dan Mick
6dd4ff8371 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>
2013-08-05 11:21:19 -07:00
Dan Mick
28d58ebae5 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>
2013-08-05 11:21:19 -07:00
Dan Mick
55095d56ea 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>
2013-08-05 11:20:41 -07:00
Dan Mick
71ff794eca 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>
2013-08-05 11:20:36 -07:00
Dan Mick
9466a0b152 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>
2013-08-05 11:20:30 -07:00
Sage Weil
e5d9ac64df qa/workunits/cephtool/test_daemon.sh: we should error on bad command
See #5872.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-04 15:24:59 -07:00
Samuel Just
9e7d6d547e 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>
2013-08-02 20:59:42 -07:00
Yehuda Sadeh
ef036bd4bc Merge branch 'wip-5831' into next 2013-08-01 18:27:34 -07:00
Yehuda Sadeh
60679a0a6a Merge branch 'wip-5810' into next 2013-08-01 18:27:20 -07:00
Yehuda Sadeh
ae15381347 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>
2013-08-01 18:27:01 -07:00
Yehuda Sadeh
b139a7cd34 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>
2013-08-01 18:26:47 -07:00
Yehuda Sadeh
43c2712535 rgw: rename sync-type to update-type
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-08-01 18:26:05 -07:00
Yehuda Sadeh
bbac69ccff rgw: only check version if meta object exists
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-08-01 18:25:04 -07:00
Gary Lowell
ab1f4386a1 Merge pull request #478 from dalgaaf/wip-da-spec-req
Fix BuildRequires in SPEC file
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
2013-08-01 11:11:44 -07:00
Danny Al-Gaaf
caaaf2c211 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>
2013-08-01 15:01:22 +02:00
Danny Al-Gaaf
cbf3a11cf3 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>
2013-08-01 15:00:25 +02:00
Danny Al-Gaaf
4a95796251 ceph.spec.in: use snappy-devel only on RHEL derivatives
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-08-01 15:00:22 +02:00