2017-08-17 12:07:38 +00:00
|
|
|
.. _mgr-administrator-guide:
|
2016-08-31 11:19:34 +00:00
|
|
|
|
|
|
|
ceph-mgr administrator's guide
|
|
|
|
==============================
|
|
|
|
|
2017-06-14 13:53:26 +00:00
|
|
|
Manual setup
|
|
|
|
------------
|
2016-08-31 11:19:34 +00:00
|
|
|
|
2017-06-14 13:53:26 +00:00
|
|
|
Usually, you would set up a ceph-mgr daemon using a tool such
|
|
|
|
as ceph-ansible. These instructions describe how to set up
|
|
|
|
a ceph-mgr daemon manually.
|
2016-08-31 11:19:34 +00:00
|
|
|
|
2017-06-14 13:53:26 +00:00
|
|
|
First, create an authentication key for your daemon::
|
|
|
|
|
|
|
|
ceph auth get-or-create mgr.$name mon 'allow profile mgr' osd 'allow *' mds 'allow *'
|
2016-08-31 11:19:34 +00:00
|
|
|
|
2020-09-02 07:13:12 +00:00
|
|
|
Place that key as file named ``keyring`` into ``mgr data`` path, which for a cluster "ceph"
|
|
|
|
and mgr $name "foo" would be ``/var/lib/ceph/mgr/ceph-foo`` respective ``/var/lib/ceph/mgr/ceph-foo/keyring``.
|
2016-08-31 11:19:34 +00:00
|
|
|
|
2016-10-26 01:44:57 +00:00
|
|
|
Start the ceph-mgr daemon::
|
2016-08-31 11:19:34 +00:00
|
|
|
|
|
|
|
ceph-mgr -i $name
|
|
|
|
|
|
|
|
Check that the mgr has come up by looking at the output
|
2016-10-26 01:44:57 +00:00
|
|
|
of ``ceph status``, which should now include a mgr status line::
|
2016-08-31 11:19:34 +00:00
|
|
|
|
|
|
|
mgr active: $name
|
|
|
|
|
2017-06-14 22:00:04 +00:00
|
|
|
Client authentication
|
|
|
|
---------------------
|
2017-07-07 03:41:28 +00:00
|
|
|
|
2017-06-14 22:00:04 +00:00
|
|
|
The manager is a new daemon which requires new CephX capabilities. If you upgrade
|
|
|
|
a cluster from an old version of Ceph, or use the default install/deploy tools,
|
|
|
|
your admin client should get this capability automatically. If you use tooling from
|
|
|
|
elsewhere, you may get EACCES errors when invoking certain ceph cluster commands.
|
2017-07-07 03:41:28 +00:00
|
|
|
To fix that, add a "mgr allow \*" stanza to your client's cephx capabilities by
|
2017-06-14 22:00:04 +00:00
|
|
|
`Modifying User Capabilities`_.
|
|
|
|
|
2016-08-31 11:19:34 +00:00
|
|
|
High availability
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
In general, you should set up a ceph-mgr on each of the hosts
|
2017-08-17 12:07:38 +00:00
|
|
|
running a ceph-mon daemon to achieve the same level of availability.
|
2016-08-31 11:19:34 +00:00
|
|
|
|
|
|
|
By default, whichever ceph-mgr instance comes up first will be made
|
|
|
|
active by the monitors, and the others will be standbys. There is
|
|
|
|
no requirement for quorum among the ceph-mgr daemons.
|
|
|
|
|
|
|
|
If the active daemon fails to send a beacon to the monitors for
|
2021-05-26 04:00:57 +00:00
|
|
|
more than :confval:`mon_mgr_beacon_grace`, then it will be replaced
|
2016-08-31 11:19:34 +00:00
|
|
|
by a standby.
|
|
|
|
|
|
|
|
If you want to pre-empt failover, you can explicitly mark a ceph-mgr
|
|
|
|
daemon as failed using ``ceph mgr fail <mgr name>``.
|
|
|
|
|
2017-11-01 10:34:36 +00:00
|
|
|
Using modules
|
|
|
|
-------------
|
|
|
|
|
|
|
|
Use the command ``ceph mgr module ls`` to see which modules are
|
|
|
|
available, and which are currently enabled. Enable or disable modules
|
|
|
|
using the commands ``ceph mgr module enable <module>`` and
|
|
|
|
``ceph mgr module disable <module>`` respectively.
|
|
|
|
|
|
|
|
If a module is *enabled* then the active ceph-mgr daemon will load
|
|
|
|
and execute it. In the case of modules that provide a service,
|
|
|
|
such as an HTTP server, the module may publish its address when it
|
|
|
|
is loaded. To see the addresses of such modules, use the command
|
|
|
|
``ceph mgr services``.
|
|
|
|
|
|
|
|
Some modules may also implement a special standby mode which runs on
|
|
|
|
standby ceph-mgr daemons as well as the active daemon. This enables
|
|
|
|
modules that provide services to redirect their clients to the active
|
|
|
|
daemon, if the client tries to connect to a standby.
|
|
|
|
|
|
|
|
Consult the documentation pages for individual manager modules for more
|
|
|
|
information about what functionality each module provides.
|
|
|
|
|
2018-06-28 08:40:36 +00:00
|
|
|
Here is an example of enabling the :term:`Dashboard` module:
|
2017-11-01 10:34:36 +00:00
|
|
|
|
2021-05-26 04:00:57 +00:00
|
|
|
.. code-block:: console
|
2017-11-01 10:34:36 +00:00
|
|
|
|
|
|
|
$ ceph mgr module ls
|
|
|
|
{
|
|
|
|
"enabled_modules": [
|
|
|
|
"restful",
|
|
|
|
"status"
|
|
|
|
],
|
|
|
|
"disabled_modules": [
|
|
|
|
"dashboard"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
$ ceph mgr module enable dashboard
|
|
|
|
$ ceph mgr module ls
|
|
|
|
{
|
|
|
|
"enabled_modules": [
|
|
|
|
"restful",
|
|
|
|
"status",
|
|
|
|
"dashboard"
|
|
|
|
],
|
|
|
|
"disabled_modules": [
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
$ ceph mgr services
|
|
|
|
{
|
|
|
|
"dashboard": "http://myserver.com:7789/",
|
|
|
|
"restful": "https://myserver.com:8789/"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-05-26 04:00:57 +00:00
|
|
|
The first time the cluster starts, it uses the :confval:`mgr_initial_modules`
|
2018-07-03 08:46:07 +00:00
|
|
|
setting to override which modules to enable. However, this setting
|
|
|
|
is ignored through the rest of the lifetime of the cluster: only
|
|
|
|
use it for bootstrapping. For example, before starting your
|
|
|
|
monitor daemons for the first time, you might add a section like
|
|
|
|
this to your ``ceph.conf``:
|
|
|
|
|
2021-05-26 04:00:57 +00:00
|
|
|
.. code-block:: ini
|
2018-07-03 08:46:07 +00:00
|
|
|
|
|
|
|
[mon]
|
2020-12-15 06:02:31 +00:00
|
|
|
mgr_initial_modules = dashboard balancer
|
2018-07-03 08:46:07 +00:00
|
|
|
|
2021-04-13 02:42:57 +00:00
|
|
|
Module Pool
|
|
|
|
-----------
|
|
|
|
|
|
|
|
The manager creates a pool for use by its module to store state. The name of
|
|
|
|
this pool is ``.mgr`` (with the leading ``.`` indicating a reserved pool
|
|
|
|
name).
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
Prior to Quincy, the ``devicehealth`` module created a
|
|
|
|
``device_health_metrics`` pool to store device SMART statistics. With
|
|
|
|
Quincy, this pool is automatically renamed to be the common manager module
|
|
|
|
pool.
|
|
|
|
|
|
|
|
|
2016-08-31 11:19:34 +00:00
|
|
|
Calling module commands
|
|
|
|
-----------------------
|
|
|
|
|
2017-06-29 22:06:34 +00:00
|
|
|
Where a module implements command line hooks, the commands will
|
2019-09-10 15:56:54 +00:00
|
|
|
be accessible as ordinary Ceph commands. Ceph will automatically incorporate
|
|
|
|
module commands into the standard CLI interface and route them appropriately to
|
|
|
|
the module.::
|
2016-08-31 11:19:34 +00:00
|
|
|
|
2017-06-29 22:06:34 +00:00
|
|
|
ceph <command | help>
|
|
|
|
|
2016-08-31 11:19:34 +00:00
|
|
|
Configuration
|
|
|
|
-------------
|
|
|
|
|
2021-05-26 04:00:57 +00:00
|
|
|
.. confval:: mgr_module_path
|
|
|
|
.. confval:: mgr_initial_modules
|
|
|
|
.. confval:: mgr_data
|
|
|
|
.. confval:: mgr_tick_period
|
|
|
|
.. confval:: mon_mgr_beacon_grace
|
2016-08-31 11:19:34 +00:00
|
|
|
|
2017-07-10 17:56:53 +00:00
|
|
|
.. _Modifying User Capabilities: ../../rados/operations/user-management/#modify-user-capabilities
|