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