Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically mount secret or config map on Powermax observability #883

Merged

Conversation

falfaroc
Copy link
Contributor

@falfaroc falfaroc commented Jan 30, 2025

Description

Dynamically add and mount the config map or secret depending on which approach is defined during the Powermax CR installation.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1614

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility
  • I have executed the relevant end-to-end test scenarios

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Install with Mount Credentials Enabled
   karavi-metrics-powermax:
...
      X_CSI_REVPROXY_SECRET_FILEPATH:  /etc/powermax/config
      X_CSI_REVPROXY_USE_SECRET:       true
      X_CSI_POWERMAX_CONFIG_PATH:      /powermax-config-params/driver-config-params.yaml
    Mounts:
      /certs from certs (rw)
      /etc/config from karavi-metrics-powermax-configmap (rw)
      /etc/powermax from powermax-reverseproxy-secret (rw)
      /etc/ssl/certs from tls-secret (ro)
      powermax-config-params from powermax-config-params (rw)
  Volumes:
...
   powermax-config-params:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      powermax-config-params
    Optional:  false
   powermax-reverseproxy-secret:
    Type:          Secret (a volume populated by a Secret)
    SecretName:    powermax-config
    Optional:      false
  • Add unit tests for Powermax Observability using mount credentials.
PASS
coverage: 90.3% of statements
ok      github.com/dell/csm-operator/pkg/modules        0.885s  coverage: 90.3% of statements
  • Add and run new PowerMax Observability using mount credentials E2E tests.
-> # bash run-e2e-test.sh --pmax
/root/git/public/dell/csm-operator/tests/e2e
  W0131 16:24:12.979634    4483 test_context.go:541] Unable to find in-cluster config, using default host : https://127.0.0.1:6443
  I0131 16:24:12.980080 4483 test_context.go:564] The --provider flag is not set. Continuing as if --provider=skeleton had been used.
Running Suite: CSM Operator End-to-End Tests - /root/git/public/dell/csm-operator/tests/e2e
===========================================================================================
Random Seed: 1738340629

Will run 1 of 1 specs
------------------------------
[BeforeSuite]
/root/git/public/dell/csm-operator/tests/e2e/e2e_test.go:98
  STEP: Getting test environment variables @ 01/31/25 16:24:12.98
  STEP: [powermax] @ 01/31/25 16:24:12.983
  STEP: Reading values file @ 01/31/25 16:24:12.983
  STEP: Getting a k8s client @ 01/31/25 16:24:12.986
[BeforeSuite] PASSED [0.009 seconds]
------------------------------
[run-e2e-test] E2E Testing Running all test Given Test Scenarios
/root/git/public/dell/csm-operator/tests/e2e/e2e_test.go:139
  STEP: Starting: Install PowerMax Driver with Mount Credentials, Enable Observability  @ 01/31/25 16:24:12.989
  STEP: Returning false here @ 01/31/25 16:24:12.989
  STEP:      Executing  Given an environment with k8s or openshift, and CSM operator installed @ 01/31/25 16:24:12.989
  STEP:      Executing  Create storageclass with name [op-e2e-pmax] and template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax] @ 01/31/25 16:24:13.004
  STEP:      Executing  Set up reverse proxy tls secret namespace [powermax] @ 01/31/25 16:24:14.34
revproxy-certs secret already exists, skipping creation.
csirevproxy-tls-secret already exists, skipping creation.
  STEP:      Executing  Set up secret with template [testfiles/powermax-templates/powermax-use-secret-template.yaml] name [powermax-config] in namespace [powermax] for [pmaxUseSecret] @ 01/31/25 16:24:14.772
  STEP:      Executing  Set up creds with template [testfiles/powermax-templates/powermax-array-config.yaml] for [pmaxArrayConfig] @ 01/31/25 16:24:15.753
  STEP:      Executing  Apply custom resource [1] @ 01/31/25 16:24:17.255
  I0131 16:24:17.257542 4483 builder.go:121] Running '/usr/bin/kubectl --namespace=powermax apply --validate=true -f -'
  I0131 16:24:17.924032 4483 builder.go:146] stderr: ""
  I0131 16:24:17.924113 4483 builder.go:147] stdout: "containerstoragemodule.storage.dell.com/powermax created\n"
  STEP:      Executing  Validate custom resource [1] @ 01/31/25 16:24:17.924

