Commit Graph

165 Commits

Author SHA1 Message Date
Kefu Chai
bcbcdd26b2
Merge pull request #19958 from renhwztetecs/renhw-wip-osd-sighup
osd: Sign in early SIGHUP signal

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-02-07 22:40:59 +08:00
Yan Jun
3887c47003 osd: use defined osd_required features for messenger policy
Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
2018-02-04 23:16:58 +08:00
huanwen ren
da3ba00286 osd: Sign in early SIGHUP signal
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>
2018-01-25 09:00:31 +08:00
Adam C. Emerson
46de629c3d osd: Use unqualified encode/decode
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>
2018-01-10 14:03:35 -05:00
Shinobu Kinjo
411470d011 ceph_osd.cc: [Cleanup] Drop legacy or redundant code
Signed-off-by: Shinobu Kinjo <shinobu@redhat.com>
2017-11-04 11:56:01 +09:00
Sage Weil
75400ead30 ceph-osd: mkkey before mkfs
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-16 10:56:25 -05:00
Sage Weil
6ad99a7e6c Merge pull request #15565 from gmayyyha/ceph-osd-help-output
ceph-osd: some flags are not documented in the help output

Reviewed-by: Sage Weil <sage@redhat.com>
2017-09-02 13:36:53 -05:00
Sage Weil
d73e0b28ad Merge pull request #16594 from wjwithagen/wip-wjw-reduce-info-messages
common: make some message informative, instead of error

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-08-11 08:31:53 -05:00
Kefu Chai
d6b9f36c48 Merge pull request #16717 from gmayyyha/osd-objectstore-20865
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>
2017-08-03 21:14:34 +08:00
Yanhu Cao
ce7fed2926 ceph-osd: fix auto detect which objectstore is currently running
Fixes: http://tracker.ceph.com/issues/20865

Signed-off-by: Yanhu Cao <gmayyyha@gmail.com>
2017-08-01 10:44:57 +08:00
Willem Jan Withagen
8241a322aa common: make some message informative, instead of error
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2017-07-31 14:52:42 +02:00
Yanhu Cao
555c546dcd ceph-osd: some flags are not documented in the help output
Fixes: http://tracker.ceph.com/issues/20057

Signed-off-by: Yanhu Cao <gmayyyha@gmail.com>
2017-07-31 10:01:51 +08:00
mychoxin
ba26907d71 print more information when run ceph-osd with 'chech options'
Signed-off-by: mychoxin <mychoxin@gmail.com>
2017-07-30 12:28:41 +08:00
Josh Durgin
78d0b278a6 HashIndex: randomize split threshold by a configurable amount
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>
2017-06-15 06:12:19 -07:00
Sameer Tiwari
dcefefb554 Documentation Fixes for http://tracker.ceph.com/issues/19879
and related bug http://tracker.ceph.com/issues/20057

Signed-off-by: Sameer Tiwari <stiwari@salesforce.com>
2017-06-07 03:22:20 -04:00
Sage Weil
cd4acd8d01 Merge pull request #15176 from SUSE/wip-mgr-fix-help
mgr,osd:  ceph-mgr --help, unify usage text of other daemons

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-06-02 10:20:27 -05:00
Kefu Chai
ef9d93b8ea Merge pull request #15055 from mogeb/wip-with-instrument-functions
cmake: Add -finstrument-functions flag to OSD code

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-05-28 14:45:57 +08:00
Mohamad Gebai
73ab6c2d13 tracing: add -finstrument-functions for OSD
Signed-off-by: Mohamad Gebai <mgebai@suse.com>
2017-05-25 15:16:21 -04:00
Tim Serong
4da9b4862d osd/mon/mds: unify usage text, always use stdout
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>
2017-05-19 22:44:22 +10:00
Haomai Wang
45d5ac3ea0 ceph_osd: remove client message cap limit
Leave the messenger ops throttle interface, we could keep watching on changing

Signed-off-by: Haomai Wang <haomai@xsky.com>
2017-05-05 21:01:20 +08:00
Sage Weil
b25b53ff03 Merge pull request #13898 from songbaisen/m5
osd: check fsid is normal before osd mkfs

