Skip to content

Commit 9687249

Browse files
committed
DOCS-5269: Advise caution when changing some config settings
1 parent 2110739 commit 9687249

File tree

4 files changed

+74
-34
lines changed

4 files changed

+74
-34
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
ref: _linux-config-expectations
2+
content: |
3+
The Linux package init scripts do not expect {{option}} to change from the
4+
defaults. If you use the Linux packages and change {{option}}, you will have
5+
to use your own init scripts and disable the built-in scripts.
6+
---
7+
ref: linux-config-expectations-systemlog-path
8+
replacement:
9+
option: ":setting:`systemLog.path`"
10+
inherit:
11+
ref: _linux-config-expectations
12+
file: extracts-linux-config-expectations.yaml
13+
---
14+
ref: linux-config-expectations-processmanagement-fork
15+
replacement:
16+
option: ":setting:`processManagement.fork`"
17+
inherit:
18+
ref: _linux-config-expectations
19+
file: extracts-linux-config-expectations.yaml
20+
---
21+
ref: linux-config-expectations-storage-dbpath
22+
replacement:
23+
option: ":setting:`storage.dbPath`"
24+
inherit:
25+
ref: _linux-config-expectations
26+
file: extracts-linux-config-expectations.yaml
27+
...

source/includes/options-conf.yaml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ post: |
140140
If :setting:`systemLog.component.storage.journal.verbosity` is unset,
141141
:setting:`systemLog.component.storage.verbosity` level also applies to
142142
journaling components.
143-
143+
144144
.. include:: /includes/log-verbosity-levels.rst
145145
---
146146
program: conf
@@ -221,6 +221,8 @@ inherit:
221221
program: mongod
222222
name: logpath
223223
file: options-mongod.yaml
224+
post: |
225+
.. include:: /includes/extracts/linux-config-expectations-systemlog-path.rst
224226
---
225227
program: conf
226228
name: systemLog.logAppend
@@ -243,7 +245,7 @@ description: |
243245
The destination to which MongoDB sends all log output. Specify either
244246
``file`` or ``syslog``. If you specify ``file``, you must also specify
245247
:setting:`systemLog.path`.
246-
248+
247249
If you do not specify :setting:`systemLog.destination`, MongoDB sends
248250
all log output to standard output.
249251
---
@@ -294,6 +296,8 @@ inherit:
294296
name: fork
295297
program: mongod
296298
file: options-mongod.yaml
299+
post: |
300+
.. include:: /includes/extracts/linux-config-expectations-processmanagement-fork.rst
297301
---
298302
program: conf
299303
name: processManagement.windowsService.serviceName
@@ -446,21 +450,21 @@ inherit:
446450
file: options-mongod.yaml
447451
post: |
448452
When {{role}} is ``true``, {{program}} listens on the UNIX socket.
449-
453+
450454
The {{program}} process always listens on the UNIX socket unless
451455
one of the following is true:
452-
456+
453457
- {{role}} is ``false``
454-
458+
455459
- :option:`--nounixsocket` is set. The command
456460
line option takes precedence over the configuration file setting.
457-
461+
458462
- :setting:`net.bindIp` is not set
459-
463+
460464
- :setting:`net.bindIp` does not specify ``127.0.0.1``
461-
465+
462466
.. |mongodb-package| replace:: {{program}}
463-
467+
464468
.. include:: /includes/note-deb-and-rpm-default-to-localhost.rst
465469
---
466470
program: conf
@@ -827,7 +831,7 @@ description: |
827831
.. versionadded:: 2.6
828832
829833
Enable or disable localhost authentication bypass.
830-
834+
831835
Specify ``0`` to disable localhost authentication bypass.
832836
post: |
833837
The {{role}} setting is available only for :program:`mongod`.
@@ -839,8 +843,8 @@ type: string
839843
directive: setting
840844
description: |
841845
Enable or disable backwards compatibility with the MongoDB 2.2 access control
842-
roles.
843-
846+
roles.
847+
844848
To disable backwards compatibility, set {{role}} to ``0``. In
845849
general, you should set this option if your deployment does not need to
846850
support legacy user documents. Typically legacy user documents are only
@@ -957,6 +961,8 @@ inherit:
957961
file: options-mongod.yaml
958962
post: |
959963
The {{role}} setting is available only for :program:`mongod`.
964+
965+
.. include:: /includes/extracts/linux-config-expectations-storage-dbpath.rst
960966
---
961967
program: conf
962968
name: storage.directoryPerDB
@@ -1164,7 +1170,7 @@ inherit:
11641170
description: |
11651171
The name of the replica set that the {{program}} is part of. All hosts
11661172
in the replica set must have the same set name.
1167-
1173+
11681174
.. include:: /includes/fact-unique-replica-set-names.rst
11691175
post: |
11701176
The {{role}} setting is available only for :program:`mongod`.
@@ -1239,7 +1245,7 @@ inherit:
12391245
file: options-mongod.yaml
12401246
pre: |
12411247
.. versionadded:: 2.6
1242-
1248+
12431249
When set, {{role}} enables :doc:`auditing </core/auditing>` and
12441250
specifies where {{program}} sends all audit events.
12451251
---
@@ -1332,8 +1338,8 @@ description: |
13321338
Enables or disables the automatic splitting of chunks for
13331339
:term:`sharded collections <sharding>`. If {{role}} is ``false`` on
13341340
all {{program}} instances, MongoDB does not create new chunks as the
1335-
data in a collection grows.
1336-
1341+
data in a collection grows.
1342+
13371343
Because any {{program}} in a cluster can create a split,
13381344
to totally disable splitting in a cluster, you must set {{role}}
13391345
to ``false`` on all {{program}}.
@@ -1497,8 +1503,8 @@ description: |
14971503
specified hostname.
14981504
14991505
.. include:: /includes/fact-ssl-supported.rst
1500-
1506+
15011507
replacement:
15021508
program: ":program:`mongod`"
15031509
optional: true
1504-
...
1510+
...

