Commit Graph

28138 Commits

Author SHA1 Message Date
John Wilkins
2e9c25f5ae doc: fixing reported bug in CRUSH map example.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-08-05 14:48:38 -07:00
John Wilkins
cafccfaf06 doc: Added many new fields to config reference.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-08-05 14:13:52 -07:00
John Wilkins
a5d8605797 doc: Added trouble shooting entry. Fixed formatting.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-08-05 13:49:58 -07:00
John Wilkins
e3d59a2c73 doc: Nomenclature update.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-08-05 13:45:24 -07:00
John Wilkins
1db0f25426 doc: Nomenclature update.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-08-05 13:44:59 -07:00
John Wilkins
a38ab07a81 doc: Nomenclature update.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-08-05 13:44:44 -07:00
John Wilkins
0f56e3ebb5 doc: Nomenclature update.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-08-05 13:44:20 -07:00
John Wilkins
ea80532d2b doc: Nomenclature update. Added topic for monitor key caps. Added default pool steps.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-08-05 13:43:21 -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
Sage Weil
a0929955cb mds: fix locking, use-after-free/race in handle_accept
We need to hold mds_lock here.

Normally the con also holds a reference, but an ill-timed connection reset
could drop it.

Fixes: #5883
Backport: dumpling, cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-05 12:52:44 -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
John Wilkins
e8d72ef040 Merge pull request #483 from ceph/wip-5881
fix invalid cluster naming in example
2013-08-05 10:31:01 -07:00
Alfredo Deza
1cd6e2e3f3 fix invalid cluster naming in example
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
2013-08-05 10:16:54 -07:00
Yan, Zheng
0c22dade24 mds: don't issue caps while session is stale
Locker::issue_caps() does not issue new caps to stale client,
CInode::encode_inodestat() should have the same logical.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-08-05 11:09:07 +08:00
Yan, Zheng
8f67adfb69 mds: change LOCK_SCAN to unstable state
commit 0071b8e75b (mds: stay in SCAN state in file_eval) makes
Locker::file_eval() ignore lock in LOCK_SCAN state. If there
is no request changes the lock state, the lock can be stuck in
LOCK_SCAN state forever. This can cause client read/write hang
because lock in LOCK_SCAN state does not allow Frw caps.