Reviewed-by: Sage Weil <sage@redhat.com>
2017-04-23 15:49:28 -05:00
liuchang0812
e6755fa596 common: convert ms_type option to SAFE_OPTION
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>
2017-03-22 20:39:51 +08:00
songbaisen
582b39eb68 osd: check fsid is normal before osd mkfs
Signed-off-by: song baisen <song.baisen@zte.com.cn>
2017-03-09 19:36:40 +08:00
Sage Weil
e0a01ecc4f msg/Messenger: drop useless 'supported' arg to Policy ctor
We always use CEPH_FEATURES_DEFAULT_SUPPORTED (= CEPH_FEATURES_ALL) here.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-03 12:56:21 -06:00
Sage Weil
5fd15bd5be msg: drop pointless specification of supported features
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>
2017-03-03 11:09:11 -06:00
Alexey Sheplyakov
00184814c1 ceph-osd: --flush-journal: sporadic segfaults on exit
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>
2017-02-09 15:32:21 +04:00
Haomai Wang
2850132f3e msgr: allow different public and cluster msgr type
Signed-off-by: Haomai Wang <haomai@xsky.com>
2017-01-26 13:58:42 +08:00
Haomai Wang
6e4ed291af msg: add ms_bind_before_connect to bind before connect
Signed-off-by: Zengran Zhang <zhangzengran@h3c.com>
Signed-off-by: Haomai Wang <haomai@xsky.com>
2017-01-19 22:52:17 +08:00
Haomai Wang
08caf09377 msgr: add client_bind to allow client messenger save ip
Signed-off-by: Haomai Wang <haomai@xsky.com>
2017-01-12 15:48:08 +08:00
Haomai Wang
551cfee828 osd: separate hb client messenger to public and cluster
Signed-off-by: Haomai Wang <haomai@xsky.com>
2017-01-12 15:47:57 +08:00
Adam C. Emerson
b9182564c7 dout: Use dout_context
As a transition for g_ceph_context removal, make all dout macros depends
on a local macro.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2016-12-22 13:55:37 -05:00
Bassam Tabbara
d447a80815 embedded: Add RADOS classes to embedded cephd library
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>
2016-11-28 23:48:02 -08:00
Bassam Tabbara
0664759127 embedded: Support for running MON and OSD from libcephd
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>
2016-11-28 23:48:02 -08:00
Bassam Tabbara
b5d57c97c7 embedded: add compression and EC plugins to libcephd
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>
2016-11-28 23:48:02 -08:00
Kefu Chai
cb1cda9671 common,test: g_ceph_context->put() upon return
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>
2016-11-24 22:38:28 +08:00
Sage Weil
0dbe8fd398 msg: make loopback Connection feature accurate all the time
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>
2016-10-10 09:55:54 -04:00
Loic Dachary
00873f26e5 Merge pull request #11086 from bassamtabbara/wip-ec-simd-runtime-detection
erasure-code: Runtime detection of SIMD for jerasure and shec

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2016-10-03 11:43:29 +02:00
Bassam Tabbara
e7e0b1bc1e erasure-code: Backward compatibility with legacy EC plugins
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>
2016-09-29 10:34:34 -07:00
John Spray
10da6d23cd osd: embed a MgrClient
Signed-off-by: John Spray <john.spray@redhat.com>
2016-09-29 17:26:55 +01:00
Vu Pham
5b218fb794 msgr,xio: flexible Messenger::create configuration flags
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>
2016-06-01 10:26:23 -07:00
Sage Weil
a5564a664c os/ObjectStore: make device uuid probe output something friendly
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>
2016-04-05 11:10:54 -04:00
Sage Weil
81f53dfb67 Merge pull request #8214 from athanatos/wip-feature-bits
Deprecate or free up a bunch of feature bits

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-21 07:35:27 -04:00
Samuel Just
9b27e73564 features: deprecate CEPH_FEATURE_PACKED_RECOVERY
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-03-16 18:10:12 -07:00
Samuel Just
9326c2b4ab features: deprecate CEPH_OSD_FEATURE_SNAPMAPPER
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-03-16 18:10:12 -07:00
Samuel Just
ccbceef594 features: deprecate CEPH_FEATURE_RECOVERY_RESERVATION
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-03-16 18:10:12 -07:00
Samuel Just
4591dc06f2 features: deprecate CEPH_FEATURE_BACKFILL_RESERVATON
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-03-16 18:10:12 -07:00
Samuel Just
37518a3e8a features: deprecate CEPH_FEATURE_CHUNKY_SCRUB
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-03-16 18:10:12 -07:00
Samuel Just
ac443a899a features: deprecate CEPH_FEATURE_INDEP_PG_MAP
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-03-16 18:10:12 -07:00
xie xingguo
a835b0ed51 osd: make os_flags an option
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>
2016-03-15 19:05:40 +08:00
Avner BenHanoch
027edc3a08 osd: don't crash because of bad ms-type in ceph.conf (or missing enablement for experimental ms-type)
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>
2016-02-17 18:42:16 +02:00