In the process of starting the osd process,if system just call the
logratote("killall -q -1 ceph-mon ceph-mgr ceph-mds ceph-osd ceph-fuse radosgw...")
it will cause osd'init failed to start,
in addition, osd init slower than before, will increase the chances of the error.
Other modules(mon\mds\mgr...) also have type problems, but the most serious osd problem,
I can then make other modules similar changes.
Fixes: http://tracker.ceph.com/issues/22746
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
This is a portion of Part 1 of the namespace project: using ADL
properly in encode and decode so we can use namespaces easily in Ceph.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
ceph-osd: fix auto detect which objectstore is currently running
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Chunmei Liu <chunmei.liu@intel.com>
Store a random value up to the filestore_split_rand_factor for each
collection when it is created or apply-layout-settings is run. This
should help distribute the load of splitting directories across a
longer period of time.
Fixes: http://tracker.ceph.com/issues/15835
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
This unifies the first line of usage text: angle brackets
to indicate a mandatory option, and uppercase ID to match
the output from generic_server_usage(). It also ensures
ceph-mon prints all of its usage information to stdout,
same as the other daemons.
Signed-off-by: Tim Serong <tserong@suse.com>
We need to modify ms_type in unittest. That use SAFE_OPTION to declare ms_type
is safer than pass `safe=false` to set_val.
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
Whatever we specify is OR'd onto CEPH_FEATURE_SUPPORTED_DEFAULT (which is
all features) in the Policy() ctor. This argument is pointless.
Signed-off-by: Sage Weil <sage@redhat.com>
FileStore holds a number of recources like op thread pool and work
queue, key/value DB threads, etc. These should be properly stopped
(released) before exiting to avoid segfaults on exit.
Note: more code paths (mkfs, dump_journal, etc) need similar fixes,
these will be submitted as separate patches.
Fixes: http://tracker.ceph.com/issues/18820
Signed-off-by: Alexey Sheplyakov <asheplyakov@mirantis.com>
RADOS classes can now be statically compiled and added to
the embedded cephd library.
The RADOS ClassHandler now has an option to skip calling dlclose
just like PluginRegistry.
All RADOS classes where changed to use a CLS_INIT macro that
will either use __cls_init or classname_cls_init. this enables
the static compiling of all RADOS classes in a single library. Also
global method definitions where moved to inside cls_init.
Also added a few aconfig defines including WITH_EMBEDDED, WITH_CEPHFS,
WITH_RBD, and WITH_KVS. Note that WITH_RBD was not defined before
and the ceph-dencoder was broken when it was turned on.
Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
Added supported for running MON and OSD daemon code almost
untouched directly from libcephd.
Also added two API functions for generating an FSID and secret
key that can be used to bootstrap a new cluster.
Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
Compression and erasure coding plugins are now statically compiled
into libcephd. A new method is added to load them into the
respective registry.
The static libraries are only built when WITH_EMBEDDED is enabled
and existing plugins are unaffected.
Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
prior to this change, global_init() could create a new CephContext
and assign it to g_ceph_context. it's our responsibilty to release
the CephContext explicitly using cct->put() before the application
quits. but sometimes, we fail to do so.
in this change, global_init() will return an intrusive_ptr<CephContext>,
which calls `g_ceph_context->put()` in its dtor. this ensures that
the CephContext is always destroyed before main() returns. so the
log is flushed before _log_exp_length is destroyed.
there are two cases where global_pre_init() is called directly.
- ceph_conf.cc: g_ceph_context->put() will be called by an intrusive_ptr<>
deleter.
- rgw_main.cc: global_init() is called later on on the success code
path, so it will be taken care of.
Fixes: http://tracker.ceph.com/issues/17762
Signed-off-by: Kefu Chai <kchai@redhat.com>
In 626360aab0 we made the
OSD cluster loopback connection CEPH_FEATURES_ALL, but
all other loopback connections got features == 0. I
can't come up with any reason we wouldn't want those
connections to have accurate feature bits, so let's just
use CEPH_FEATURES_ALL for all of them.
While we're here, make the cflags argument required.
Signed-off-by: Sage Weil <sage@redhat.com>
Resurrected jerasure_generic, jerasure_sse3, jerasure_sse4, jerasure_neon,
shec_generic, shec_sse3, shec_sse4 and shec_neon. These all are exact
copies of the new jerasure and shec plugins that support SIMD detection.
Moved EC preload code in ceph-mon and ceph-osd to a central location, added
warning when preloading legacy plugins.
OSMonitor::get_erasure_code and OSDMonitor:normalize_profile will now check
if legacy EC plugins are used and log a warning.
Added tests to check that warnings make it to the log.
Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
Widen Messenger::create and XioMessenger constructor to support
per-Messenger instance creation parameters.
This introduce a minimalist generic set of flags to describe
the type of Messenger and its associated resources.
We apply the usage of these flags to ceph-osd's "workhorse",
"heartbeat" and "light" Messenger instances, ceph-mon and
other ceph clients Messengers.
Signed-off-by: Vu Pham <vu@mellanox.com>
Otherwise, all you see is errors about the probes that failed (e.g., a
failure to decode a non-bluestore superblock as bluestore).
Signed-off-by: Sage Weil <sage@redhat.com>
In one of our test environments an osd is unable to back to work
due to the journal is totally unrecoverable. The os_flags field
is introduced to handle such a case but never be made an option
and visible to normal user.
This commit tries to make os_flags field a configurable option and
no flags is enabled by default and thus shall cause no compatibility
relevant issues.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
missing nullity check will cause the process to crash in the following cases:
a. bad ms-type is configured in ceph.conf
b. an experimental ms-type is configured (ms-type-async or ms-type-xio) without explicitly enabling the experimental feature in ceph.conf
c. ms-type is configured to "random" and at runtime the random feature yields ms-type which is an experimental feature while in ceph.conf this experimental feature was not explicitly enabled
Signed-off-by: Avner BenHanoch <avnerb@mellanox.com>