Commit Graph

27986 Commits

Author SHA1 Message Date
Yehuda Sadeh
2e51823563 rgw: forward x_amz_meta headers when forwarding a request
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-19 13:21:49 -07:00
Yehuda Sadeh
4f4bdbd5cb rgw: fix bucket re-creation on secondary region
We had a problem with bucket recreation, where we identified
that bucket has already existed, but missed the fact that it's
the same bucket, so removal of the bucket index was wrong.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-19 13:21:49 -07:00
Sage Weil
0de708516c mon/MonClient: fix small leak
We need to delete the version_req_d here.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 13:21:48 -07:00
Sage Weil
d1b83be14c msgr: mark addr-based [lazy_]send_message and get_connection deprecated
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 13:21:48 -07:00
Sage Weil
11c47cc4e3 client: mark_down by con
We have the con handy; use it.  This avoids generate a spurious RESET
event, which we do not need or do anything useful with.  Note that in this
case we are not attaching anything to the Connection priv field.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 13:21:48 -07:00
Sage Weil
000d4d38a4 mon: mark_down session by con, not addr
We have the ConnectionRef here; use it.  This avoids generating a spurious
RESET event for the connection.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 13:21:48 -07:00
Sage Weil
30de04066d mon: break con <-> session ref cycle in mon even if shutting down
If we get a reset during shutdown, we should still break the cycle to avoid
tripping the valgrind leak detection.  Note that we are touching no
internal Monitor state here and the locking has not changed.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 13:21:48 -07:00
Sage Weil
564075c9ad msg/SimpleMessenger: remove duplicated interface docs
Document these in the interface, not the implementation; having two copies
clutters the header and invites them to get out of sync.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 13:21:47 -07:00
Sage Weil
27868ca5ac msgr: update docs for mark_down, mark_down_all semantics
* RESET events
* note that the reset detection only happens if it is enabled in the
  policy.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 13:21:47 -07:00
Sage Weil
8dcf0b199a msgr: generate reset event on mark_down to addr (not con)
If the caller is marking down an addr, they presumably don't have the
Connection* handy, so we should generate a reset event to help them
clean up con <-> session ref cycles.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 13:21:47 -07:00
Sage Weil
bfadcd2a0e osd/ReplicatedPG: fix obc leak on invalid LIST_SNAPS op
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-19 13:21:47 -07:00
Sage Weil
561ac0b173 osd: break con <-> session cycle when marking down old peers
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-19 13:21:47 -07:00
Sage Weil
41c67e0236 osd: make ms_handle_reset debug more useful
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-19 13:21:47 -07:00
Sage Weil
8574b3cdcf mon/PGMap: don't mangle stamp_delta in clear_delta()
This is a delta, not a timestamp.

This triggered when a cluster is idle for 2* the mon_delta_reset_interval,
and required a mon restart to fix.

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-19 10:55:02 -07:00
Sage Weil
99fa208f32 osd: log PG state changes at level 5
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-19 10:45:28 -07:00
Sage Weil
c549e628a8 mon/PGMap: avoid negative pg stats when calculating rates
We periodically see strange values come out of the estimated cluster
throughput and recovery rates.  Pretty sure this is cause by feeding
negative values into the rate arithmetic and then giving the si_t
helpers mangled (sign-extended + bit shifted) values.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 10:39:19 -07:00
Sage Weil
9292c18dfc mon/PGMap: use signed values for calculated rates
si_t (and friends) does not handle signed values, but at least we can
give the Formatters unmangled values.  This shouldn't happen (tm), but
if it does this will make things a bit less confusing and makes the code
a bit less fragile.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 10:39:17 -07:00
Samuel Just
47516d9c4b ReplicatedPG: track temp collection contents, clear during on_change
We also assert in on_flushed() that the temp collection is actually
empty.

Fixes: #5670
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-19 10:39:02 -07:00
Samuel Just
9f56a7b8bf PG, ReplicatedPG: pass a transaction down to ReplicatedPG::on_change
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-19 10:39:02 -07:00
Sage Weil
2e09b6e0bc osd: add floor() method to pg/osd stat structs
We often want to maintain a nonnegative value.  We generalize
this to floors other than zero only because it makes the function
call make intuitive sense; I don't think it is at all useful.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 10:31:48 -07:00
Sage Weil
b4db58865f osd: make pool_stat_t *log_size fields signed
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 10:31:47 -07:00
Sage Weil
d3e53cd66b mon/MonClient: better debugging on version requests
From leak hunting, but useful.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 09:59:25 -07:00
Sage Weil
053659d05e msg/Pipe: work around incorrect features reported by earlier versions
If we see a peer reporting features ~0ull, we know they are deluded in a
particular way and should infer what features they *actually* have.  Do
this right when the features come over the wire to catch all users.

Fixes: #5655
Signed-off-by: Samuel Just <sam.just@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 08:09:09 -07:00
Sage Weil
f0feabe81f Message,OSD,PG: make Connection::features private
Use has_feature() method too.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 08:09:09 -07:00
Yehuda Sadeh
d1b47f40e7 test: update cli test for radosgw-admin
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-19 07:48:05 -07:00
Yehuda Sadeh
7a7fca46fb Merge pull request #448 from kri5/wip-5416
rgw: Adds --rgw-zone --rgw-region help text.

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-19 07:20:51 -07:00
Christophe Courtaut
76040d90f7 rgw: Adds --rgw-zone --rgw-region help text.
Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
2013-07-19 10:13:51 +02:00
Sage Weil
c9ba933b0b mon/MonClient: fix small leak
We need to delete the version_req_d here.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-18 18:04:20 -07:00
Sage Weil
0ef5213d01 Merge pull request #445 from ceph/wip-osd-leaks
fix msgr issues causing osd leaks on shutdown