err: expected custom resource status to be Succeeded. Got: Failed
  STEP:      Executing  Validate [powermax] driver from CR [1] is installed @ 01/31/25 16:25:07.961
  STEP:      Executing  Validate [observability] module from CR [1] is not installed @ 01/31/25 16:25:27.971
  STEP:      Executing  Enable [observability] module from CR [1] @ 01/31/25 16:25:37.98
  STEP:      Executing  Validate [powermax] driver from CR [1] is installed @ 01/31/25 16:25:52.997
  STEP:      Executing  Validate [observability] module from CR [1] is installed @ 01/31/25 16:26:13.001
  STEP:      Executing  Run custom test @ 01/31/25 16:26:23.037
  I0131 16:26:23.037798 4483 util.go:650] Running cert-csi [test vio --sc op-e2e-pmax --chainLength 1 --chainNumber 1]
[2025-01-31 16:26:23]  INFO Starting cert-csi; ver. 1.4.1
[2025-01-31 16:26:23]  INFO Using EVENT observer type
[2025-01-31 16:26:23]  INFO Using config from /root/.kube/config
[2025-01-31 16:26:23]  INFO Successfully loaded config. Host: https://10.247.142.130:6443
[2025-01-31 16:26:23]  INFO Created new KubeClient
[2025-01-31 16:26:23]  INFO Running 1 iteration(s)
[2025-01-31 16:26:23]  INFO     *** ITERATION NUMBER 1 ***
[2025-01-31 16:26:23]  INFO Starting VolumeIoSuite with op-e2e-pmax storage class
[2025-01-31 16:26:23]  INFO Successfully created namespace volumeio-test-a091f942
[2025-01-31 16:26:23]  INFO Using default number of volumes
[2025-01-31 16:26:23]  INFO Using default image: docker.io/centos:latest
[2025-01-31 16:26:23]  INFO Creating IO pod
[2025-01-31 16:26:23]  INFO Waiting for pod iowriter-test-89f9b to be READY
[2025-01-31 16:26:51]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-0.data]
[2025-01-31 16:26:54]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-0.data > /data0/writer-0.sha512]
[2025-01-31 16:27:04]  INFO Waiting until no Volume Attachments with PV  left
[2025-01-31 16:27:04]  INFO VolumeAttachment deleted
[2025-01-31 16:27:04]  INFO Deleting all resources in namespace volumeio-test-a091f942
[2025-01-31 16:27:16]  INFO Namespace volumeio-test-a091f942 was deleted in 12.011682431s
[2025-01-31 16:27:18]  INFO SUCCESS: VolumeIoSuite in 55.073234281s
[2025-01-31 16:27:18]  INFO Started generating reports...
Collecting metrics
1 / 1 [----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/s[2025-01-31 16:27:18]  INFO Started generating reports...
Collecting metrics
1 / 1 [----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/sGenerating plots
1 / 1 [--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->] 100.00% ? p/s1 / 1 [--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 217 p/s[2025-01-31 16:27:18]  WARN No ResourceUsageMetrics provided
[2025-01-31 16:27:18] ERROR no ResourceUsageMetrics provided
report-test-run-4c871c2a:
Name: test-run-4c871c2a
Host: https://10.247.142.130:6443
StorageClass: op-e2e-pmax
Minimum and Maximum EntityOverTime charts:

/root/.cert-csi/reports/test-run-4c871c2a/PodsCreatingOverTime.png

/root/.cert-csi/reports/test-run-4c871c2a/PodsReadyOverTime.png

/root/.cert-csi/reports/test-run-4c871c2a/PodsTerminatingOverTime.png

/root/.cert-csi/reports/test-run-4c871c2a/PvcsCreatingOverTime.png

/root/.cert-csi/reports/test-run-4c871c2a/PvcsBoundOverTime.png

Tests:
--------------------------------------------------------------
1. TestCase: VolumeIoSuite
            Started:   2025-01-31 16:26:23.381689676 +0000 UTC
            Ended:     2025-01-31 16:27:18.455663641 +0000 UTC
            Result:    SUCCESS

            Stage metrics:
                    PVCAttachment:
                        Avg: 5.122314719s
                        Min: 5.122314719s
                        Max: 5.122314719s
                        Histogram:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PVCAttachment.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PVCAttachment_boxplot.png
                    PVCBind:
                        Avg: 2.356683546s
                        Min: 2.356683546s
                        Max: 2.356683546s
                        Histogram:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PVCBind.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PVCBind_boxplot.png
                    PVCCreation:
                        Avg: 8.181929219s
                        Min: 8.181929219s
                        Max: 8.181929219s
                        Histogram:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PVCCreation.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PVCCreation_boxplot.png
                    PVCDeletion:
                        Avg: 7.547235ms
                        Min: 7.547235ms
                        Max: 7.547235ms
                        Histogram:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PVCDeletion.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PVCDeletion_boxplot.png
                    PVCUnattachment:
                        Avg: 1.695308226s
                        Min: 1.695308226s
                        Max: 1.695308226s
                        Histogram:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PVCUnattachment.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PVCUnattachment_boxplot.png
                    PodCreation:
                        Avg: 27.56987566s
                        Min: 27.56987566s
                        Max: 27.56987566s
                        Histogram:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PodCreation.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PodCreation_boxplot.png
                    PodDeletion:
                        Avg: 6.568413763s
                        Min: 6.568413763s
                        Max: 6.568413763s
                        Histogram:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PodDeletion.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/PodDeletion_boxplot.png
                        EntityNumberOverTime:
        /root/.cert-csi/reports/test-run-4c871c2a/VolumeIoSuite28/EntityNumberOverTime.png

[2025-01-31 16:27:18]  INFO Avg time of a run:   41.50s
[2025-01-31 16:27:18]  INFO Avg time of a del:   12.01s
[2025-01-31 16:27:18]  INFO Avg time of all:     55.07s
[2025-01-31 16:27:18]  INFO During this run 100.0% of suites succeeded
  STEP:      Executing  Enable forceRemoveDriver on CR [1] @ 01/31/25 16:27:18.971
  STEP:      Executing  Delete custom resource [1] @ 01/31/25 16:27:18.988
  STEP:      Executing  Validate [powermax] driver from CR [1] is not installed @ 01/31/25 16:27:19.005

err: found the following pods: csipowermax-reverseproxy-5bfd48dc89-bxdkr,
  STEP:      Executing  Restore template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax] @ 01/31/25 16:28:09.035
  STEP:      Executing  Restore template [testfiles/powermax-templates/powermax-use-secret-template.yaml] for [pmaxUseSecret] @ 01/31/25 16:28:09.082
  STEP:      Executing  Restore template [testfiles/powermax-templates/powermax-array-config.yaml] for [pmaxArrayConfig] @ 01/31/25 16:28:09.144
  STEP: Ending: Install PowerMax Driver with Mount Credentials, Enable Observability
   @ 01/31/25 16:28:09.212
• [241.227 seconds]
------------------------------

Ran 1 of 1 Specs in 241.236 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

Ginkgo ran 1 suite in 4m24.6714596s
Test Suite Passed
root@lglbv2165 [16:28:14] [~/git/public/dell/csm-operator/tests/e2e] [usr/falfaroc/powermax-obs-secret-mount *]
-> # bash run-e2e-test.sh --pmax
/root/git/public/dell/csm-operator/tests/e2e
  W0131 16:30:59.905907    8775 test_context.go:541] Unable to find in-cluster config, using default host : https://127.0.0.1:6443
  I0131 16:30:59.906136 8775 test_context.go:564] The --provider flag is not set. Continuing as if --provider=skeleton had been used.
