* refs/pull/27655/head:
common/options: flag misc ms_* options STARTUP
common/options: flag misc options STARTUP
common/options: mark cluster log options with FLAG_RUNTIME, use get_val
common/options: mark a bunch of options with FLAG_STARTUP
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
If we have a down AND out OSD it may contains osd_stat with num_pgs == 0.
When all PGs aren't active+clean we need an accurate value or we consider
the osd missing stat info.
Fixes: https://tracker.ceph.com/issues/38930
Signed-off-by: David Zafman <dzafman@redhat.com>
By not adding a field to pg_count, we don't have to worry about
versioning or backwards compatibility. A mixed cluster won't
be any worse than before.
Signed-off-by: David Zafman <dzafman@redhat.com>
Use OSD_POOL_PRIORITY_MAX and OSD_POOL_PRIORITY_MIN constants
Scale legacy priorities if exceeds maximum
Signed-off-by: David Zafman <dzafman@redhat.com>
Writes into new blobs were all counted as write_small_new, but those can
still be deferred later in _do_alloc_write if they are <= than the
prefer_deferred setting.
See http://tracker.ceph.com/issues/38816
Signed-off-by: Sage Weil <sage@redhat.com>
Currently, the first post-migration snapshot is always marked EXISTS
(i.e. dirty). This is wrong, because the data can be inherited from
a pre-migration snapshot, handled by deep copy.
Mark all post-migration snapshots EXISTS_CLEAN in this case.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
If the data read from the parent is all zeros, deep copyup isn't
performed. However snapshot object maps are updated unconditionally,
causing inconsistencies where nonexistent objects are marked
OBJECT_EXISTS or OBJECT_EXISTS_CLEAN.
Fixes: http://tracker.ceph.com/issues/39435
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
1. Avoid to do memory management without using pointer to operate the
allocated space.
2. Since member type has been changed in class Device, it use member
domain operator "." to access to the sub-member in object.
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
device_list is allocated in Infiniband::init.
When Infiniband obj is destructed, free the allocated
space in case of memory leak.
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
The new "allocation functions" will through exception if it failes to
allocate space. There's no need to assert(devices) here for every
get_device operation.
Refer to: https://en.cppreference.com/w/cpp/memory/new/bad_alloc
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
device_context_list hold the memory allocated through
ibv_get_device_list. release the memory through calling
ibv_free_device_list.
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
ibv_query_device return none zero when failing to query rdma
device. run ceph_abort in any case when ibv_query_device return
none zero.
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
* refs/pull/27626/head:
mgr/dashboard: Do not default to 'admin' as Admin Resource
Reviewed-by: Volker Theile <vtheile@suse.com>
Reviewed-by: Gabriel Brascher <gabriel@apache.org>
Reviewed-by: Patrick Nawracay <pnawracay@suse.com>
* refs/pull/27566/head:
auth: kill AuthUnknownSessionHandler
auth: kill AuthUnknown* (except AuthUnknownSessionHandler)
msg: remove old ms_* auth methods from Dispatcher interface
mon/MonClient: discard old challenge if authorizer is bad
msg/async/ProtocolV1: use AuthServer and AuthClient
mon/Monitor: handle v1 call into handle_auth_request
msg/Connection: add is_msgr2()
mon/MonClient: tolerate lack of authorizer for some dispatchers
Reviewed-by: Ricardo Dias <rdias@suse.com>
The only user is ProtocolV1, which passes in an in-use auth_method...
which must be either AUTH_NONE or AUTH_CEPHX since we successfully
authenticated at this point.
Signed-off-by: Sage Weil <sage@redhat.com>
If we are a server/accepter, and we get a bad authorizer, discard our old
challenge, since the previous exchange has failed. This way if the client
retries, their new authorize attempt won't conflict with our old challenge.
Signed-off-by: Sage Weil <sage@redhat.com>