Reviewed-by: Greg Farnum <greg@inktank.com>
2013-07-18 18:03:48 -07:00
Sage Weil
4ed7942997 init-ceph: don't activate-all for vstart clusters
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-18 17:10:51 -07:00
Sage Weil
f9e9f9cb19 mon/PGMonitor: fix 'pg map' output key names
This got lost in a big file of fixes a while back.  :/

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-18 16:53:23 -07:00
Samuel Just
9ab539eaae PG: add perf counter for peering latency
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-18 15:13:50 -07:00
Sage Weil
fd53d53a42 msgr: mark addr-based [lazy_]send_message and get_connection deprecated
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-18 15:05:22 -07:00
Sage Weil
8ff7d536a2 client: mark_down by con
We have the con handy; use it.  This avoids generate a spurious RESET
event, which we do not need or do anything useful with.  Note that in this
case we are not attaching anything to the Connection priv field.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-18 15:02:09 -07:00
Sage Weil
e0067a85d1 mon: mark_down session by con, not addr
We have the ConnectionRef here; use it.  This avoids generating a spurious
RESET event for the connection.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-18 15:02:08 -07:00
Sage Weil
3c81475be2 mon: break con <-> session ref cycle in mon even if shutting down
If we get a reset during shutdown, we should still break the cycle to avoid
tripping the valgrind leak detection.  Note that we are touching no
internal Monitor state here and the locking has not changed.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-18 15:02:08 -07:00
Sage Weil
f7d0403f87 msg/SimpleMessenger: remove duplicated interface docs
Document these in the interface, not the implementation; having two copies
clutters the header and invites them to get out of sync.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-18 15:02:08 -07:00
Sage Weil
5e7241792f msgr: update docs for mark_down, mark_down_all semantics
* RESET events
* note that the reset detection only happens if it is enabled in the
  policy.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-18 15:02:08 -07:00
Sage Weil
e1e0d5056d msgr: generate reset event on mark_down to addr (not con)
If the caller is marking down an addr, they presumably don't have the
Connection* handy, so we should generate a reset event to help them
clean up con <-> session ref cycles.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-18 15:02:08 -07:00
Sage Weil
c5226346cb osd/ReplicatedPG: fix obc leak on invalid LIST_SNAPS op
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-18 15:02:07 -07:00
Sage Weil
d3748b23a2 osd: break con <-> session cycle when marking down old peers
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-18 15:02:02 -07:00
Sage Weil
2428bfd618 osd: make ms_handle_reset debug more useful
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-18 15:01:53 -07:00
Sage Weil
921a4aac8a cls_lock: fix duration test
It's possible for us to just be really slow when getting the reply to the
first op or doing the second op, resulting in a successful lock.  If we
do get a success, assert that at least that amount of time has passed to
avoid any false positives.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-18 14:08:41 -07:00
Yan, Zheng
dd0246d229 mds: tracedn should be NULL for LOOKUPINO/LOOKUPHASH reply
Fixes: #5658
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-18 14:08:23 -07:00
Samuel Just
f3f92fe210 FileStore: add global replay guard for split, collection_rename
In the event of a split or collection rename, we need to ensure that
we don't replay any operations on objects within those collections
prior to that point.  Thus, we mark a global replay guard on the
collection after doing a syncfs and make sure to check that in
_check_replay_guard() for all object operations.

Fixes: #5154
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-18 13:24:02 -07:00
Sage Weil
723d691f7a msg/Pipe: do not hold pipe_lock for verify_authorizer()
We shouldn't hold the pipe_lock while doing the ms_verify_authorizer
upcalls.

Fix by unlocking a bit earlier, and verifying our state is still correct
in the failure path.

This regression was introduced by ecab4bb951.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-07-18 12:17:08 -07:00
Sage Weil
29c0252dc4 mon: fix off-by-one in check for when sync falls behind
This is what e213b1bc25 intended to do
but managed to bungle by using >= instead of >.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-07-18 08:38:59 -07:00
Sage Weil
59f3455e48 Merge pull request #444 from ceph/wip-osd-latency
osd: include op queue age histogram in osd_stat_t

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-17 22:03:07 -07:00
Sage Weil
07dfb6f4af rgw: drop unused assignment
rgw/rgw_rados.cc: In member function 'virtual int RGWPutObjProcessor_Atomic::handle_data(ceph::bufferlist&, off_t, void**)':
rgw/rgw_rados.cc:648:5: warning: parameter 'ofs' set but not used [-Wunused-but-set-parameter]

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-17 21:36:58 -07:00
Sage Weil
aa460c414f mon: make 'health' warn about slow requests
Currently we see slow request warnings go by in the cluster log, but they
are not reflected by 'ceph health'.  Use the new op queue histograms to
raise a flag there as well.

For example:

HEALTH_WARN 59 requests are blocked > 32 sec; 2 osds have slow requests
21 ops are blocked > 65.536 sec
38 ops are blocked > 32.768 sec
16 ops are blocked > 65.536 sec on osd.1
23 ops are blocked > 32.768 sec on osd.1
5 ops are blocked > 65.536 sec on osd.2
15 ops are blocked > 32.768 sec on osd.2
2 osds have slow requests

Fixes: #5505
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-17 18:21:12 -07:00