Running Suite: CSM Operator End-to-End Tests - /root/git/public/dell/csm-operator/tests/e2e
===========================================================================================
Random Seed: 1738341044

Will run 1 of 1 specs
------------------------------
[BeforeSuite]
/root/git/public/dell/csm-operator/tests/e2e/e2e_test.go:98
  STEP: Getting test environment variables @ 01/31/25 16:30:59.908
  STEP: [powermax] @ 01/31/25 16:30:59.908
  STEP: Reading values file @ 01/31/25 16:30:59.908
  STEP: Getting a k8s client @ 01/31/25 16:30:59.911
[BeforeSuite] PASSED [0.006 seconds]
------------------------------
[run-e2e-test] E2E Testing Running all test Given Test Scenarios
/root/git/public/dell/csm-operator/tests/e2e/e2e_test.go:139
  STEP: Starting: Install PowerMax Driver with Mount Credentials (Sidecar), Enable Observability  @ 01/31/25 16:30:59.914
  STEP: Returning false here @ 01/31/25 16:30:59.914
  STEP:      Executing  Given an environment with k8s or openshift, and CSM operator installed @ 01/31/25 16:30:59.914
  STEP:      Executing  Create storageclass with name [op-e2e-pmax] and template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax] @ 01/31/25 16:30:59.928
  STEP:      Executing  Set up reverse proxy tls secret namespace [powermax] @ 01/31/25 16:31:01.166
