Commit Graph

37374 Commits

Author SHA1 Message Date
Sage Weil
89e033c75b clean up CEPH_WATCH_EVENT_* namespace, and make COMPLETE distinct
Use a proper prefix and make a separate event for the notify completion
message.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:38 -08:00
Sage Weil
bdef13c952 osdc/Objecter: send regular PING ops
Send a full PING op to the object to ensure we are still connected. For
now just use the existing ping interval; we may want to change this in
the future.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:38 -08:00
Sage Weil
909bdbc5a7 osdc/Objecter: queue an error if reconnect fails
If we fail to reconnect, trigger the on_error (reusable) context to
let the user know about it.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:38 -08:00
Sage Weil
e424103301 osdc/Objecter: separate WATCH from RECONNECT
Use WATCH op for the initial registration.  This is idempotent in that
it will succeed whether the watch information has been persisted or not.
It is used by the client if it does not know that it is registered.

The RECONNECT op is used for any subsequent session reconnect.  It will
fail if the watch state isn't already persisted on the OSD.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:38 -08:00
Sage Weil
5e113ce2ea rados: improve watch command output
- hexdump the notify payload, and include all of the new metadata
- print error events too

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:38 -08:00
Sage Weil
22572a3977 librados: add infrastructure to deliver an error notification
Use a reusable context in the WatchNotifyInfo to trigger an error
event, delivered via the existing Finisher thread.  Re-lookup the cookie
in the thread to cope with races with unregister (just as we do with
notify events).

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:38 -08:00
Sage Weil
c973c93f3f librados: define error callback
This is the async notification of a watch error (failure to reconnect to
the object's OSD after a peering event or network disconnect).

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
97661e1a65 librados: remove crufty declaration
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
d44bd2b0c8 osd/ReplicatedPG: handle PING and RECONNECT watch ops
The ping will essentially assert that a watch is still valid.

A reconnect will reestablish session state *only* if the watch is
still persistent.  If not, it will fail (and the client will know it
may have missed something).

Note that the only difference here is that a PING is a bit lighter
weight; it will not reestablish the session state (which should already
be established).  We could use a single op here but the unique op
code makes the messages easier to understand and simplifies the code
path a bit for PING.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
2288f318e1 librados: define RECONNECT and PING watch ops
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
2e508d055e osdc/Objecter: fix assert_src_version
Don't use the add_watch() helper; do it like assert_version
does it.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
73720130c3 librados: use new watch op codes; simplify Objecter helpers
- drop the useless add_watch() helper; do it explicitly
- drop the unused var arg everywhere
- make a separate notify member of the union that excludes
  the other unused fields

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
0d6aa20d4f librados: define CEPH_OSD_WATCH_OP_*
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
6af4e1f68e librados: unconditionally pass WATCH_NOTIFY to legacy callback
This was always WATCH_NOTIFY; just pass that explicitly.  No need to
pay attention to what's in the message.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
6183dccd37 osd: allow multiple watchers/notify replies per client
It is perfectly valid to register multiple watchers via the same
librados client.  Make the notify_replies a multimap to capture all
of the acks.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
8b409d498e librados: include notifier's gid in notify
The notify replies include the identify of everyone who acked the
notify.  For symmetry, inform the notified client who sent the notify.

Fixes: #9198
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
e1a3bc8703 ceph_test_rados_api_watch_notify: test notify2 api
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
7589bfcc90 librados: update notify2 API to accept reply payloads
Allow the notify2 callers to provide bufferlists or char ** pointers
so that we can pass the reply buffer back to them.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
81cdff275a osd: implement notify ack payloads
If the notified send back reply payloads, pass them back to the notifier.

Note that we have changed the on-wire behavior of the watch completion
message a bit: instead of sending the original notify payload back to the
notifier, we send the map of notified to replies.  Note that only users of
the new API will know what to do with the notify acknowledgement
information.  At the same time, we stop sending the original payload.
However, the old API users never saw that data; we were uselessly sending
it over the wire.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
7e0c4efcd4 librados: define updated watch/notify interface
- new notify callback with the correct values:
  - notify_id
  - watch handle
  - payload
- new notify_ack call
  - not implicit when the callback returns (for new api only)
  - optional payload
- new watch2 call
  - that provides the new callback
- new notify2 call
  - with the right arguments, and optional timeout

A couple refactors in here:
- IoCtx notify_ack is now called unlocked (Note: this will soon change
  with pending Objecter locking changes)
- Objecter notify_ack takes a buffer

TODO:
- no timeout on the individual watch, yet...

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
12940c9f86 librados: drop useless ver arg to _notify_ack
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:31:46 -08:00
Gregory Farnum
96d06a5f5c Merge pull request #3076 from ceph/wip-mon-mdsdne
MDSMonitor.cc: fix assertion caused by MDSMap::STATE_DNE state

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2014-12-04 10:31:34 -08:00
Sage Weil
19e6c58622 Merge pull request #3072 from ceph/wip-10231-gperftools-location
heap_profiler: support new gperftools header locations

gitbuilders are happy

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-04 10:13:55 -08:00
Sage Weil
12098b4115 Merge pull request #3084 from ceph/wip-rados-include
librados: Fix rados include problem reported by "sponce"

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-04 10:11:18 -08:00
David Zafman
22c1d9b0cf librados: Fix rados include problem reported by "sponce"
Caused by a03f85a8e7

Signed-off-by: David Zafman <dzafman@redhat.com>
2014-12-04 10:06:30 -08:00
Sage Weil
f9c602a2ce Merge pull request #3059 from dachary/wip-10125-radosgw-init
rgw: run radosgw as apache with systemd

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-04 10:04:30 -08:00
Loic Dachary
7b621f4abf rgw: run radosgw as apache with systemd
Same as sysv.

http://tracker.ceph.com/issues/10125 Fixes: #10125

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-12-04 18:57:29 +01:00
Samuel Just
cad4edceda Merge pull request #2997 from ceph/wip-snapmapper
osd: require SNAPMAPPER feature; drop tolerate_collection_add_enoent

Reviewed-by: Samuel Just <sjust@redhat.com>
2014-12-04 09:30:44 -08:00
Samuel Just
a6a8aeaefb Merge pull request #2979 from ceph/wip-kill-category
osd: kill 'category' from pg_stats_t

Reviewed-by: Samuel Just <sjust@redhat.com>
2014-12-04 09:29:31 -08:00
Samuel Just
d212ced82b Merge pull request #2694 from dachary/wip-9728-jerasure-neon
erasure-code: jerasure support for NEON

Reviewed-by: Samuel Just <sjust@redhat.com>
2014-12-04 09:26:48 -08:00
Sage Weil
08aa6d3ee9 Merge pull request #3082 from scuttlemonkey/wip-doc-10247
Changed os-recommendation table sorting to remove implied bias.

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-04 09:25:40 -08:00
Samuel Just
473e36ca0b Merge pull request #3048 from ceph/wip-10209
osd: tolerate sessionless con in fast dispatch path

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2014-12-04 09:25:14 -08:00
Samuel Just
6b27089808 Merge pull request #3049 from dachary/wip-10211-erasure-code-buffer-alignement
erasure-code: enforce chunk size alignment

Reviewed-by: Samuel Just <sjust@redhat.com>
2014-12-04 09:24:14 -08:00
Sage Weil
3f2f42dda4 doc/release-notes: v0.89
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 09:15:37 -08:00
Sage Weil
c0685ec709 Merge remote-tracking branch 'gh/next' 2014-12-04 08:39:56 -08:00
scuttlemonkey
237b29c248 Changed os-recommendation table sorting to remove implied bias.
Fixes: #10247

signed-of by: Patrick McGarry <pmcgarry@redhat.com>
2014-12-04 11:27:35 -05:00
Loic Dachary
ec2677eaa6 Merge pull request #3024 from ceph/wip-librados-symbols
librados: Only public API symbols from the shared library

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-04 15:10:10 +01:00
Yan, Zheng
e42df6afbb MDSMonitor.cc: fix assertion caused by MDSMap::STATE_DNE state
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-12-04 20:28:10 +08:00
Loic Dachary
f9bd970ea3 Merge pull request #3028 from majianpeng/fix4
Add perf reset command.

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-04 07:39:40 +01:00
Yan, Zheng
f11fd66f80 Merge pull request #3074 from ceph/wip-10229
osdc/Filer: use finisher to execute C_Probe and C_PurgeRange
2014-12-04 13:32:32 +08:00
Yan, Zheng
d3ee89ace6 osdc/Filer: use finisher to execute C_Probe and C_PurgeRange
Currently contexts C_Probe/C_PurgeRange are executed while holding
OSDSession::completion_lock. C_Probe and C_PurgeRange may call
Objecter::stat() and Objecter::remove() respectively, which acquire
Objecter::rwlock. This can cause deadlock because there is intermediate
dependency between Objecter::rwlock and OSDSession::completion_lock:

 Objecter::rwlock -> OSDSession::lock -> OSDSession::completion_lock

The fix is exexcute C_Probe/C_PurgeRange in finisher thread.

Fixes: #10229
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-12-04 13:26:33 +08:00
Ken Dreyer
6edaf4e796 heap_profiler: support new gperftools header locations
The google/ headers location has been deprecated as of gperftools 2.0.
As of gperftools 2.2rc, the google/ headers will now give deprecation
warnings, and they will probably disappear in a future gperftools
update.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2014-12-03 13:44:00 -07:00
Greg Farnum
d5e2c2cf10 mon: fix signed/unsigned comparison warning
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2014-12-03 10:45:52 -08:00
Jenkins
68fdc0f68e 0.89 2014-12-03 08:18:33 -08:00
Loic Dachary
6e69955ab5 Merge pull request #3065 from ceph/wip-cephtool-exec
qa: fix cephtool tests not getting run

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-03 16:28:51 +01:00
John Spray
d98cec7f9c qa: fix teardown in cephtool's test_mon_mds
This was missing from 17b5fc9a but we didn't notice
because the test wasn't being run by the gitbuilders.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-12-03 16:26:57 +01:00
Sage Weil
c4f934997a Merge pull request #3044 from osynge/wip=suse-systemd
better systemd support

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-02 20:56:55 -08:00
Sage Weil
cbac460950 Merge pull request #3067 from dachary/wip-cephtool
fix cephtools running only part of the tests + avoid killing wrong daemons

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-02 20:53:12 -08:00
Jianpeng Ma
8e5dbe7dff common/perf_counters: Remove the duplicated code.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2014-12-03 10:28:00 +08:00
Jianpeng Ma
963b76494b test/perf_counters: Replace perfcounters_dump to perf dump.
The func of command  perfcounters_dump and 'perf dump' are the same .
But from the print 'ceph --admin-daemon help', it only print 'perf
dump'. So replace.
In order to keep consistent, still keep perfcounters_dump in code for
old user.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2014-12-03 10:26:26 +08:00