The fix is change LOCK_SCAN to a unstable state. Thank to the
CInode::STATE_RECOVERING check in Locker::eval_gather(), the
lock stays in the SCAN state while file is being recovering.
The lock will transit to a stable state once the recovery
finishes.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-08-05 11:09:07 +08:00
Yan, Zheng
f86828d149 mds: handle "state == LOCK_LOCK_XLOCK" when cancelling xlock
If we find lock state is LOCK_LOCK_XLOCK when cancelling xlock,
set lock state to LOCK_XLOCK_DONE and call Locker::eval_gather().
This makes sure the lock will eventually transit to a stable state.
(LOCK_XLOCK_DONE's next state is stable)

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-08-05 11:09:07 +08:00
Yan, Zheng
63a21b4134 mds: remove "type != CEPH_LOCK_DN" check in Locker::cancel_locking()
For acquiring/cancelling xlock, the lock state transitions for
dentry lock and other types of locks are the same. So I think
the "type != CEPH_LOCK_DN" check doesn't make sense.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-08-05 11:09:07 +08:00
Yan, Zheng
3c3b2ceb03 mds: revoke GSHARED cap when finishing xlock
If lock state is LOCK_XLOCKDONE, the xlocker can have GSHARED cap.
So when finishing xlock, we may need to revoke the GSHARED cap.

In most cases Locker::_finish_xlock() directly set lock state to
LOCK_LOCK or LOCK_EXCL, which hides the issue. If 'num_rdlock > 0'
or 'num_wrlock > 0' when finishing xlock, the issue reveals.
(lock get stuck in LOCK_XLOCKDONE forever)

The fix is always call Locker::_finish_xlock() when xlock count
reaches zero. _finish_xlock() checks if it can change lock state
to LOCK_EXCL immediately. If not, it uses Locker::eval_gather()
to transit lock state.

Another change of this patch is avoid changing lock state to
LOCK_LOCK directly. because lock in LOCK_XLOCK_DONE state allows
GSHARED cap, lock in LOCK_LOCK state does not.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-08-05 11:09:07 +08:00
Yan, Zheng
755581977c mds: fix cap revoke confirmation
There are several issues in the Capability::confirm_receipt()

1. when receiving a client caps message with 'seq == last_sent',
   it doesn't mean we finish revoking caps. The client can send
   caps message that only flushes dirty metadata.

2. When receiving a client caps message with 'seq == N', we should
   forget pending revocations whose seq numbers are less than N.
   This is because, when revoking caps, we create a revoke_info
   structure and set its seq number to 'last_sent', then increase
   the 'last_sent'.

3. When client actively releases caps (by request), the code only
   works for the 'seq == last_sent' case. If there are pending
   revocations, we should update them as if the release message
   is received before we revoke the corresponding caps.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-08-05 11:09:07 +08: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
Sage Weil
9797986697 Merge remote-tracking branch 'gh/next' 2013-08-02 11:54:53 -07:00
Sage Weil
ea1243a112 Merge remote-tracking branch 'gh/wip-rgw-leaks'
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-08-02 11:54:31 -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
Loic Dachary
6256d681a4 Add the definition of PG temp to the glossary
it is not easy to figure out what a PG temp is just by reading the
code although it is easy to understand with an example.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-08-02 00:47:13 +02: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
Erik Logtenberg
17b460c55f 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>
2013-08-01 15:00:19 +02:00
Dan Mick
bbd558ada5 Merge branch 'wip-5815' into next
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-31 23:01:03 -07:00
David Zafman
317d698235 Merge branch 'wip-5784' into next
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-31 21:25:20 -07:00
Dan Mick
c70e59ed74 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>
2013-07-31 18:11:47 -07:00
Dan Mick
c9e8ff2bf1 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>
2013-07-31 18:11:47 -07:00
Dan Mick
dc1d95d713 rest/test.py: expect_nofail() to allow examination of reason
Also remove unused MyException

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-31 18:11:47 -07:00
Sage Weil
bf0061bf31 v0.67-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJR+DJQAAoJEH6/3V0X7TFtDWEP/2GtRA5fhypShgnmFgFkn4Jo
 cIass+kDsAnd0w0BVxLdnuOOv6xru4yc5NBE1u+FFfIJnLXt6cfCAc0wdZ+nDzX6
 eqTL/+oB0N9mScuuo/SRSlfj3tbhivPW/WU6wj9C1w0HevAh2uS2pYsbQx7+oQt1
 LHKQRB0tCq7/ASnLw3MxeZr6rw8+TYFCl+1X/b9h+ls0GSF7Qzbrqtr6r0dFAMk8
 +BT/O9duOEbQzOtVL0kohYy9Mv1W308EQA+WvMAqXvylmQW8BV3jErQbm8miIYhK
 9RFyZ8FtlXVoXnbYS4nOV53TQaSZ0IxMvi65osB2ce+MFzlSLnvo4+5Ip2NcVDfY
 PN5omSgc5Kp5EAVAAeHHwyTjVEIQc1R5pI1sffBUzBhHp7wqsNZ3tSxwL8c4ZmEU
 /oa6K4JuTUSsVHW13KS/fVs1NHkP25itUI+jCY8VNsGDogTvGJe62BHX9WgGabzj
 oDUieTGJpSJwpH11E9uDve8qe0WQqVzeJLJb+7CXWm5l3xNE/+Gt0dOrVPqznorO
 3nEGZm2x48kSFEjlKyDhIN9LMEEgJm/+Hpx3n+QvVmlvZFku64azKf/inC9+LdPa
 4N7c3vbNsRT5bOdQLEbFfFh0GupFdUPsuYZgSun6sbfUhe9kq2t72JmOfuMcNegf
 IxXJeBxlw9UNTaWFX4uj
 =7B6k
 -----END PGP SIGNATURE-----

Merge tag 'v0.67-rc3' into next

v0.67-rc3
2013-07-31 18:08:08 -07:00
David Zafman
4a6eff88aa Verify that deleting op never in check_latest_map_ops map
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-07-31 17:04:09 -07:00