revproxy-certs secret already exists, skipping creation.
csirevproxy-tls-secret already exists, skipping creation.
  STEP:      Executing  Set up secret with template [testfiles/powermax-templates/powermax-use-secret-template.yaml] name [powermax-config] in namespace [powermax] for [pmaxUseSecret] @ 01/31/25 16:31:01.72
  STEP:      Executing  Set up creds with template [testfiles/powermax-templates/powermax-array-config.yaml] for [pmaxArrayConfig] @ 01/31/25 16:31:02.572
  STEP:      Executing  Apply custom resource [1] @ 01/31/25 16:31:03.579
  I0131 16:31:03.580210 8775 builder.go:121] Running '/usr/bin/kubectl --namespace=powermax apply --validate=true -f -'
  I0131 16:31:04.135170 8775 builder.go:146] stderr: ""
  I0131 16:31:04.135235 8775 builder.go:147] stdout: "containerstoragemodule.storage.dell.com/powermax created\n"
  STEP:      Executing  Validate custom resource [1] @ 01/31/25 16:31:04.135

err: expected custom resource status to be Succeeded. Got: Failed

err: expected custom resource status to be Succeeded. Got: Failed
  STEP:      Executing  Validate [powermax] driver from CR [1] is installed @ 01/31/25 16:32:24.205
  STEP:      Executing  Validate [observability] module from CR [1] is not installed @ 01/31/25 16:32:44.228
  STEP:      Executing  Enable [observability] module from CR [1] @ 01/31/25 16:32:54.238
  STEP:      Executing  Validate [powermax] driver from CR [1] is installed @ 01/31/25 16:33:09.255
  STEP:      Executing  Validate [observability] module from CR [1] is installed @ 01/31/25 16:33:29.265
  STEP:      Executing  Run custom test @ 01/31/25 16:33:39.289
  I0131 16:33:39.290044 8775 util.go:650] Running cert-csi [test vio --sc op-e2e-pmax --chainLength 1 --chainNumber 1]
