Commit Graph

20578 Commits

Author SHA1 Message Date
Gary Lowell
e43ba81fc6 Don't package crush header files. 2012-08-23 15:43:38 -07:00
Sage Weil
1113a6c567 objecter: use ordered map<> for tracking tids to preserve order on resend
We are using a hash_map<> to map tids to Op*'s.  In handle_osd_map(),
we will recalc_op_target() on each Op in a random (hash) order.  These
will get put in a temp map<tid,Op*> to ensure they are resent in the
correct order, but their order on the session->ops list will be random.

Then later, if we reset an OSD connection, we will resend everything for
that session in ops order, which is be incorrect.

Fix this by explicitly reordering the requests to resend in
kick_requests(), much like we do in handle_osd_map().  This lets us
continue to use a hash_map<>, which is faster for reasonable numbers of
requests.  A simpler but slower fix would be to just use map<> instead.

This is one of many bugs contributing to #2947.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-22 10:51:57 -07:00
Sage Weil
4a0704e64a osd: fix requeue order for waiting_for_ondisk
We are calling requeue_ops() on each individual op, which means we need
to requeue in reverse order (newest first, oldest last).

Fixes: #2947
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-21 10:48:48 -07:00
Yehuda Sadeh
1a09423e27 rgw: dump content_range using 64 bit formatters
Fixes: #2961
Also make sure that size is 64 bit.

backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-08-21 10:48:48 -07:00
Sage Weil
ddbef4750c Revert "rgw: dump content_range using 64 bit formatters"
This reverts commit cc435e9980.

Wrong fix; fcgi doesn't do %lld
2012-08-21 10:48:48 -07:00
Yehuda Sadeh
cc435e9980 rgw: dump content_range using 64 bit formatters
Fixes: #2961
Also make sure that size is 64 bit.

backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-08-20 15:37:18 -07:00
Sage Weil
dd4c1dc9f9 osd: fix requeue order of dup ops
The waiting_for_ondisk (and ack) maps get dups of ops that are in progress.
If we have a peering change in which the role does not change, we will
requeue the in-progress ops but leave these in the waiting_for_ondisk
maps, which will then trigger an assert the next time we examine that map
and find it didn't match up with what we expected.

Fix this by requeuing these on any peering reset in on_change().  This
keeps the two queues in sync.

Fixes: #2956
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-20 15:04:37 -07:00
Sage Weil
7e417bd801 osd: make notify debug output less noisy
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-20 13:23:21 -07:00
Sage Weil
5e761b4e15 mds: do not return null dentry lease on getattr
Specifically, /foo may exist and client may try to mount /foo/bar.  That
GETATTR request is on #1/foo/bar, but we cannot return a null dentry on bar
because the client is not prepared to handle it and will crash in
fill_trace().

Fixes: #2959
Reported-by: Yan Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-20 12:47:16 -07:00
Sage Weil
da210bee09 osd: explicitly requeue waiting_for_map in on_change()
Since we are requeuing stuff anyway, do it all in the correct order. This
fixes a bug where take_waiters() comes along later (at activate_map time)
and puts waiting_for_map events at the front of the queue, in front of
e.g. waiting_for_missing.  This breaks ordering from the client's
perspective.

The convention should be: whenever you requeue, requeuing everything
that logically follows it first.

