Commit Graph

56 Commits

Author SHA1 Message Date
John Spray
7e2e3bb505 mds: big MDS refactor stage 2: encapsulation
Encapsulate MDSRank in MDS instead of inheriting from
it.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00
John Spray
722202003b mds: always delete MDS
Previous is_stopping check no longer makes sense (and
actually was pretty bogus anyway as it would avoid
doing clean destruction of a standby daemon)

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00
Matt Benjamin
fd5cd938d2 Cosmetic ceph_mds.cc.
Signed-off-by: Matt Benjamin <matt@cohortfs.com>
2015-01-14 16:42:57 -05:00
Sage Weil
0a25bee539 Merge remote-tracking branch 'gh/wip-fs-quota'
Conflicts:
	src/client/Client.cc
2014-12-19 07:45:02 -08:00
Haomai Wang
001ea29386 Messenger: Create an Messenger implementation by name.
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-12-18 21:51:12 +08:00
Yunchuan Wen
3619ea8a8b ceph: Add quota feature flags
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Signed-off-by: Li Wang <liwang@ubuntukylin.com>
2014-11-03 04:37:23 +08:00
Loic Dachary
b39cb68095 Merge pull request #2629 from dachary/wip-heap-profiler
perfglue: minors heap profiler updates and documentation

Reviewed-by: Jianpeng Ma <majianpeng@gmail.com>
2014-10-09 08:17:12 +02:00
John Spray
5e7cb60827 mds: deprecation-warn on numeric mds names
To be turned into strict check in post-hammer
release, so that we can always unambiguously
discriminate a string into one of name, rank, gid.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-10-08 11:58:19 +01:00
Loic Dachary
6f6e7e2553 mon,mds: call ceph_heap_profiler_init() at boot time
So that the CEPH_HEAP_PROFILER_INIT environment variable can be used to
start profiling.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-08 09:47:54 +02:00
John Spray
07665ec4b3 mds: introduce explicit DaemonState instead of int
Signed-off-by: John Spray <john.spray@redhat.com>
2014-07-29 22:32:43 +01:00
John Spray
f7e9ff174f tools: Create cephfs-journal-tool
This is for debugging/repairing CephFS journals.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:49 +01:00
John Spray
c07a758c4e mds: Add dump-journal-entries
This adds a somewhat-human-readable peer to
the 'dump-journal' command.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-02-26 18:19:06 +00:00
John Spray
7a985df633 mds: Create MDSUtility as base for Dumper/Resetter
These classes has lots of similar functionality and we may
want to add more similar things in the future.

Also, get a copy of the MDS map at startup
to learn the ID of the metadata pool instead of
assuming it's the default.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-02-26 18:19:02 +00:00
John Spray
410c5074de mds: Fix Dumper shutdown
It was shutting down messenger before monclient.  This
caused a sometimes-assertion when monclient tried to
reconnect in response to ms_handle_reset.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-02-26 18:15:45 +00:00
Li Wang
978ec18b40 ceph: Add inline data feature
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Signed-off-by: Li Wang <liwang@ubuntukylin.com>
2014-01-14 14:48:26 +08:00
Yan, Zheng
71d1eb374a mds: add CEPH_FEATURE_EXPORT_PEER and bump the protocal version
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-12-16 12:15:25 +08:00
Sage Weil
c3acc25608 mon, mds, osd: add early SIGTERM injection
This makes it easy to identify problems with (early) shutdown with a
loop like

 while [ ! -e core ] ; do ./ceph-mds -i a -c ceph.conf -f ; done

and a vstart cluster.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-20 08:49:48 -07:00
Sage Weil
7e25fecdfe mds: put g_ceph_context on shutdown
This makes us shut down lots of threads.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-20 08:47:51 -07:00
Sage Weil
318f3df718 mds: install signal handlers after init
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-20 08:37:44 -07:00
Sage Weil
e8d0dc762f Merge branch 'next' 2013-05-23 08:49:10 -07:00
Sage Weil
32dc463ad4 osd, mds: shut down async signal handler on exit
Signed-off-by: Sage Weil <sage@inktank.com>
2013-05-22 14:56:24 -07:00
Joao Eduardo Luis
a43d3531b7 ceph-mds: specify which types of addresses to pick
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-05-22 18:18:19 +01:00
Sam Lang
1d50affc75 mds: fix usage typo for ceph-mds
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-01-16 09:43:58 -06:00
Yehuda Sadeh
29307d3b32 mds: shutdown cleanly if can't authenticate
Fixes: #3590
This was triggered when tried to run mds with cephx enabled
against a mon without cephx support. We didn't handle the
returned error at all, so this one fixes it. It also makes
sure that we don't continue initialization until rotating
keys are in place (as the osd does).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-12-11 15:08:58 -08:00
Danny Al-Gaaf
c753f58eb9 ceph_mds.cc: remove twice included sys/stat.h
Fix includes: remove twice included sys/stat.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2012-11-28 08:25:32 -08:00
Peter Reiher
2b56e800b5 Code to allow pipes to be prepared to sign messages and to call the authentication methods for signing and checking.
Signed-off-by: Peter Reiher <reiher@inktank.com>
2012-10-01 13:13:40 -07:00
Sage Weil
1eea43db19 global: fix version banner in log on startup
Log banner from global_init().  This puts it at the very top of the log,
right when the daemon starts.