[2025-01-31 16:33:39]  INFO Starting cert-csi; ver. 1.4.1
[2025-01-31 16:33:39]  INFO Using EVENT observer type
[2025-01-31 16:33:39]  INFO Using config from /root/.kube/config
[2025-01-31 16:33:39]  INFO Successfully loaded config. Host: https://10.247.142.130:6443
[2025-01-31 16:33:39]  INFO Created new KubeClient
[2025-01-31 16:33:39]  INFO Running 1 iteration(s)
[2025-01-31 16:33:39]  INFO     *** ITERATION NUMBER 1 ***
[2025-01-31 16:33:39]  INFO Starting VolumeIoSuite with op-e2e-pmax storage class
[2025-01-31 16:33:39]  INFO Successfully created namespace volumeio-test-53ccc4fa
[2025-01-31 16:33:39]  INFO Using default number of volumes
[2025-01-31 16:33:39]  INFO Using default image: docker.io/centos:latest
[2025-01-31 16:33:39]  INFO Creating IO pod
[2025-01-31 16:33:39]  INFO Waiting for pod iowriter-test-nhfpd to be READY
[2025-01-31 16:34:05]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-0.data]
[2025-01-31 16:34:09]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-0.data > /data0/writer-0.sha512]
[2025-01-31 16:34:19]  INFO Waiting until no Volume Attachments with PV  left
[2025-01-31 16:34:19]  INFO VolumeAttachment deleted
[2025-01-31 16:34:19]  INFO Deleting all resources in namespace volumeio-test-53ccc4fa
[2025-01-31 16:34:31]  INFO Namespace volumeio-test-53ccc4fa was deleted in 12.011375124s
[2025-01-31 16:34:34]  INFO SUCCESS: VolumeIoSuite in 55.1156757s
[2025-01-31 16:34:34]  INFO Started generating reports...
Collecting metrics
1 / 1 [----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/s[2025-01-31 16:34:34]  INFO Started generating reports...
Collecting metrics
Generating plots
1 / 1 [----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/s1 / 1 [--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->] 100.00% ? p/s1 / 1 [--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 193 p/s[2025-01-31 16:34:34]  WARN No ResourceUsageMetrics provided
[2025-01-31 16:34:34] ERROR no ResourceUsageMetrics provided
report-test-run-c4c31264:
Name: test-run-c4c31264
Host: https://10.247.142.130:6443
StorageClass: op-e2e-pmax
Minimum and Maximum EntityOverTime charts:

/root/.cert-csi/reports/test-run-c4c31264/PodsCreatingOverTime.png

/root/.cert-csi/reports/test-run-c4c31264/PodsReadyOverTime.png

/root/.cert-csi/reports/test-run-c4c31264/PodsTerminatingOverTime.png

/root/.cert-csi/reports/test-run-c4c31264/PvcsCreatingOverTime.png

/root/.cert-csi/reports/test-run-c4c31264/PvcsBoundOverTime.png

Tests:
--------------------------------------------------------------
1. TestCase: VolumeIoSuite
            Started:   2025-01-31 16:33:39.402462485 +0000 UTC
            Ended:     2025-01-31 16:34:34.560698857 +0000 UTC
            Result:    SUCCESS

            Stage metrics:
                    PVCAttachment:
                        Avg: 5.22074927s
                        Min: 5.22074927s
                        Max: 5.22074927s
                        Histogram:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PVCAttachment.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PVCAttachment_boxplot.png
                    PVCBind:
                        Avg: 2.259193291s
                        Min: 2.259193291s
                        Max: 2.259193291s
                        Histogram:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PVCBind.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PVCBind_boxplot.png
                    PVCCreation:
                        Avg: 8.269082845s
                        Min: 8.269082845s
                        Max: 8.269082845s
                        Histogram:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PVCCreation.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PVCCreation_boxplot.png
                    PVCDeletion:
                        Avg: 11.8268ms
                        Min: 11.8268ms
                        Max: 11.8268ms
                        Histogram:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PVCDeletion.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PVCDeletion_boxplot.png
                    PVCUnattachment:
                        Avg: 1.705072234s
                        Min: 1.705072234s
                        Max: 1.705072234s
                        Histogram:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PVCUnattachment.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PVCUnattachment_boxplot.png
                    PodCreation:
                        Avg: 24.308024809s
                        Min: 24.308024809s
                        Max: 24.308024809s
                        Histogram:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PodCreation.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PodCreation_boxplot.png
                    PodDeletion:
                        Avg: 6.085387008s
                        Min: 6.085387008s
                        Max: 6.085387008s
                        Histogram:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PodDeletion.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/PodDeletion_boxplot.png
                        EntityNumberOverTime:
        /root/.cert-csi/reports/test-run-c4c31264/VolumeIoSuite29/EntityNumberOverTime.png

[2025-01-31 16:34:35]  INFO Avg time of a run:   40.51s
[2025-01-31 16:34:35]  INFO Avg time of a del:   12.01s
[2025-01-31 16:34:35]  INFO Avg time of all:     55.11s
[2025-01-31 16:34:35]  INFO During this run 100.0% of suites succeeded
  STEP:      Executing  Enable forceRemoveDriver on CR [1] @ 01/31/25 16:34:35.071
  STEP:      Executing  Delete custom resource [1] @ 01/31/25 16:34:35.087
  STEP:      Executing  Validate [powermax] driver from CR [1] is not installed @ 01/31/25 16:34:35.102

err: found the following pods: powermax-controller-56cd56997c-62cdd,powermax-controller-56cd56997c-x6nj9,
  STEP:      Executing  Restore template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax] @ 01/31/25 16:35:25.138
  STEP:      Executing  Restore template [testfiles/powermax-templates/powermax-use-secret-template.yaml] for [pmaxUseSecret] @ 01/31/25 16:35:25.184
  STEP:      Executing  Restore template [testfiles/powermax-templates/powermax-array-config.yaml] for [pmaxArrayConfig] @ 01/31/25 16:35:25.249
  STEP: Ending: Install PowerMax Driver with Mount Credentials (Sidecar), Enable Observability
   @ 01/31/25 16:35:25.322
• [270.409 seconds]
------------------------------

Ran 1 of 1 Specs in 270.416 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

Ginkgo ran 1 suite in 4m45.424468904s
Test Suite Passed
  • Add and run e2e test for minimal manifest with observability on Powermax mount credentials.
/root/git/public/dell/csm-operator/tests/e2e
  W0131 18:13:32.228196   12943 test_context.go:541] Unable to find in-cluster config, using default host : https://127.0.0.1:6443
  I0131 18:13:32.232189 12943 test_context.go:564] The --provider flag is not set. Continuing as if --provider=skeleton had been used.
