Commit Graph

20817 Commits

Author SHA1 Message Date
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
Sage Weil
ac02b34ed8 msg/Pipe: discard_queue() -> discard_out_queue()
We only discard outgoing messages; incoming messages are handled by the
IncomingQueue.. but this method doesn't touch that.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:15 -07:00
Sage Weil
d58df35f88 msg/Pipe: simplify Pipe::tcp_read() return value
0 for success; no reason to return length (always == len).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
76954c13c1 msg/Pipe: document tcp_*()
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
5d5045d31a msg/Accepter: use learned_addr() from Accepter::bind()
Normally we never go from need_addr == false to need_addr == true.
It always starts out as true, so this else is useless on the first
call to Accepter::bind().

The only exception is rebind().  Add an unlearn_addr() that will clear
need_addr.  This is almost unnecessary, but doing so fixes a small bug
where the local_connection->peer_addr doesn't get updated when we do a
rebind().

Drop now-unused set_need_addr().  We keep get_need_addr() only because
it is useful in the debug output and for the assert.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
1b8f2e0599 msg/SimpleMessenger: push need_addr check into learned_addr()
This puts all of the do/do not lock logic in one place, and documents
it.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
8453a8198c msg/Accepter: pass nonce on start
This lets us drop the otherwise awkward SimpleMessenger::get_nonce()
accessor.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
a0017fcc25 msgr: protect set_myaddr()
This is used by Messenger implementation (and their constituent
components).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
c84b7289c1 msg/Accepter: make members private
Nobody uses these.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
608c776bf9 msgr: remove useless SimpleMessenger::msgr
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
b97f6e3544 msgr: some SimpleMessenger docs
Document basic modules and the lock ordering.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
8c1632ba50 cephtool: send keepalive to tell target
If we 'ceph tell <foo> ...' to a non-monitor, we need to send keepalives to
ensure we detect a tcp drop.  (Not so for monitors; monclient already does
its own keepalive thing.)

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
90e0ef907f cephtool: retry 'ceph tell <who> ...' command if connection fails
It was easy to reproduce a hang with 'ceph osd tell osd.0 foo' and
messenger failure injection.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:45:48 -07:00
Sage Weil
ee206a52b6 cephtool: set messenger policy
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:45:48 -07:00
Sage Weil
b30ad9a1c9 cephtool: fix deadlock on fault when waiting for osdmap
send_command() was blocking for the osdmap, and also called from the
connect callback.  Instead, re-call it from the handle_osd_map() callback
so that it never blocks.

This was easy to trigger with 'ceph osd tell osd.0 foo' and ms failure
injection.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:45:48 -07:00
Josh Durgin
ce0bc11aae rbd: show snap protection status
If you do rbd info image@snap, include whether that snapshot is protected.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-12 16:42:42 -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
Josh Durgin
1fd7acd8d0 rbd: fix test compilation on 32-bit
32-bit can't implicitly convert size_t or unsigned to uint64_t

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-09 16:41:30 -07:00
Josh Durgin
be6b5e1bc8 test_librbd_fsx: fix warning
fstat was included implicitly before.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-09 15:12:55 -07:00
Josh Durgin
4d71ca6384 rbd: fix cli tests
add flatten, snap protect, and snap unprotect

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-09 14:53:24 -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
Josh Durgin
53d7750207 librados: add method to get the fsid of a cluster
This will be used by OpenStack to check whether two components
have access to the same backend cluster.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-09 11:14:39 -07:00
Josh Durgin
cd5d7241b2 librbd: fix memory leak on error in clone
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-09 11:14:39 -07:00
Josh Durgin
c77f0fb738 rbd: add snap [un]protect commands
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-09 11:14:39 -07:00
Josh Durgin
8d5f1e93da librbd: add methods for protecting/unprotecting snapshots
Unprotect will be more useful once integrated with the rbd_children object.
Right now we just check that a snapshot is protected before cloning it,
and that it's unprotected before removing it.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-09 11:14:09 -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
Josh Durgin
3499c0e503 cls_rbd: add methods for getting/setting protection status
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-08 15:44:42 -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
c03f744ef0 keyring: make from_ceph_context() a member
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00
Sage Weil
ece78c8673 doc: some basic cephx documentation
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00
Sage Weil
69130d7cc5 monclient: move keyring requirement where it belongs
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00
Sage Weil
35e79f233e keyring: simplify from_ceph_context()
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00
Sage Weil
ac9d429dd0 keyring: simplify from_ceph_context() arguments
Allocate the KeyRing in the caller, and just pass a pointer.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00
Sage Weil
5e13fd6756 keyring: check client requirement list too when loading keyring
Check client requirements when loading a keyring from the cct.  This is
only used to succeed when no keyring is found and cephx isn't enabled.

We probably want to kill this eventually...

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00