Skip to content

Commit 8ff1300

Browse files
Enforce DB 7.0 and remove 5.0 references (#23578)
* enforce DB 7.0 and remove 5.0 references * bump mongo version for datanode * add links to Mongo upgrade docs * more upgrade guidance --------- Co-authored-by: Anton Ebel <[email protected]>
1 parent d6d7dff commit 8ff1300

File tree

9 files changed

+23
-34
lines changed

9 files changed

+23
-34
lines changed

UPGRADING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ Graylog now requires Java 21 to run. Earlier versions are no longer supported.
1010
Our operating system packages and container images are shipping with the
1111
correct Java version.
1212

13+
### Mongo DB 7.0
14+
15+
Graylog now requires at least Mongo DB version 7.0. Earlier versions are no longer supported.
16+
17+
In general, MongoDB upgrades must be done from one minor release to the next, going to the latest bug fix version
18+
in that release. Please refer to the Mongo DB upgrade documentation for details:
19+
- [Upgrade tutorial](https://www.mongodb.com/docs/manual/tutorial/upgrade-revision/#std-label-upgrade-to-latest-revision/)
20+
- [6.0](https://www.mongodb.com/docs/manual/release-notes/6.0-upgrade/)
21+
- [7.0](https://www.mongodb.com/docs/manual/release-notes/7.0-upgrade/)
22+
- [8.0](https://www.mongodb.com/docs/manual/release-notes/8.0-upgrade/)
23+
1324
### Kafka Inputs
1425

1526
The `kafka-clients` library was updated to 4.x which removes support for Kafka
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type = "c"
2+
message = "Minimum required version of MongoDB is now raised to 7.0."
3+
4+
issues = ["23448"]
5+
pulls = [""]

data-node/migration/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ version: "3.8"
88
services:
99
mongodb:
1010
hostname: "mongodb"
11-
image: "mongo:5.0"
11+
image: "mongo:7.0"
1212
ports:
1313
- "27017:27017"
1414
volumes:

data-node/migration/es710-docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ version: "3.8"
88
services:
99
mongodb:
1010
hostname: "mongodb"
11-
image: "mongo:5.0"
11+
image: "mongo:7.0"
1212
ports:
1313
- "27017:27017"
1414
volumes:

graylog2-server/src/main/java/org/graylog2/database/MongoDBVersionCheck.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
public class MongoDBVersionCheck {
3434
private static final Logger LOG = LoggerFactory.getLogger(MongoDBVersionCheck.class);
35-
private static final Version MINIMUM_MONGODB_VERSION = Version.of(5, 0);
35+
private static final Version MINIMUM_MONGODB_VERSION = Version.of(7, 0);
3636

3737
public static Version getVersion(MongoClient mongoClient) {
3838
final MongoDatabase adminDb = mongoClient.getDatabase("admin");

graylog2-server/src/test/java/org/graylog/testing/containermatrix/MongodbServer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717
package org.graylog.testing.containermatrix;
1818

1919
public enum MongodbServer {
20-
MONGO5("5.0"),
2120
MONGO7("7.0");
2221

23-
public static final MongodbServer DEFAULT_VERSION = MONGO5;
22+
public static final MongodbServer DEFAULT_VERSION = MONGO7;
2423

2524
private final String version;
2625

graylog2-server/src/test/java/org/graylog/testing/containermatrix/annotations/ContainerMatrixTestsConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
* matrix rule
7575
* If no version is explicitly specified, then {@link MongodbServer#DEFAULT_VERSION will be used by the tests}
7676
*/
77-
MongodbServer[] mongoVersions() default {MongodbServer.MONGO5};
77+
MongodbServer[] mongoVersions() default {MongodbServer.MONGO7};
7878

7979
// are run after the initialization of mongoDb, gets concatenated for all tests below the above rules
8080
String[] mongoDBFixtures() default {};

graylog2-server/src/test/java/org/graylog2/cluster/lock/MongoLockServiceTest5.java

Lines changed: 0 additions & 26 deletions
This file was deleted.

graylog2-server/src/test/java/org/junit/jupiter/engine/descriptor/ContainerMatrixTestsDescriptorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ContainerMatrixTestsDescriptorTest {
3030

3131
@Test
3232
void createKey() {
33-
final String key = ContainerMatrixTestsDescriptor.createKey(Lifecycle.CLASS, "mavenDir", "jarDir", SearchVersion.create(SearchVersion.Distribution.OPENSEARCH, Version.valueOf("1.2.3")), MongodbServer.MONGO5, true, true, Map.of("p1", "v1"), List.of(), "datanodeJarDir");
34-
Assertions.assertThat(key).isEqualTo("Lifecycle: CLASS, MavenProjectDirProvider: mavenDir, PluginJarsProvider: jarDir, Search: OpenSearch:1.2.3, MongoDB: 5.0, DatanodePluginJarsProvider: datanodeJarDir, Mailserver: enabled, Webhookserver: enabled, p1: v1");
33+
final String key = ContainerMatrixTestsDescriptor.createKey(Lifecycle.CLASS, "mavenDir", "jarDir", SearchVersion.create(SearchVersion.Distribution.OPENSEARCH, Version.valueOf("1.2.3")), MongodbServer.MONGO7, true, true, Map.of("p1", "v1"), List.of(), "datanodeJarDir");
34+
Assertions.assertThat(key).isEqualTo("Lifecycle: CLASS, MavenProjectDirProvider: mavenDir, PluginJarsProvider: jarDir, Search: OpenSearch:1.2.3, MongoDB: 7.0, DatanodePluginJarsProvider: datanodeJarDir, Mailserver: enabled, Webhookserver: enabled, p1: v1");
3535
}
3636
}

0 commit comments

Comments
 (0)