Skip to content

Commit 6a8dc81

Browse files
test: Disable memory mapping (#11)
1 parent 9c5759c commit 6a8dc81

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

rust/operator-binary/src/controller.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ pub enum Error {
7777
#[snafu(display("failed to deserialize cluster definition"))]
7878
DeserializeClusterDefinition {
7979
// boxed because otherwise Clippy warns about a large enum variant
80+
#[snafu(source(from(
81+
stackable_operator::kube::core::error_boundary::InvalidObject,
82+
Box::new
83+
)))]
8084
source: Box<stackable_operator::kube::core::error_boundary::InvalidObject>,
8185
},
8286

@@ -232,7 +236,6 @@ pub async fn reconcile(
232236
.0
233237
.as_ref()
234238
.map_err(stackable_operator::kube::core::error_boundary::InvalidObject::clone)
235-
.map_err(Box::new)
236239
.context(DeserializeClusterDefinitionSnafu)?;
237240

238241
// dereference (client required)

tests/templates/kuttl/smoke/10-assert.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,17 @@ metadata:
340340
app.kubernetes.io/version: 3.0.0
341341
stackable.tech/vendor: Stackable
342342
name: opensearch-nodes-cluster-manager
343+
ownerReferences:
344+
- apiVersion: opensearch.stackable.tech/v1alpha1
345+
controller: true
346+
kind: OpenSearchCluster
347+
name: opensearch
343348
data:
344349
opensearch.yml: |-
345350
cluster.name: "opensearch"
346351
discovery.type: "zen"
347352
network.host: "0.0.0.0"
353+
node.store.allow_mmap: "false"
348354
plugins.security.allow_default_init_securityindex: "true"
349355
plugins.security.nodes_dn: ["CN=generated certificate for pod"]
350356
plugins.security.ssl.http.enabled: "true"
@@ -368,11 +374,17 @@ metadata:
368374
app.kubernetes.io/version: 3.0.0
369375
stackable.tech/vendor: Stackable
370376
name: opensearch-nodes-data
377+
ownerReferences:
378+
- apiVersion: opensearch.stackable.tech/v1alpha1
379+
controller: true
380+
kind: OpenSearchCluster
381+
name: opensearch
371382
data:
372383
opensearch.yml: |-
373384
cluster.name: "opensearch"
374385
discovery.type: "zen"
375386
network.host: "0.0.0.0"
387+
node.store.allow_mmap: "false"
376388
plugins.security.allow_default_init_securityindex: "true"
377389
plugins.security.nodes_dn: ["CN=generated certificate for pod"]
378390
plugins.security.ssl.http.enabled: "true"

tests/templates/kuttl/smoke/10-install-opensearch.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ spec:
5353
configOverrides:
5454
# TODO Add the required options to the operator
5555
opensearch.yml:
56+
# Disable memory mapping in this test; If memory mapping were activated, the kernel setting
57+
# vm.max_map_count would have to be increased to 262144 on the node.
58+
node.store.allow_mmap: "false"
5659
# TODO Check that this is safe despite the warning in the documentation
5760
plugins.security.allow_default_init_securityindex: "true"
5861
plugins.security.ssl.transport.enabled: "true"

0 commit comments

Comments
 (0)