Running Suite: CSM Operator End-to-End Tests - /root/git/public/dell/csm-operator/tests/e2e
===========================================================================================
Random Seed: 1738347161

Will run 1 of 1 specs
------------------------------
[BeforeSuite]
/root/git/public/dell/csm-operator/tests/e2e/e2e_test.go:98
  STEP: Getting test environment variables @ 01/31/25 18:13:32.233
  STEP: [powermax] @ 01/31/25 18:13:32.233
  STEP: Reading values file @ 01/31/25 18:13:32.233
  STEP: Getting a k8s client @ 01/31/25 18:13:32.235
[BeforeSuite] PASSED [0.012 seconds]
------------------------------
[run-e2e-test] E2E Testing Running all test Given Test Scenarios
/root/git/public/dell/csm-operator/tests/e2e/e2e_test.go:139
  STEP: Starting: Install PowerMax Driver with Mount Credentials (Minimal), Enable Observability  @ 01/31/25 18:13:32.245
  STEP: Returning false here @ 01/31/25 18:13:32.245
  STEP:      Executing  Given an environment with k8s or openshift, and CSM operator installed @ 01/31/25 18:13:32.246
  STEP:      Executing  Create storageclass with name [op-e2e-pmax] and template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax] @ 01/31/25 18:13:32.259
  STEP:      Executing  Set up secret with template [testfiles/powermax-templates/powermax-use-secret-template.yaml] name [powermax-creds] in namespace [powermax] for [pmaxUseSecret] @ 01/31/25 18:13:33.387
  STEP:      Executing  Set up creds with template [testfiles/powermax-templates/powermax-array-config.yaml] for [pmaxArrayConfig] @ 01/31/25 18:13:34.363
  STEP:      Executing  Apply custom resource [1] @ 01/31/25 18:13:35.391
  I0131 18:13:35.392056 12943 builder.go:121] Running '/usr/bin/kubectl --namespace=powermax apply --validate=true -f -'
  I0131 18:13:35.678170 12943 builder.go:146] stderr: ""
  I0131 18:13:35.678239 12943 builder.go:147] stdout: "containerstoragemodule.storage.dell.com/powermax created\n"
  STEP:      Executing  Validate custom resource [1] @ 01/31/25 18:13:35.678

