| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This provides common ceph entrypoints for the pthread_[gs]name functions which
will also cache a thread_local copy. This also removes the pthread_t parameter
which precipitated the bug i50743.
Obviously, the overall goal here is to avoid system calls.
See-also: https://tracker.ceph.com/issues/50743
Fixes: 0be8d01c9ddde0d7d24edd34dc75f6cfc861b5ba
Fixes: https://tracker.ceph.com/issues/68691
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
|
|
|
|
|
|
|
| |
A followup to PR #42820 that modified argv_to_vec() signature
(for style and performance).
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
* add "std::" prefix in headers
* add "using" declarations in .cc files.
so we don't rely on "using namespace std" in one or more included
headers.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
|
| |
1. data_dir_option isn't used
2. Align with commit 85f2315b:
"remove data_dir_option from common_preinit and global_pre_init"
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- when there are no arguments, print a short invitation to stderr to
use -h or --help and exit with an error.
- if we get -h or --help, print usage to stdout, and exit with success.
- do the above *before* making any contact with the cluster. we should
not fail to explain usage because the mons are down.
- if there is some other error with the arguments, print an error message,
but do not spam the user with usage. Try to use cerr instead of derr.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
| |
global[_pre]_init does this for us now.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is not particularly efficient, but it works:
- connect to the monitor to get the monmap and config
- tear it all down
- proceed with normal startup (which presumably involves reconnecting
to the mon all over again).
This allows us to set config options that may affect the mon communication
itself, like ms_type.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This gets used as our process name in some situations
when respawning. This is the same as what commit 4f177bb6b
did for the MDS.
Fixes: http://tracker.ceph.com/issues/21404
Signed-off-by: John Spray <john.spray@redhat.com>
|
|
|
|
|
|
|
|
| |
Previously this was presumably simply not
applying the public_network setting at all.
Fixes: http://tracker.ceph.com/issues/20955
Signed-off-by: John Spray <john.spray@redhat.com>
|
|
|
|
|
|
|
|
|
| |
We should not proceed if setting this fails. Also
the meta=false setting is not what you want when
calling into set_val after initialization, I'm not sure
how that ever worked!
Signed-off-by: John Spray <john.spray@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- It is ugly to unwind all of the Mgr state so that we can reactivate
later.
- It is perhaps impossible to do shut down the python state reliably.
- Respawning provides a clean state and is reliable.
This mostly just copies MDSServer::respawn().
Fixes: http://tracker.ceph.com/issues/19595
Fixes: http://tracker.ceph.com/issues/19549
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Creating an MgrStandby in order to call its usage() method has
two problems:
1) MgrStandby wants to connect to a running cluster; if the
cluster isn't up, you'll be left staring at a blinking cursor.
2) MgrStandby::usage() doesn't print anything anyway.
This commit takes pretty much the same approach to printing
usage information as ceph_mon.cc, ceph_osd.cc and ceph_mds.cc.
Signed-off-by: Tim Serong <tserong@suse.com>
|
|
|
|
|
|
|
| |
MgrStandby contains an Objecter with a ceph_timer and
associated thread. Create it after we fork.
Signed-off-by: Sage Weil <sage@redhat.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>
|
|
|
|
|
|
|
| |
No longer need the mon to send us
the pg_summary json hack.
Signed-off-by: John Spray <john.spray@redhat.com>
|
|
|
|
| |
Signed-off-by: John Spray <john.spray@redhat.com>
|
|
|
|
|
|
|
| |
serve() each one in a separate thread, include a shutdown()
hook so that we can tear down cleanly.
Signed-off-by: John Spray <john.spray@redhat.com>
|
|
Signed-off-by: John Spray <john.spray@redhat.com>
|