Skip to content

Commit 1cf5399

Browse files
authored
Merge pull request ceph#62896 from zdover23/wip-doc-2025-04-21-revert-62782-c4f0f8e
doc: Revert "doc/mgr: Promptify CLI commands and other formatting fixes" Reviewed-by: Anthony D'Atri <[email protected]>
2 parents 7c994bf + 1d0ca24 commit 1cf5399

25 files changed

+609
-787
lines changed

doc/mgr/administrator.rst

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,21 @@ Usually, you would set up a ceph-mgr daemon using a tool such
1010
as ceph-ansible. These instructions describe how to set up
1111
a ceph-mgr daemon manually.
1212

13-
First, create an authentication key for your daemon:
13+
First, create an authentication key for your daemon::
1414

15-
.. prompt:: bash #
16-
17-
ceph auth get-or-create mgr.$name mon 'allow profile mgr' osd 'allow *' mds 'allow *'
15+
ceph auth get-or-create mgr.$name mon 'allow profile mgr' osd 'allow *' mds 'allow *'
1816

1917
Place that key as file named ``keyring`` into ``mgr data`` path, which for a cluster "ceph"
2018
and mgr $name "foo" would be ``/var/lib/ceph/mgr/ceph-foo`` respective ``/var/lib/ceph/mgr/ceph-foo/keyring``.
2119

22-
Start the ceph-mgr daemon:
23-
24-
.. prompt:: bash #
20+
Start the ceph-mgr daemon::
2521

26-
ceph-mgr -i $name
22+
ceph-mgr -i $name
2723

2824
Check that the mgr has come up by looking at the output
29-
of ``ceph status``, which should now include a mgr status line:
30-
31-
.. prompt:: bash #
25+
of ``ceph status``, which should now include a mgr status line::
3226

33-
mgr active: $name
27+
mgr active: $name
3428

3529
Client authentication
3630
---------------------
@@ -39,7 +33,7 @@ The manager is a new daemon which requires new CephX capabilities. If you upgrad
3933
a cluster from an old version of Ceph, or use the default install/deploy tools,
4034
your admin client should get this capability automatically. If you use tooling from
4135
elsewhere, you may get EACCES errors when invoking certain ceph cluster commands.
42-
To fix that, add a ``mgr allow \*`` stanza to your client's cephx capabilities by
36+
To fix that, add a "mgr allow \*" stanza to your client's cephx capabilities by
4337
`Modifying User Capabilities`_.
4438

4539
High availability
@@ -101,12 +95,9 @@ information about what functionality each module provides.
10195

10296
Here is an example of enabling the :term:`Dashboard` module:
10397

104-
.. prompt:: bash #
105-
106-
ceph mgr module ls
107-
108-
::
98+
.. code-block:: console
10999
100+
$ ceph mgr module ls
110101
{
111102
"enabled_modules": [
112103
"status"
@@ -116,13 +107,8 @@ Here is an example of enabling the :term:`Dashboard` module:
116107
]
117108
}
118109
119-
.. prompt:: bash #
120-
121-
ceph mgr module enable dashboard
122-
ceph mgr module ls
123-
124-
::
125-
110+
$ ceph mgr module enable dashboard
111+
$ ceph mgr module ls
126112
{
127113
"enabled_modules": [
128114
"status",
@@ -132,12 +118,7 @@ Here is an example of enabling the :term:`Dashboard` module:
132118
]
133119
}
134120
135-
.. prompt:: bash #
136-
137-
ceph mgr services
138-
139-
::
140-
121+
$ ceph mgr services
141122
{
142123
"dashboard": "http://myserver.com:7789/"
143124
}
@@ -176,11 +157,9 @@ Calling module commands
176157
Where a module implements command line hooks, the commands will
177158
be accessible as ordinary Ceph commands. Ceph will automatically incorporate
178159
module commands into the standard CLI interface and route them appropriately to
179-
the module.
180-
181-
.. prompt:: bash #
160+
the module.::
182161

183-
ceph <command | help>
162+
ceph <command | help>
184163

185164
Configuration
186165
-------------

doc/mgr/alerts.rst

Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,58 +16,44 @@ as well.
1616
Enabling
1717
--------
1818

19-
The *alerts* module is enabled with:
19+
The *alerts* module is enabled with::
2020