Fixes: #2947
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-16 13:15:11 -07:00
Sage Weil
fac699cf41 osd: simplify how in-progress ops are requeued
Requeue them explicity from apply_and_flush_repops() and call it last, so
that the overall ordering is preserved.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-16 13:15:10 -07:00
Sage Weil
10454721dc osd: rename op_waiters -> waiting_for_map
That's what it is used for; make the name descriptive.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-16 13:15:10 -07:00
Matthew Wodrich
5962a9dde0 obsync: add missing package specifier to format_exc
Fixes: #2873
Signed-off-by: Matthew Wodrich <matthew.wodrich@dreamhost.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2012-08-16 11:01:46 -07:00
Danny Kukawka
a15fde495f fix keyring generation for mds and osd
[ The following text is in the "UTF-8" character set. ]
    [ Your display is set for the "ANSI_X3.4-1968" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Fix config keys for OSD/MDS data dirs. As in documentation and other
places of the scripts the keys are 'osd data'/'mds data' and not
'osd_data'

In case if MDS: if 'mds data' doesn't exist, create it.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
2012-08-16 09:26:00 -07:00
Danny Kukawka
36e7b077a7 fix ceph osd create help
[ The following text is in the "UTF-8" character set. ]
    [ Your display is set for the "ANSI_X3.4-1968" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Change ceph osd create <osd-id> to ceph osd create <uuid>, since this
is what the command is really doing.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
2012-08-16 09:26:00 -07:00
Sage Weil
c6ae5e29a1 objectcacher: fix bh leak on discard
Fixes: #2950
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-15 18:46:25 -07:00
Sage Weil
b97931f43b Merge branch 'testing' into next 2012-08-15 17:56:41 -07:00
Sage Weil
77745f9441 mkcephfs: fix mon data empty check
'read' needs an arg on dash.

Fixes #2922, again.
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-15 17:56:35 -07:00
Samuel Just
74dd560317 Merge branch 'testing' into next 2012-08-15 15:19:02 -07:00
Samuel Just
3e7df78e67 PG,Message: move intrusive_ptr_* into top namespace
gcc 4.7 requires that the intrusive_ptr_* functions be in
the same namespace as the templated class.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-08-15 14:40:17 -07:00
Sage Weil
119880ca14 Merge branch 'testing' into next 2012-08-14 16:53:48 -07:00
Sage Weil
24a26c6274 mkcephfs: fix mon_data check
* check the right path <facepalm>
* behave if the directory doesn't exist at all yet

Fixes: #2922
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 16:53:34 -07:00
Sage Weil
a4428bd0e1 v0.50 2012-08-13 09:49:24 -07:00
Sage Weil
c75c0d8127 v0.50
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQKTBXAAoJEH6/3V0X7TFtVMkP/iFUDiUyJrsr6nxukR9saroe
 i2j2RHzjClY1M1DRYuk4YZ2BljQEVb5rkjGVxXT+LuXK9OOAEbdpSy5EtP3ArHzZ
 VWIdcyac+gMlTxgP5LN2dgPDWBtaEq3PMJex43UViLDz7l5uRHrAnhSMBNw1o+9H
 BwEOF16ZgZl+qQBj1aPakYFl0WqGAzzLtjzvA2Is5kJhffA5JmLDfm7eOrTY2h3n
 +0rGjpam77BJNOze0VGUbQe9PLRg+G4eHYfVJ+KvDS1hBUIH3izOuPWO5u9ThgKM
 OM7clwwKXu3xGxzS4g36bqA+3xCnw+e7Yw+71ne87Ai7hlVAJ0y+q4RdaOBqAeWB
 3OMuz73Dq0c4CsZw5Ot3sGJUoyqqw/fBtfzbMdaBv70Ax28ZGZnHxij0F5uDz4kk
 +X7sxouAsk7GkEtxTZQoGBkRhJoZBwxQBIW698u1wGSJQYHr+8aa+o1eHukloTrc
 L7K1C+YuWQWechK5nRNFEU5hPjcv+beL2ndUZeSJj8ri62qhHPAEi66rh1YJOOq9
 cZRQr99hdfM4tNYLUh3eO3LM6TbBNFmlPwDCse35I70mqTh9ccT9WH0Wj95PIFBD
 rmuXXXwNFTuV/mhUpSUpCaDsEIi4ywfdRYn4jX7iY3z9y2zuhWZSatW4fdvXC0G+
 J91BjPKWdjl9nvBtPJUP
 =dUVd
 -----END PGP SIGNATURE-----

Merge tag 'v0.50'

v0.50
2012-08-13 09:48:49 -07:00
Josh Durgin
98286b499c MonMap: return error on failure in build_initial
If mon_host fails to parse, return an error instead of success.
This avoids failing later on an assert monmap.size() > 0 in the
monmap in MonClient.

Fixes: #2913
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-10 08:59:46 -07:00
Josh Durgin
5c116bf8df addr_parsing: report correct error message
getaddrinfo uses its return code to report failures.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-10 08:59:41 -07:00
Yehuda Sadeh
677934b1c8 rgw: modify some error messages
Make them more correct, clearer.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-08-09 13:54:15 -07:00
Yehuda Sadeh
86be6fe797 Merge remote-tracking branch 'origin/wip-rgw-admin' 2012-08-09 13:39:20 -07:00
Yehuda Sadeh
b28db08ea8 rgw: use multiple notification objects
Issue #2504. This makes us listen and notify on more than
a single object, which reduces the contention of cache
notifications.

NOTE: This change requires that any radosgw and radosgw-admin
use the same 'rgw num control oids' config value. A config value
of 0 will maintain old compatibility, and will allow an upgraded
process run in conjuction with an old one. Setting value other
than 0 (or using the non-zero default) will require upgrading
and restarting all the gateways together. Failing to do so
might lead to inconsistent user and buckets metadata (which
will be resolved once gateways are restarted).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-08-09 13:33:37 -07:00
caleb miles
b15d639264 radosgw-admin.rst: Misc doccumentation update.
Signed-off-by: caleb miles <caleb.miles@inktank.com>
2012-08-09 13:27:28 -07:00
caleb miles
45f7f0602c rgw_admin.cc: Allow removal of a user's buckets during user removal.
Allow the buckets, and any child objects, of a user to be deleted when the
user is deleted through radosgw-admin. In reference to feature request
2499: http://tracker.newdream.net/issues/2499.

Signed-off-by: caleb miles <caleb.miles@inktank.com>
2012-08-09 13:27:21 -07:00
caleb miles
cc8eac2427 rgw_admin.cc: Allow for deletion of objects through radosgw-admin.
Allow objects to be deleted through radosgw-admin with an optional flag
to delete the tail of that object during the processing of the intent log.

Signed-off-by: caleb miles <caleb.miles@inktank.com>
2012-08-09 09:55:27 -07:00
John Wilkins
f9359f0c59 doc: New example usage.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-08-09 09:21:38 -07:00
Yehuda Sadeh
6bc1067fc8 rgw: fix usage trim call encoding
Fixes: #2841.
Usage trim operation was encoding the wrong op structure (usage read).
Since the structures somewhat overlapped it somewhat worked, but user
info wasn't encoded.

Backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-08-08 16:09:56 -07:00
Yehuda Sadeh
04a0eacd92 cls_rgw: fix rgw_cls_usage_log_trim_op encode/decode
It was not encoding user, adding that and reset version
compatibility.
This changes affects command interface, makes use of
radosgw-admin usage trim incompatible. Use of old
radosgw-admin usage trim should be avoided, as it may
remove more data than requested. In any case, upgraded
server code will not handle old client's trim requests.

backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-08-08 16:05:57 -07:00
Yehuda Sadeh
074c3c0fe0 rgw: expand date format support
Relaxing the date format parsing function to allow UTC
instead of GMT.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-08-08 15:37:28 -07:00
Yehuda Sadeh
d39ea1d4b5 rgw: complete multipart upload can handle chunked encoding
Fixes: #2878
We now allow complete multipart upload to use chunked encoding
when sending request data. With chunked encoding the HTTP_LENGTH
header is not required.

Backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-08-08 15:34:56 -07:00
Yehuda Sadeh
03b787e0ee rgw_xml: xml_handle_data() appends data string
Fixes: #2879.
xml_handle_data() appends data to the object instead of just
replacing it. Parsed data can arrive in pieces, specifically
when data is escaped.

Backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-08-08 15:34:27 -07:00
Yehuda Sadeh
3809e34448 rgw: ETag is unquoted in multipart upload complete
Fixes #2877.
Removing quotes from ETag before comparing it to what we
have when completing a multipart upload.

Backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-08-08 15:34:02 -07:00
John Wilkins
52f03dcc70 doc: Added debug and logging reference.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-08-08 15:06:57 -07:00
Sage Weil
d78dfe5d14 mkcephfs: use default osd_data, _journal values
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-08-08 14:07:16 -07:00
Sage Weil
3c90ff4e96 mkcephfs: use new default keyring locations
The ceph-conf command only parses the conf; it does not apply default
config values.  This breaks mkcephfs if values are not specified in the
config.

Let ceph-osd create its own key, fix copying, and fix creation/copying for
the mds.

Fixes: #2845
Reported-by: Florian Haas <florian@hastexo.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-08-08 14:07:13 -07:00
Sage Weil
1839105977 Merge remote-tracking branch 'gh/next' 2012-08-08 13:05:12 -07:00
Sage Weil
d5704bd762 buffer: make release() private
This should only be called by ~ptr or when we are replacing the current
target with something new.  It is not suitable for external consumption
Because it doesn't reset length and offset.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:09:59 -07:00
Evan Felix
43291951fa rados.py: add binding for rados_trunc
Fixes: #2909
Signed-off-by: Evan Felix <evan.felix@pnnl.gov>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-03 17:59:05 -07:00
Tommi Virtanen
3671a37e5d doc: Explicitly state mount.ceph two first arguments are fixed.
I've hurt myself too many times with this.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-02 16:03:19 -07:00
Tommi Virtanen
17ad4e18d0 doc: mount.ceph is also needed for cephx.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-02 16:03:09 -07:00
Tommi Virtanen
c961a20eca doc: Fix toctree structure for man obsync(1).
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-02 15:56:57 -07:00
caleb miles
5db3a9e71c rgw_admin.cc: Disallow addition of S3 keys with subuser creation
Fixes: #1855
It is no longer possible to create a subuser and new S3 key associated
with that user through the radosgw-admin utility. In reference to Bug 1855
http://tracker.newdream.net/issues/1855.

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: caleb miles <caleb.miles@inktank.com>
2012-08-02 13:31:35 -07:00
Tommi Virtanen
4e40a78494 ceph-authtool: Fix usage, it's --print-key not --print.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-02 13:02:04 -07:00