err: expected custom resource status to be Succeeded. Got: Failed

err: expected custom resource status to be Succeeded. Got: Failed
  STEP:      Executing  Validate [powermax] driver from CR [1] is installed @ 01/31/25 18:14:55.733
  STEP:      Executing  Validate [observability] module from CR [1] is not installed @ 01/31/25 18:15:15.756
  STEP:      Executing  Enable [observability] module from CR [1] @ 01/31/25 18:15:25.764
  STEP:      Executing  Validate [powermax] driver from CR [1] is installed @ 01/31/25 18:15:40.776
  STEP:      Executing  Validate [observability] module from CR [1] is installed @ 01/31/25 18:16:00.791
  STEP:      Executing  Validate [powermax] driver spec from CR [1] @ 01/31/25 18:16:10.811
  STEP:      Executing  Run custom test @ 01/31/25 18:16:10.814
  I0131 18:16:10.814824 12943 util.go:650] Running cert-csi [test vio --sc op-e2e-pmax --chainLength 1 --chainNumber 1]
[2025-01-31 18:16:10]  INFO Starting cert-csi; ver. 1.4.1
[2025-01-31 18:16:10]  INFO Using EVENT observer type
[2025-01-31 18:16:10]  INFO Using config from /root/.kube/config
[2025-01-31 18:16:10]  INFO Successfully loaded config. Host: https://10.247.142.130:6443
[2025-01-31 18:16:10]  INFO Created new KubeClient
[2025-01-31 18:16:10]  INFO Running 1 iteration(s)
[2025-01-31 18:16:10]  INFO     *** ITERATION NUMBER 1 ***
[2025-01-31 18:16:10]  INFO Starting VolumeIoSuite with op-e2e-pmax storage class
[2025-01-31 18:16:10]  INFO Successfully created namespace volumeio-test-d7acb376
[2025-01-31 18:16:10]  INFO Using default number of volumes
[2025-01-31 18:16:10]  INFO Using default image: docker.io/centos:latest
[2025-01-31 18:16:10]  INFO Creating IO pod
[2025-01-31 18:16:10]  INFO Waiting for pod iowriter-test-qv8kr to be READY
[2025-01-31 18:16:28]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-0.data]
[2025-01-31 18:16:30]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-0.data > /data0/writer-0.sha512]
[2025-01-31 18:16:34]  INFO Waiting until no Volume Attachments with PV  left
[2025-01-31 18:16:34]  INFO VolumeAttachment deleted
[2025-01-31 18:16:34]  INFO Deleting all resources in namespace volumeio-test-d7acb376
[2025-01-31 18:16:46]  INFO Namespace volumeio-test-d7acb376 was deleted in 12.010989919s
[2025-01-31 18:16:51]  INFO SUCCESS: VolumeIoSuite in 40.107843397s
[2025-01-31 18:16:51]  INFO Started generating reports...
Collecting metrics
1 / 1 [----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/s[2025-01-31 18:16:51]  INFO Started generating reports...
Collecting metrics
1 / 1 [----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/sGenerating plots
1 / 1 [----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/s[2025-01-31 18:16:51]  WARN No ResourceUsageMetrics provided
[2025-01-31 18:16:51] ERROR no ResourceUsageMetrics provided
report-test-run-0b10757b:
Name: test-run-0b10757b
Host: https://10.247.142.130:6443
StorageClass: op-e2e-pmax
Minimum and Maximum EntityOverTime charts:

/root/.cert-csi/reports/test-run-0b10757b/PodsCreatingOverTime.png

/root/.cert-csi/reports/test-run-0b10757b/PodsReadyOverTime.png

/root/.cert-csi/reports/test-run-0b10757b/PodsTerminatingOverTime.png

/root/.cert-csi/reports/test-run-0b10757b/PvcsCreatingOverTime.png

/root/.cert-csi/reports/test-run-0b10757b/PvcsBoundOverTime.png

Tests:
--------------------------------------------------------------
1. TestCase: VolumeIoSuite
            Started:   2025-01-31 18:16:10.897569866 +0000 UTC
            Ended:     2025-01-31 18:16:51.004890557 +0000 UTC
            Result:    SUCCESS

            Stage metrics:
                    PVCAttachment:
                        Avg: 5.143126987s
                        Min: 5.143126987s
                        Max: 5.143126987s
                        Histogram:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PVCAttachment.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PVCAttachment_boxplot.png
                    PVCBind:
                        Avg: 2.211534851s
                        Min: 2.211534851s
                        Max: 2.211534851s
                        Histogram:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PVCBind.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PVCBind_boxplot.png
                    PVCCreation:
                        Avg: 8.15417108s
                        Min: 8.15417108s
                        Max: 8.15417108s
                        Histogram:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PVCCreation.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PVCCreation_boxplot.png
                    PVCDeletion:
                        Avg: 12.314218ms
                        Min: 12.314218ms
                        Max: 12.314218ms
                        Histogram:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PVCDeletion.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PVCDeletion_boxplot.png
                    PVCUnattachment:
                        Avg: 1.780760982s
                        Min: 1.780760982s
                        Max: 1.780760982s
                        Histogram:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PVCUnattachment.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PVCUnattachment_boxplot.png
                    PodCreation:
                        Avg: 16.938452003s
                        Min: 16.938452003s
                        Max: 16.938452003s
                        Histogram:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PodCreation.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PodCreation_boxplot.png
                    PodDeletion:
                        Avg: 2.836237072s
                        Min: 2.836237072s
                        Max: 2.836237072s
                        Histogram:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PodDeletion.png
                        BoxPlot:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/PodDeletion_boxplot.png
                        EntityNumberOverTime:
        /root/.cert-csi/reports/test-run-0b10757b/VolumeIoSuite30/EntityNumberOverTime.png

[2025-01-31 18:16:51]  INFO Avg time of a run:   23.81s
[2025-01-31 18:16:51]  INFO Avg time of a del:   12.01s
[2025-01-31 18:16:51]  INFO Avg time of all:     40.10s
[2025-01-31 18:16:51]  INFO During this run 100.0% of suites succeeded
  STEP:      Executing  Enable forceRemoveDriver on CR [1] @ 01/31/25 18:16:51.49
  STEP:      Executing  Delete custom resource [1] @ 01/31/25 18:16:51.5
  STEP:      Executing  Validate [powermax] driver from CR [1] is not installed @ 01/31/25 18:16:51.509

err: found the following pods: powermax-controller-9dfb78bfb-jdhps,powermax-controller-9dfb78bfb-lltdd,
  STEP:      Executing  Restore template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax] @ 01/31/25 18:17:41.546
  STEP:      Executing  Restore template [testfiles/powermax-templates/powermax-use-secret-template.yaml] for [pmaxUseSecret] @ 01/31/25 18:17:41.62
  STEP:      Executing  Restore template [testfiles/powermax-templates/powermax-array-config.yaml] for [pmaxArrayConfig] @ 01/31/25 18:17:41.701
  STEP: Ending: Install PowerMax Driver with Mount Credentials (Minimal), Enable Observability
   @ 01/31/25 18:17:41.783
• [254.537 seconds]
------------------------------

Ran 1 of 1 Specs in 254.550 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

Ginkgo ran 1 suite in 5m5.403718408s
Test Suite Passed

pkg/modules/observability.go Outdated Show resolved Hide resolved
@falfaroc falfaroc requested a review from tdawe February 3, 2025 13:31
@falfaroc falfaroc merged commit e335d08 into usr/spark/mount-credentials Feb 4, 2025
7 of 8 checks passed
@falfaroc falfaroc deleted the usr/falfaroc/powermax-obs-secret-mount branch February 4, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants