Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.
:ghost: Brief Description
According to MongoDB documentation for journaling, starting in version 6.1 the storage.journal.enabled option has been removed. When running the cookbook, it adds the storage.journal.enabled = true to the /etc/mongod.conf file and consequently, the mongod.service fails to start because storage.journal.enabled is an invalid argument.
:pancakes: Cookbook version
sc-mongodb (5.1.23)
:woman_cook: Chef-Infra Version
version 16.17.51
:tophat: Platform details
Ubuntu 20.04.6 LTS
Steps To Reproduce
Steps to reproduce the behavior:
Ran cinc-client and here is the output
Recipe: sc-mongodb::default* template[/etc/default/mongodb] action create (up to date)* template[/etc/mongod.conf] action create- update content in file /etc/mongod.conf from 9bdb8b to 76b393--- /etc/mongod.conf 2024-10-25 15:00:00.807304479 +0000+++ /etc/.chef-mongod20241104-417455-g48drr.conf 2024-11-04 22:10:06.311581922 +0000@@ -14,6 +14,8 @@fork: falsepidFilePath: "/var/run/mongodb/mongod.pid"storage:+ journal:+ enabled: truedbPath: "/mongo"engine: wiredTigerreplication:
And this is the output from systemctl status mongod.service
Nov 04 22:10:23 mongo-instance mongod[420180]: Unrecognized option: storage.journal.enabled
Nov 04 22:10:23 mongo-instance mongod[420180]: try '/usr/bin/mongod --help' for more information
Nov 04 22:10:23 mongo-instance systemd[1]: mongod.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
:police_car: Expected behavior
The storage.journal.enabled should not be included in the /etc/mongod.conf file for mongodb versions >= 6.1 and mongod.service should be started without errors.
:heavy_plus_sign: Additional context
Add any other context about the problem here. e.g. related issues or existing pull requests.
We’re facing the same issue. While a workaround is possible (albeit with some extra effort), it would be much better to address this error directly in the original cookbook.
:speaking_head: Foreword
Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.
:ghost: Brief Description
According to MongoDB documentation for journaling, starting in version 6.1 the
storage.journal.enabled
option has been removed. When running the cookbook, it adds thestorage.journal.enabled = true
to the/etc/mongod.conf
file and consequently, the mongod.service fails to start becausestorage.journal.enabled
is an invalid argument.:pancakes: Cookbook version
sc-mongodb (5.1.23)
:woman_cook: Chef-Infra Version
version 16.17.51
:tophat: Platform details
Ubuntu 20.04.6 LTS
Steps To Reproduce
Steps to reproduce the behavior:
Ran cinc-client and here is the output
Recipe: sc-mongodb::default
* template[/etc/default/mongodb] action create (up to date)
* template[/etc/mongod.conf] action create
- update content in file /etc/mongod.conf from 9bdb8b to 76b393
--- /etc/mongod.conf 2024-10-25 15:00:00.807304479 +0000
+++ /etc/.chef-mongod20241104-417455-g48drr.conf 2024-11-04 22:10:06.311581922 +0000
@@ -14,6 +14,8 @@
fork: false
pidFilePath: "/var/run/mongodb/mongod.pid"
storage:
+ journal:
+ enabled: true
dbPath: "/mongo"
engine: wiredTiger
replication:
And this is the output from
systemctl status mongod.service
Nov 04 22:10:23 mongo-instance mongod[420180]: Unrecognized option: storage.journal.enabled Nov 04 22:10:23 mongo-instance mongod[420180]: try '/usr/bin/mongod --help' for more information Nov 04 22:10:23 mongo-instance systemd[1]: mongod.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
:police_car: Expected behavior
The
storage.journal.enabled
should not be included in the/etc/mongod.conf
file for mongodb versions >= 6.1 and mongod.service should be started without errors.:heavy_plus_sign: Additional context
Add any other context about the problem here. e.g. related issues or existing pull requests.