21-
.. prompt:: bash #
22-
23-
ceph mgr module enable alerts
21+
ceph mgr module enable alerts
2422

2523
Configuration
2624
-------------
2725

2826
To configure SMTP, all of the following config options must be set
29-
(When setting ``mgr/alerts/smtp_destination``, you can use commas to separate multiple):
30-
31-
.. prompt:: bash #
32-
33-
ceph config set mgr mgr/alerts/smtp_host *<smtp-server>*
34-
ceph config set mgr mgr/alerts/smtp_destination *<email-address-to-send-to>*
35-
ceph config set mgr mgr/alerts/smtp_sender *<from-email-address>*
36-
37-
By default, the module will use SSL and port 465. To change that:
27+
(When setting ``mgr/alerts/smtp_destination``, you can use commas to separate multiple)::
3828

39-
.. prompt:: bash #
29+
ceph config set mgr mgr/alerts/smtp_host *<smtp-server>*
30+
ceph config set mgr mgr/alerts/smtp_destination *<email-address-to-send-to>*
31+
ceph config set mgr mgr/alerts/smtp_sender *<from-email-address>*
4032

41-
ceph config set mgr mgr/alerts/smtp_ssl false # if not SSL
42-
ceph config set mgr mgr/alerts/smtp_port *<port-number>* # if not 465
33+
By default, the module will use SSL and port 465. To change that,::
4334

44-
To authenticate to the SMTP server, you must set the user and password:
35+
ceph config set mgr mgr/alerts/smtp_ssl false # if not SSL
36+
ceph config set mgr mgr/alerts/smtp_port *<port-number>* # if not 465
4537

46-
.. prompt:: bash #
38+
To authenticate to the SMTP server, you must set the user and password::
4739

48-
ceph config set mgr mgr/alerts/smtp_user *<username>*
49-
ceph config set mgr mgr/alerts/smtp_password *<password>*
40+
ceph config set mgr mgr/alerts/smtp_user *<username>*
41+
ceph config set mgr mgr/alerts/smtp_password *<password>*
5042

5143
By default, the name in the ``From:`` line is simply ``Ceph``. To
52-
change that (e.g., to identify which cluster this is):
44+
change that (e.g., to identify which cluster this is),::
5345

54-
.. prompt:: bash #
55-
56-
ceph config set mgr mgr/alerts/smtp_from_name 'Ceph Cluster Foo'
46+
ceph config set mgr mgr/alerts/smtp_from_name 'Ceph Cluster Foo'
5747

5848
By default, the module will check the cluster health once per minute
5949
and, if there is a change, send a message. To change that
60-
frequency:
61-
62-
.. prompt:: bash #
50+
frequency,::
6351

64-
ceph config set mgr mgr/alerts/interval *<interval>* # e.g., "5m" for 5 minutes
52+
ceph config set mgr mgr/alerts/interval *<interval>* # e.g., "5m" for 5 minutes
6553

6654
Commands
6755
--------
6856

69-
To force an alert to be send immediately:
70-
71-
.. prompt:: bash #
57+
To force an alert to be send immediately,::
7258

73-
ceph alerts send
59+
ceph alerts send

doc/mgr/ceph_api/index.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,9 @@ be obtained, and it may then be reused for subsequent requests. The
5353
{ "token": "<redacted_token>", ...}
5454

5555
The token obtained must be passed together with every API request in the
56-
``Authorization`` HTTP header:
56+
``Authorization`` HTTP header::
5757

58-
.. prompt:: bash $
59-
60-
curl -H "Authorization: Bearer <token>" ...
58+
curl -H "Authorization: Bearer <token>" ...
6159

6260
Authentication and authorization can be further configured from the
6361
Ceph CLI, the Ceph-Dashboard UI and the Ceph API itself (please refer to

doc/mgr/cli_api.rst

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,33 @@ benchmarked for further testing.
77
Enabling
88
--------
99

10-
The *cli api commands* module is enabled with:
10+
The *cli api commands* module is enabled with::
1111

12-
.. prompt:: bash #
12+
ceph mgr module enable cli_api
1313

14-
ceph mgr module enable cli_api
14+
To check that it is enabled, run::
1515

16-
To check that it is enabled, run:
17-
18-
.. prompt:: bash #
19-
20-
ceph mgr module ls | grep cli_api
16+
ceph mgr module ls | grep cli_api
2117

2218
Usage
2319
--------
2420

25-
To run a mgr module command, run:
26-
27-
.. prompt:: bash #
28-
29-
ceph mgr cli <command> <param>
30-
31-
For example, use the following command to print the list of servers:
32-
33-
.. prompt:: bash #
34-
35-
ceph mgr cli list_servers
21+
To run a mgr module command, run::
3622

37-
List all available mgr module commands with:
23+
ceph mgr cli <command> <param>
3824

39-
.. prompt:: bash #
25+
For example, use the following command to print the list of servers::
4026

41-
ceph mgr cli --help
27+
ceph mgr cli list_servers
4228

43-
To benchmark a command, run:
29+
List all available mgr module commands with::
4430

45-
.. prompt:: bash #
31+
ceph mgr cli --help
4632

47-
ceph mgr cli_benchmark <number of calls> <number of threads> <command> <param>
33+
To benchmark a command, run::
4834

49-
For example, use the following command to benchmark the command to get osd_map:
35+
ceph mgr cli_benchmark <number of calls> <number of threads> <command> <param>
5036

51-
.. prompt:: bash #
37+
For example, use the following command to benchmark the command to get osd_map::
5238

53-
ceph mgr cli_benchmark 100 10 get osd_map
39+
ceph mgr cli_benchmark 100 10 get osd_map

doc/mgr/crash.rst

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@ it in the Ceph cluster for later analysis.
66
Enabling
77
--------
88

9-
The *crash* module is enabled with:
9+
The *crash* module is enabled with::
1010

11-
.. prompt:: bash #
11+
ceph mgr module enable crash
1212

13-
ceph mgr module enable crash
13+
The *crash* upload key is generated with::
1414

15-
The *crash* upload key is generated with:
16-
17-
.. prompt:: bash #
18-
19-
ceph auth get-or-create client.crash mon 'profile crash' mgr 'profile crash'
15+
ceph auth get-or-create client.crash mon 'profile crash' mgr 'profile crash'
2016

2117
On each node, you should store this key in
2218
``/etc/ceph/ceph.client.crash.keyring``.
@@ -43,57 +39,57 @@ and a keyring needs to be in ``/etc/ceph``.
4339

4440
Commands
4541
--------
46-
.. prompt:: bash #
42+
::
4743

48-
ceph crash post -i <metafile>
44+
ceph crash post -i <metafile>
4945

5046
Save a crash dump. The metadata file is a JSON blob stored in the crash
5147
dir as ``meta``. As usual, the ceph command can be invoked with ``-i -``,
5248
and will read from stdin.
5349

54-
.. prompt:: bash #
50+
::
5551

56-
ceph crash rm <crashid>
52+
ceph crash rm <crashid>
5753

5854
Remove a specific crash dump.
5955

60-
.. prompt:: bash #
56+
::
6157

62-
ceph crash ls
58+
ceph crash ls
6359

6460
List the timestamp/uuid crashids for all new and archived crash info.
6561

66-
.. prompt:: bash #
62+
::
6763

68-
ceph crash ls-new
64+
ceph crash ls-new
6965

7066
List the timestamp/uuid crashids for all newcrash info.
7167

72-
.. prompt:: bash #
68+
::
7369

74-
ceph crash stat
70+
ceph crash stat
7571

7672
Show a summary of saved crash info grouped by age.
7773

78-
.. prompt:: bash #
74+
::
7975

80-
ceph crash info <crashid>
76+
ceph crash info <crashid>
8177

8278
Show all details of a saved crash.
8379

84-
.. prompt:: bash #
80+
::
8581

8682
ceph crash prune <keep>
8783

8884
Remove saved crashes older than 'keep' days. <keep> must be an integer.
8985

90-
.. prompt:: bash #
86+
::
9187

9288
ceph crash archive <crashid>
9389

9490
Archive a crash report so that it is no longer considered for the ``RECENT_CRASH`` health check and does not appear in the ``crash ls-new`` output (it will still appear in the ``crash ls`` output).
9591

96-
.. prompt:: bash #
92+
::
9793

9894
ceph crash archive-all
9995

0 commit comments

Comments
 (0)