From c47388ac75bc68a20e0f96e6e797c9937586e7b5 Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Thu, 17 Jul 2025 12:38:58 +0200 Subject: [PATCH] test: Disable memory mapping --- rust/operator-binary/src/controller.rs | 5 ++++- tests/templates/kuttl/smoke/10-assert.yaml | 12 ++++++++++++ .../templates/kuttl/smoke/10-install-opensearch.yaml | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index 65da68f..6b092b1 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -77,6 +77,10 @@ pub enum Error { #[snafu(display("failed to deserialize cluster definition"))] DeserializeClusterDefinition { // boxed because otherwise Clippy warns about a large enum variant + #[snafu(source(from( + stackable_operator::kube::core::error_boundary::InvalidObject, + Box::new + )))] source: Box, }, @@ -232,7 +236,6 @@ pub async fn reconcile( .0 .as_ref() .map_err(stackable_operator::kube::core::error_boundary::InvalidObject::clone) - .map_err(Box::new) .context(DeserializeClusterDefinitionSnafu)?; // dereference (client required) diff --git a/tests/templates/kuttl/smoke/10-assert.yaml b/tests/templates/kuttl/smoke/10-assert.yaml index eb06201..99038c7 100644 --- a/tests/templates/kuttl/smoke/10-assert.yaml +++ b/tests/templates/kuttl/smoke/10-assert.yaml @@ -340,11 +340,17 @@ metadata: app.kubernetes.io/version: 3.0.0 stackable.tech/vendor: Stackable name: opensearch-nodes-cluster-manager + ownerReferences: + - apiVersion: opensearch.stackable.tech/v1alpha1 + controller: true + kind: OpenSearchCluster + name: opensearch data: opensearch.yml: |- cluster.name: "opensearch" discovery.type: "zen" network.host: "0.0.0.0" + node.store.allow_mmap: "false" plugins.security.allow_default_init_securityindex: "true" plugins.security.nodes_dn: ["CN=generated certificate for pod"] plugins.security.ssl.http.enabled: "true" @@ -368,11 +374,17 @@ metadata: app.kubernetes.io/version: 3.0.0 stackable.tech/vendor: Stackable name: opensearch-nodes-data + ownerReferences: + - apiVersion: opensearch.stackable.tech/v1alpha1 + controller: true + kind: OpenSearchCluster + name: opensearch data: opensearch.yml: |- cluster.name: "opensearch" discovery.type: "zen" network.host: "0.0.0.0" + node.store.allow_mmap: "false" plugins.security.allow_default_init_securityindex: "true" plugins.security.nodes_dn: ["CN=generated certificate for pod"] plugins.security.ssl.http.enabled: "true" diff --git a/tests/templates/kuttl/smoke/10-install-opensearch.yaml b/tests/templates/kuttl/smoke/10-install-opensearch.yaml index 9d68547..d390b29 100644 --- a/tests/templates/kuttl/smoke/10-install-opensearch.yaml +++ b/tests/templates/kuttl/smoke/10-install-opensearch.yaml @@ -53,6 +53,9 @@ spec: configOverrides: # TODO Add the required options to the operator opensearch.yml: + # Disable memory mapping in this test; If memory mapping were activated, the kernel setting + # vm.max_map_count would have to be increased to 262144 on the node. + node.store.allow_mmap: "false" # TODO Check that this is safe despite the warning in the documentation plugins.security.allow_default_init_securityindex: "true" plugins.security.ssl.transport.enabled: "true"