OSD has two entry points for executing CEPH_OSD_OP_*:
1. the MOSDOp message handler,
2. the Object Class API (cls_* and cls_cxx_* functions).
We definitely want to address these two users without code
duplication. However, exposing the entire PG to Obj Class
would break encapsulation. Moreover, there is difference
in life times between PG and sequence-of-operations-from-
MOSDOp.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
This change is be useful especially for CEPH_OSD_OP_CALL
which will be brought by further commits. The issue here
is that the Ceph Classes will be based on existing iface
handling errors with usual, int-based ret codes. These
codes needs to be glued with the existing handling in
pg::do_osd_ops().
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
* refs/pull/28855/head:
doc: document scrub summary in ceph status output
test: extend scrub control test to validate mds task status
mds: send scrub state changes to cluster log.
mds: periodically sent mds scrub status to ceph manager
mgr, mon: allow normal ceph services to register with manager
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/pull/29167/head:
client: return -eio when sync file which unsafe reqs has been dropped
Reviewed-by: Zheng Yan <zyan@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Previously it was incorrectly waiting for finished IOs to complete.
The finished IO would have already been cleared by the writer thread
at this point. Any remaining pending or finished IOs implies a
failure / shutdown of the NBD device.
Fixes: https://tracker.ceph.com/issues/41409?
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The only reason for a reject is in a too full condition. Now that we
have two types of revoke, let's make this clearer.
Signed-off-by: David Zafman <dzafman@redhat.com>
We shouldn't set backfill_toofull when a revoke occurs in the non-toofull
case.
Fixes: https://tracker.ceph.com/issues/41255
Signed-off-by: David Zafman <dzafman@redhat.com>
these dependencies are only used for building python-saml which is in
turn used for the SAML support. this feature is tested using
`test_sso.py` while performing dashboard tests. we do not package or
ship python-saml along with other Ceph packages. so let's move these
dependencies to the "make check" sections in ceph.spec.in and
debian/control for simplifying install-deps.sh.
Signed-off-by: Kefu Chai <kchai@redhat.com>
replicate the behavior of `Cond::SloppySignal()` to avoid crash like
ceph version Development (no_version) octopus (dev)
1: <ceph::__ceph_assert_fail(char const*, char const, int, char const)+0x1e0> at /home/jenkins/workspace/ceph-master36/build/bin/ceph-osd
2: <ceph::__ceph_assert_fail(ceph::assert_data const&)+0x2f> at /home/jenkins/workspace/ceph-master36/build/bin/ceph-osd
3: <ceph::condition_variable_debug::notify_all(bool)+0x59> at /home/jenkins/workspace/ceph-master36/build/bin/ceph-osd
4: <FileJournal::check_for_full(unsigned long, long, long)+0x4e2> at /home/jenkins/workspace/ceph-master36/build/bin/ceph-osd
5: <FileJournal::prepare_single_write(FileJournal::write_item&, ceph::buffer::v14_2_0::list&, long&, unsigned long&, long&)+0x71> at /home/jenkins/workspace/ceph-master36/build/bin/ceph-osd
6: <FileJournal::prepare_multi_write(ceph::buffer::v14_2_0::list&, unsigned long&, ceph::buffer::v14_2_0::list&)+0x19d> at /home/jenkins/workspace/ceph-master36/build/bin/ceph-osd
7: <FileJournal::write_thread_entry(void)+0x561> at /home/jenkins/workspace/ceph-master36/build/bin/ceph-osd
8: <FileJournal::Writer::entry(void)+0x19> at /home/jenkins/workspace/ceph-master36/build/bin/ceph-osd
9: <Thread::entry_wrapper(void)+0x84> at /home/jenkins/workspace/ceph-master36/build/bin/ceph-osd
10: <Thread::_entry_func(void*)+0x15> at /home/jenkins/workspace/ceph-master36/build/bin/ceph-osd
Signed-off-by: Kefu Chai <kchai@redhat.com>
* refs/pull/28727/head:
test/crimson: resolve name collision
test: switch to ldout; let users specify mon debug level
test: add new ElectionLogic unit test framework
elector: const-ify a bunch of functions
elector: swap order of parameters in ElectionLogic::receive_propose
elector: Update Elector and ElectionLogic function documentation
elector: persist the epoch in bump_epoch()
elector: make some more ElectionLogic members private
elector: fix privacy and restore dout in Elector
elector: don't clear peer_info in bump_epoch()
elector: split ElectionLogic into its own compilation unit
elector: move all the elector callouts into the Elector
elector: make ElectionLogic private to Elector; undo most public shenanigans
elector: create declare_standlone_victory in Elector/Logic for Monitor
elector: make ElectionLogic::declare_victory private
elector: route _bump_epoch through the interface-to-be
elector: rename handle_propose_logic -> receive_propose
elector: hoist handle_victory into ElectionLogic
elector: hoist handle_ack into ElectionLogic
elector: hoist victory into ElectionLogic
elector: hoist expire into ElectionLogic
elector: hoist start into ElectionLogic
elector: hoist participating into ElectionLogic
elector: hoist init into ElectionLogic
elector: hoist defer into ElectionLogic
elector: split handle_propose in two and hoist into ElectionLogic
elector: hoist bump_epoch into ElectionLogic
elector: store accessors for ElectionLogic
elector: hoist Elector data bits out into a new ElectionLogic class
mon: Rearrange Paxos::dispatch to be a little cleaner
Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
in python2, we have both `PyLongObject` and `PyIntObject` for presenting
`long` and `int` types. and in python3, `PyIntObject` is dropped, `int`
is represented using `PyLongObject`. and the related functions like
`PyInt_Check()` and `PyInt_AsLong()` are removed along with
`PyIntObject`.
so we should use different set of functions for converting an `int` python
object to native type in C++. since we don't use `long` for "count" when
calling `MgrModule.set_health_checks()`, in this change, we just define
a macro to unify the difference between python2 and python3.
the same applies to "max_count" parameter of `MgrModule.add_osd_perf_query()`
call.
Signed-off-by: Kefu Chai <kchai@redhat.com>
1. rename var i to be worker_id when creating Worker
"i" is assigned to be Worker::id, it means worker's id
2. rename EventCenter::idx to EventCenter::center_id
"idx" is EventCenter's index in global_centers obj.
rename it to be center_id.
3. rename EventCenter::init API's parameter n to be nevent
"n" is actually assigned to EventCenter::nevent. rename it
to be "nevent".
4. rename EventCenter::init API's paramter t to be type
"t" is corresponding to Epoll Driver's implementation's type.
5. rename EpollDriver::size to be EpollDriver::nevent
"size" is actually epoll events number, rename it to be "nevent"
6. use event_id as index name to get event instead of "j"
7. rename "nw" to be "nowait"
8. Processor::start unify variable name with Processor::accept & Processor::stop
==> auto &l to be auto &listen_socket
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>