source/includes/options-mongod.yaml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,18 @@ description: |
130130
standard output or to the host's :term:`syslog` system. MongoDB creates
131131
the log file at the path you specify.
132132
133-
By default, MongoDB overwrites the log file when the process restarts.
134-
To instead append to the log file, set the :option:`--logappend` option.
133+
By default, MongoDB will move any existing log file rather than overwrite
134+
it. To instead append to the log file, set the :option:`--logappend` option.
135135
optional: true
136136
---
137137
program: mongod
138138
name: logappend
139139
args: null
140140
directive: option
141141
description: |
142-
{{intro}} new entries to the end of the log file rather than overwriting
143-
the content of the log when the {{program}} instance restarts.
142+
{{intro}} new entries to the end of the existing log file when the {{program}}
143+
instance restarts. Without this option, :program:`mongod` will back up the
144+
existing log and create a new file.
144145
optional: true
145146
replacement:
146147
intro: "Appends"
@@ -289,7 +290,7 @@ directive: option
289290
description: |
290291
The path for the UNIX socket. {{role}} applies only
291292
to Unix-based systems.
292-
293+
293294
If this option has no value, the
294295
{{program}} process creates a socket with ``/tmp`` as a prefix. MongoDB
295296
creates and listens on a UNIX socket unless one of the following is true:
@@ -906,8 +907,8 @@ default: 60
906907
directive: option
907908
description: |
908909
{{intro}} can pass before MongoDB flushes data to the data
909-
files via an :term:`fsync` operation.
910-
910+
files via an :term:`fsync` operation.
911+
911912
**Do not set this value on
912913
production systems.** In almost every situation, you should use the
913914
default setting.
@@ -1041,8 +1042,8 @@ description: |
10411042
{{intro}} :term:`secondary` members of a :term:`replica
10421043
set` load into memory before applying operations from the oplog. By
10431044
default secondaries load all indexes related to an operation into memory
1044-
before applying operations from the oplog.
1045-
1045+
before applying operations from the oplog.
1046+
10461047
Set this {{directive}} to one of the following:
10471048
10481049
.. list-table::
@@ -1350,8 +1351,8 @@ description: |
13501351
.. versionadded:: 2.6
13511352
13521353
{{verb}} the validation checks for TLS/SSL certificates on other servers
1353-
in the cluster and allows the use of invalid certificates.
1354-
1354+
in the cluster and allows the use of invalid certificates.
1355+
13551356
When using
13561357
the {{role}} setting, MongoDB
13571358
logs a warning regarding the use of the invalid certificate.
@@ -1760,9 +1761,9 @@ default: "true"
17601761
description: |
17611762
17621763
.. versionadded:: 3.0.0
1763-
1764+
17641765
Enables or disables :term:`prefix compression` for index data.
1765-
1766+
17661767
Specify ``true`` for {{role}} to enable :term:`prefix compression` for
17671768
index data, or ``false`` to disable prefix compression for index data.
17681769

source/reference/configuration-options.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,20 @@ File Format
3838
.. versionchanged:: 2.6
3939

4040
MongoDB configuration files use the `YAML <http://www.yaml.org>`_ format
41-
[#yaml-json]_.
42-
The following example configuration file contains several
41+
[#yaml-json]_. The following sample configuration file contains several
4342
:program:`mongod` settings:
4443

4544
.. note::
4645

4746
YAML does not accept tabs; use spaces instead.
4847

48+
Do not use this example without modifying it for your installation.
49+
4950
.. code-block:: yaml
5051

5152
systemLog:
5253
destination: file
53-
path: "/var/log/mongodb/mongodb.log"
54+
path: "/var/log/mongodb/mongod.log"
5455
logAppend: true
5556
storage:
5657
journal:
@@ -64,6 +65,11 @@ The following example configuration file contains several
6465
enableLocalhostAuthBypass: false
6566
...
6667

68+
The Linux package init scripts included in the official MongoDB packages depend
69+
on specific values for :setting:`systemLog.path`, :setting:`storage.dbpath`, and
70+
:setting:`processManagement.fork`. If you modify these settings in the default
71+
configuration file, :program:`mongod` may not start.
72+
6773
.. [#yaml-json] YAML is a superset of :term:`JSON`.
6874

6975
Use the Configuration File

0 commit comments

Comments
 (0)