Fixes: #2940
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 14:06:47 -07:00
Sage Weil
7b398a5d9c msgr: indicate whether clients are lossy
We need to know whether the client is lossy before we connect to the peer
in order to know whether to deliver a RESET event or not on connection
failure.  Lossy clients get one, lossless do not.

And in any case, we know ahead of time, so we may as well indicate as much
in the Policy.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-20 18:36:32 -07:00
Sage Weil
0f6d90c760 make everyone use our assert #include and macro
...as detected by the previous patch.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-06 16:57:31 -07:00
Sage Weil
be6a9a6c1f msgr: name messengers
Give each Messenger a logical name describing its role.  For instance, the
OSD will have client, cluster, and heartbeat messengers.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-04-30 16:31:21 -07:00
Sage Weil
f41887e38d log: new logging infrastructure
- explicitly defined subsystems, and ceph_subsys_FOO enums to go with them
- modular log system with Entry object
- separate gather level and log level
- drop lots of DoutStreambuf hackery

Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-27 10:41:12 -07:00
Sage Weil
80e2a5e837 msgr: switch all users over to abstract interface
This will let us transparently swap implementations out.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-14 16:33:39 -07:00
Yehuda Sadeh
2c88f85c6d config: alternative config options for global_init()
We want to be able to provide alternative default config values, than
the ones we set in common/config_opts.h. This can be useful when we
want different default for different modules (e.g., rgw, rgw-admin).
Just passing it on the command line won't do because then we'd override
any config set by the user, so we need to process that before the regular
parsing (but after initializing the config context).

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-12 13:21:22 -07:00
Greg Farnum
9dc7c65399 msgr: remove SimpleMessenger::get_ms_addr() in favor of Messenger::get_myaddr
And fix the comments on set_ip.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Reviewed-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-07 13:54:39 -08:00
Greg Farnum
091b176016 msgr: make nonce a required part of the SimpleMessenger constructor.
With that, remove the set_nonce function and the gratuitous passing
of nonce around through layers of functions.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-03-02 12:32:36 -08:00
Greg Farnum
26e48f4234 msgr: Require that init functions are called before bind() and start().
Fix up callers to handle these constraints.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-03-02 12:32:36 -08:00
Greg Farnum
578bc9c420 msgr: Remove the SimpleMessenger::bind() nonce parameter.
Instead, use the just-established nonce value.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-03-02 11:20:27 -08:00
Greg Farnum
ef244773ee msgr: Remove the SimpleMessenger start/start_with_nonce distinction.
Instead, have a settable nonce value that you can fill in any time
after construction and that it uses during regular start().

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-03-02 11:20:27 -08:00
Greg Farnum
ffa595598d msgr: Remove SimpleMessenger::register_entity
This function has been vestigial for a long time. Remove it and move
its remaining functionality into the constructor.
Update users to the new interface (this is remarkably easy and
simplifies the code).

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-03-02 11:20:27 -08:00
Sage Weil
8e9bf6111e mds: unregister SIGHUP too
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-29 09:45:56 -08:00
Alexandre Oliva
26b5675301 Fix ceph-mds --journal-reset
Complete configuration initialization for special actions, and
hold Resetter lock while running reset.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-22 21:08:19 -08:00
Sage Weil
1f5e446d8a msgr: promote SimpleMessenger::Policy to Messenger::Policy
This is part of the generic interface, not specific to the implementation.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-18 22:12:26 -08:00
Sage Weil
395dc659b9 mds: remove pidfile
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-14 21:03:53 -08:00
Sage Weil
be704fe1d9 mds: install async signal handlers for SIG{HUP,INT,TERM}
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-14 21:03:53 -08:00
Sage Weil
f002ed4c9f features: #include ceph_features directly where needed
Less rebuild time when touched.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-23 06:18:53 -08:00
Sage Weil
2bffed3bc9 Merge remote branch 'gh/master' into wip-op-data-mux 2012-01-17 17:33:57 -08:00
Sage Weil
956a4b4397 Merge remote branch 'gh/wip-backfill'
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>

Conflicts:
	src/ceph_mds.cc
	src/ceph_osd.cc
2012-01-17 14:23:58 -08:00
Sage Weil
63b94b6ff0 mds: abort startup if we fail to bind
Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-17 09:36:36 -08:00
Sage Weil
7f123de85d mds: require OSDREPLYMUX feature bit
We use ObjectOperations now and need a new server to decompose replies
into their constituent components.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-13 15:08:17 -08:00
Sage Weil
9986553c71 msgr: explicitly specify internal cluster protocol
Replace case statement based on my_type.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-04 15:57:41 -08:00