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

enable authorization for observability metrics-powerscale #115

Merged
merged 1 commit into from
Oct 28, 2022

Conversation

taohe1012
Copy link
Contributor

@taohe1012 taohe1012 commented Oct 23, 2022

Description

enable authorization for observability metrics-powerscale.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#488

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

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

  • unit test
~/csm-operator/controllers# go test ./... -coverprofile cover.out
ok      github.com/dell/csm-operator/controllers        0.884s  coverage: 89.0% of statements
~/csm-operator/pkg/modules# go test ./... -coverprofile cover.out
ok      github.com/dell/csm-operator/pkg/modules        0.153s  coverage: 89.3% of statements

  • e2e test
    Passed: enable both modules observability and authorization
    output:
~/csm-operator/tests/e2e
Oct 23 09:55:31.811: INFO: The --provider flag is not set. Continuing as if --provider=skeleton had been used.
W1023 09:55:31.811132 3547715 test_context.go:460] Unable to find in-cluster config, using default host : https://127.0.0.1:6443
Running Suite: CSM Operator End-to-End Tests
============================================
Random Seed:   1666533327   - Will randomize all specs
Will run   1   of   1   specs

 STEP  : Getting test environment variables
 STEP  : Reading values file
 STEP  : Getting a k8s client
 [run-e2e-test]E2E Testing   
   Running all test Given Test Scenarios  
  [37m ~/csm-operator/tests/e2e/e2e_test.go:110  
[It] Running all test Given Test Scenarios
  ~/csm-operator/tests/e2e/e2e_test.go:110
 STEP  : Starting: Install PowerScale Driver(Standalone) 
 STEP  :      Executing  Given an environment with k8s or openshift, and CSM operator installed
 STEP  :      Executing  Apply custom resources
Oct 23 09:55:32.199: INFO: Running '/usr/bin/kubectl --namespace=test-isilon apply --validate=true -f -'
Oct 23 09:55:32.428: INFO: stderr: ""
Oct 23 09:55:32.428: INFO: stdout: "containerstoragemodule.storage.dell.com/test-isilon created\n"
 STEP  :      Executing  Validate custom resources
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Run custom test
Oct 23 09:55:42.446: INFO: Running ./cert-csi [test vio --sc isilon --chainNumber 2 --chainLength 2]
[2022-10-23 09:55:42]  INFO Starting cert-csi; ver. 0.8.1
[2022-10-23 09:55:42]  INFO Using EVENT observer type
[2022-10-23 09:55:42]  INFO Using config from /etc/kubernetes/admin.conf
[2022-10-23 09:55:42]  INFO Successfully loaded config. Host: https://10.225.108.156:6443
[2022-10-23 09:55:42]  INFO Created new KubeClient
[2022-10-23 09:55:42]  INFO Running 1 iteration(s)
[2022-10-23 09:55:42]  INFO 	*** ITERATION NUMBER 1 ***	
[2022-10-23 09:55:42]  INFO Starting VolumeIoSuite with isilon storage class
[2022-10-23 09:55:42]  INFO Successfully created namespace volumeio-test-fa67952c
[2022-10-23 09:55:42]  INFO Using default number of volumes
[2022-10-23 09:55:42]  INFO Creating IO pod
[2022-10-23 09:56:20]  INFO Waiting for pod iowriter-test-974fh to be READY
[2022-10-23 09:56:32]  INFO Waiting for pod iowriter-test-jrwhs to be READY
[2022-10-23 09:56:32]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-0.data]
[2022-10-23 09:56:37]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-0.data > /data0/writer-0.sha512]
[2022-10-23 09:56:38]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-1.data]
[2022-10-23 09:56:44]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-1.data > /data0/writer-1.sha512]
[2022-10-23 09:56:46]  INFO Waiting until no Volume Attachments with PV csipscale-95aca83125 left
[2022-10-23 09:56:48]  INFO VolumeAttachment deleted
[2022-10-23 09:56:48]  INFO Waiting for pod iowriter-test-4s7l7 to be READY
[2022-10-23 09:56:52]  INFO Waiting until no Volume Attachments with PV csipscale-2b7af66be5 left
[2022-10-23 09:56:58]  INFO Executing command: [/bin/bash -c sha512sum -c /data0/writer-0.sha512]
[2022-10-23 09:57:00]  INFO VolumeAttachment deleted
[2022-10-23 09:57:00]  INFO Waiting for pod iowriter-test-v8sbh to be READY
[2022-10-23 09:57:01]  INFO Hashes match
[2022-10-23 09:57:01]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-0.data]
[2022-10-23 09:57:06]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-0.data > /data0/writer-0.sha512]
[2022-10-23 09:57:10]  INFO Executing command: [/bin/bash -c sha512sum -c /data0/writer-1.sha512]
[2022-10-23 09:57:11]  INFO Waiting until no Volume Attachments with PV csipscale-95aca83125 left
[2022-10-23 09:57:12]  INFO Hashes match
[2022-10-23 09:57:12]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-1.data]
[2022-10-23 09:57:18]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-1.data > /data0/writer-1.sha512]
[2022-10-23 09:57:19]  INFO VolumeAttachment deleted
[2022-10-23 09:57:22]  INFO Waiting until no Volume Attachments with PV csipscale-2b7af66be5 left
[2022-10-23 09:57:30]  INFO VolumeAttachment deleted
[2022-10-23 09:57:30]  INFO Deleting all resources in namespace volumeio-test-fa67952c
[2022-10-23 09:57:42]  INFO Namespace volumeio-test-fa67952c was deleted in 12.015886287s
[2022-10-23 09:57:47]  INFO SUCCESS: VolumeIoSuite in 2m5.077024806s
[2022-10-23 09:57:47]  INFO Started generating reports...
Collecting metrics
1 / 1 [-------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/sCollecting metrics
[2022-10-23 09:57:47]  INFO Started generating reports...
Generating plots
1 / 1 [-------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/s1 / 1 [------------------------------------------------------------------------------------------------------------------------------------------------------>] 100.00% ? p/s1 / 1 [------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 21 p/s[2022-10-23 09:57:47]  WARN No ResourceUsageMetrics provided
[2022-10-23 09:57:47] ERROR no ResourceUsageMetrics provided
report-test-run-43824440:
Name: test-run-43824440
Host: https://10.225.108.156:6443
StorageClass: isilon
Minimum and Maximum EntityOverTime charts:

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

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

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

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

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

Tests:
--------------------------------------------------------------
1. TestCase: VolumeIoSuite
           Started:   2022-10-23 09:55:42.545392555 -0400 -0400
           Ended:     2022-10-23 09:57:47.623276553 -0400 -0400
           Result:    SUCCESS

           Stage metrics:
   	    PVCBind:
   		Avg: 23.740897195s
   		Min: 10.132964038s
   		Max: 37.348830352s
   		Histogram:
   /root/.cert-csi/reports/test-run-43824440/VolumeIoSuite11/PVCBind.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-43824440/VolumeIoSuite11/PVCBind_boxplot.png
   	    PVCCreation:
   		Avg: 45.534158935s
   		Min: 44.284423124s
   		Max: 46.783894747s
   		Histogram:
   /root/.cert-csi/reports/test-run-43824440/VolumeIoSuite11/PVCCreation.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-43824440/VolumeIoSuite11/PVCCreation_boxplot.png
   	    PVCDeletion:
   		Avg: 23.800857ms
   		Min: 17.941641ms
   		Max: 29.660074ms
   		Histogram:
   /root/.cert-csi/reports/test-run-43824440/VolumeIoSuite11/PVCDeletion.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-43824440/VolumeIoSuite11/PVCDeletion_boxplot.png
   	    PVCUnattachment:
   		Avg: 16.78805296s
   		Min: 800.903548ms
   		Max: 32.775202373s
   		Histogram:
   /root/.cert-csi/reports/test-run-43824440/VolumeIoSuite11/PVCUnattachment.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-43824440/VolumeIoSuite11/PVCUnattachment_boxplot.png
   	    PodCreation:
   		Avg: 9.206112645s
   		Min: 6.000885827s
   		Max: 10.968545569s
   		Histogram:
   /root/.cert-csi/reports/test-run-43824440/VolumeIoSuite11/PodCreation.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-43824440/VolumeIoSuite11/PodCreation_boxplot.png
   	    PodDeletion:
   		Avg: 1.419811064s
   		Min: 1.244041746s
   		Max: 1.756091176s
   		Histogram:
   /root/.cert-csi/reports/test-run-43824440/VolumeIoSuite11/PodDeletion.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-43824440/VolumeIoSuite11/PodDeletion_boxplot.png
   		EntityNumberOverTime:
   /root/.cert-csi/reports/test-run-43824440/VolumeIoSuite11/EntityNumberOverTime.png

[2022-10-23 09:57:48]  INFO Avg time of a run:	 108.32s
[2022-10-23 09:57:48]  INFO Avg time of a del:	 12.02s
[2022-10-23 09:57:48]  INFO Avg time of all:	 125.08s
[2022-10-23 09:57:48]  INFO During this run 100.0% of suites succeeded
 STEP  :      Executing  Enable forceRemoveDriver on CR
 STEP  :      Executing  Delete resources
 STEP  : Ending: Install PowerScale Driver(Standalone)

 STEP  : Starting: Install PowerScale Driver(With Authorization) 
 STEP  :      Executing  Given an environment with k8s or openshift, and CSM operator installed
 STEP  :      Executing  Apply custom resources
Oct 23 09:57:53.254: INFO: Running '/usr/bin/kubectl --namespace=test-isilon apply --validate=true -f -'
Oct 23 09:57:53.512: INFO: stderr: ""
Oct 23 09:57:53.512: INFO: stdout: "containerstoragemodule.storage.dell.com/test-isilon created\n"
 STEP  :      Executing  Validate custom resources
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is installed
map[com.dell.karavi-authorization-proxy:true deployment.kubernetes.io/revision:1]
map[com.dell.karavi-authorization-proxy:true deprecated.daemonset.template.generation:1]
 STEP  :      Executing  Run custom test
Oct 23 09:58:03.579: INFO: Running ./cert-csi [test vio --sc isilon --chainNumber 2 --chainLength 2]
[2022-10-23 09:58:03]  INFO Starting cert-csi; ver. 0.8.1
[2022-10-23 09:58:03]  INFO Using EVENT observer type
[2022-10-23 09:58:03]  INFO Using config from /etc/kubernetes/admin.conf
[2022-10-23 09:58:03]  INFO Successfully loaded config. Host: https://10.225.108.156:6443
[2022-10-23 09:58:03]  INFO Created new KubeClient
[2022-10-23 09:58:03]  INFO Running 1 iteration(s)
[2022-10-23 09:58:03]  INFO 	*** ITERATION NUMBER 1 ***	
[2022-10-23 09:58:03]  INFO Starting VolumeIoSuite with isilon storage class
[2022-10-23 09:58:03]  INFO Successfully created namespace volumeio-test-93a91998
[2022-10-23 09:58:03]  INFO Using default number of volumes
[2022-10-23 09:58:03]  INFO Creating IO pod
[2022-10-23 09:58:47]  INFO Waiting for pod iowriter-test-trfml to be READY
[2022-10-23 09:59:07]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-0.data]
[2022-10-23 09:59:07]  INFO Waiting for pod iowriter-test-wtkpr to be READY
[2022-10-23 09:59:14]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-0.data > /data0/writer-0.sha512]
[2022-10-23 09:59:15]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-1.data]
[2022-10-23 09:59:21]  INFO Waiting until no Volume Attachments with PV csipscale-abccd243d2 left
[2022-10-23 09:59:21]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-1.data > /data0/writer-1.sha512]
[2022-10-23 09:59:25]  INFO VolumeAttachment deleted
[2022-10-23 09:59:25]  INFO Waiting for pod iowriter-test-nrkhf to be READY
[2022-10-23 09:59:27]  INFO Waiting until no Volume Attachments with PV csipscale-38fcee8488 left
[2022-10-23 09:59:33]  INFO VolumeAttachment deleted
[2022-10-23 09:59:33]  INFO Waiting for pod iowriter-test-8dmzc to be READY
[2022-10-23 09:59:35]  INFO Executing command: [/bin/bash -c sha512sum -c /data0/writer-0.sha512]
[2022-10-23 09:59:38]  INFO Hashes match
[2022-10-23 09:59:38]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-0.data]
[2022-10-23 09:59:43]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-0.data > /data0/writer-0.sha512]
[2022-10-23 09:59:45]  INFO Executing command: [/bin/bash -c sha512sum -c /data0/writer-1.sha512]
[2022-10-23 09:59:47]  INFO Hashes match
[2022-10-23 09:59:47]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-1.data]
[2022-10-23 09:59:49]  INFO Waiting until no Volume Attachments with PV csipscale-abccd243d2 left
[2022-10-23 09:59:52]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-1.data > /data0/writer-1.sha512]
[2022-10-23 09:59:55]  INFO VolumeAttachment deleted
[2022-10-23 09:59:57]  INFO Waiting until no Volume Attachments with PV csipscale-38fcee8488 left
[2022-10-23 10:00:05]  INFO VolumeAttachment deleted
[2022-10-23 10:00:05]  INFO Deleting all resources in namespace volumeio-test-93a91998
[2022-10-23 10:00:17]  INFO Namespace volumeio-test-93a91998 was deleted in 12.020767542s
[2022-10-23 10:00:18]  INFO SUCCESS: VolumeIoSuite in 2m15.092300503s
[2022-10-23 10:00:18]  INFO Started generating reports...
Collecting metrics
1 / 1 [-------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/s[2022-10-23 10:00:18]  INFO Started generating reports...
Collecting metrics
1 / 1 [-------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/sGenerating plots
1 / 1 [------------------------------------------------------------------------------------------------------------------------------------------------------>] 100.00% ? p/s1 / 1 [------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 27 p/s[2022-10-23 10:00:19]  WARN No ResourceUsageMetrics provided
[2022-10-23 10:00:19] ERROR no ResourceUsageMetrics provided
report-test-run-8dddbe10:
Name: test-run-8dddbe10
Host: https://10.225.108.156:6443
StorageClass: isilon
Minimum and Maximum EntityOverTime charts:

/root/.cert-csi/reports/test-run-8dddbe10/PodsCreatingOverTime.png

/root/.cert-csi/reports/test-run-8dddbe10/PodsReadyOverTime.png

/root/.cert-csi/reports/test-run-8dddbe10/PodsTerminatingOverTime.png

/root/.cert-csi/reports/test-run-8dddbe10/PvcsCreatingOverTime.png

/root/.cert-csi/reports/test-run-8dddbe10/PvcsBoundOverTime.png

Tests:
--------------------------------------------------------------
1. TestCase: VolumeIoSuite
           Started:   2022-10-23 09:58:03.692482614 -0400 -0400
           Ended:     2022-10-23 10:00:18.785455639 -0400 -0400
           Result:    SUCCESS

           Stage metrics:
   	    PVCBind:
   		Avg: 30.89630485s
   		Min: 18.500086645s
   		Max: 43.292523056s
   		Histogram:
   /root/.cert-csi/reports/test-run-8dddbe10/VolumeIoSuite12/PVCBind.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-8dddbe10/VolumeIoSuite12/PVCBind_boxplot.png
   	    PVCCreation:
   		Avg: 43.65899967s
   		Min: 25.937414936s
   		Max: 1m1.380584405s
   		Histogram:
   /root/.cert-csi/reports/test-run-8dddbe10/VolumeIoSuite12/PVCCreation.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-8dddbe10/VolumeIoSuite12/PVCCreation_boxplot.png
   	    PVCDeletion:
   		Avg: 21.172747ms
   		Min: 17.031217ms
   		Max: 25.314278ms
   		Histogram:
   /root/.cert-csi/reports/test-run-8dddbe10/VolumeIoSuite12/PVCDeletion.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-8dddbe10/VolumeIoSuite12/PVCDeletion_boxplot.png
   	    PVCUnattachment:
   		Avg: 33.495036898s
   		Min: 33.351750723s
   		Max: 33.638323074s
   		Histogram:
   /root/.cert-csi/reports/test-run-8dddbe10/VolumeIoSuite12/PVCUnattachment.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-8dddbe10/VolumeIoSuite12/PVCUnattachment_boxplot.png
   	    PodCreation:
   		Avg: 11.416881982s
   		Min: 7.875238426s
   		Max: 18.862580617s
   		Histogram:
   /root/.cert-csi/reports/test-run-8dddbe10/VolumeIoSuite12/PodCreation.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-8dddbe10/VolumeIoSuite12/PodCreation_boxplot.png
   	    PodDeletion:
   		Avg: 1.739553999s
   		Min: 1.360531755s
   		Max: 2.270395061s
   		Histogram:
   /root/.cert-csi/reports/test-run-8dddbe10/VolumeIoSuite12/PodDeletion.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-8dddbe10/VolumeIoSuite12/PodDeletion_boxplot.png
   		EntityNumberOverTime:
   /root/.cert-csi/reports/test-run-8dddbe10/VolumeIoSuite12/EntityNumberOverTime.png

[2022-10-23 10:00:19]  INFO Avg time of a run:	 121.67s
[2022-10-23 10:00:19]  INFO Avg time of a del:	 12.02s
[2022-10-23 10:00:19]  INFO Avg time of all:	 135.09s
[2022-10-23 10:00:19]  INFO During this run 100.0% of suites succeeded
 STEP  :      Executing  Enable forceRemoveDriver on CR
 STEP  :      Executing  Delete resources
 STEP  : Ending: Install PowerScale Driver(With Authorization)

 STEP  : Starting: Install PowerScale Driver(Standalone), Enable Authorization 
 STEP  :      Executing  Given an environment with k8s or openshift, and CSM operator installed
 STEP  :      Executing  Apply custom resources
Oct 23 10:00:24.385: INFO: Running '/usr/bin/kubectl --namespace=test-isilon apply --validate=true -f -'
Oct 23 10:00:24.620: INFO: stderr: ""
Oct 23 10:00:24.620: INFO: stdout: "containerstoragemodule.storage.dell.com/test-isilon created\n"
 STEP  :      Executing  Validate custom resources
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is not installed
 STEP  :      Executing  Enable [authorization] module
 STEP  :      Executing  Set Driver secret to [test-isilon-creds-auth]
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is installed
map[deployment.kubernetes.io/revision:1]
map[com.dell.karavi-authorization-proxy:true deployment.kubernetes.io/revision:2]
map[com.dell.karavi-authorization-proxy:true deprecated.daemonset.template.generation:2]
 STEP  :      Executing  Run custom test
Oct 23 10:00:44.834: INFO: Running echo [Hello && echo World]
Hello && echo World
 STEP  :      Executing  Enable forceRemoveDriver on CR
 STEP  :      Executing  Delete resources
 STEP  : Ending: Install PowerScale Driver(Standalone), Enable Authorization

 STEP  : Starting: Uninstall PowerScale Driver 
 STEP  :      Executing  Given an environment with k8s or openshift, and CSM operator installed
 STEP  :      Executing  Apply custom resources
Oct 23 10:00:49.886: INFO: Running '/usr/bin/kubectl --namespace=test-isilon apply --validate=true -f -'
Oct 23 10:00:50.173: INFO: stderr: ""
Oct 23 10:00:50.173: INFO: stdout: "containerstoragemodule.storage.dell.com/test-isilon created\n"
 STEP  :      Executing  Validate custom resources
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Enable forceRemoveDriver on CR
 STEP  :      Executing  Delete resources
 STEP  :      Executing  Validate [powerscale] driver is not installed
 STEP  : Ending: Uninstall PowerScale Driver

 STEP  : Starting: Install PowerScale Driver(With Authorization), Disable Authorization module" 
 STEP  :      Executing  Given an environment with k8s or openshift, and CSM operator installed
 STEP  :      Executing  Apply custom resources
Oct 23 10:01:15.265: INFO: Running '/usr/bin/kubectl --namespace=test-isilon apply --validate=true -f -'
Oct 23 10:01:15.584: INFO: stderr: ""
Oct 23 10:01:15.584: INFO: stdout: "containerstoragemodule.storage.dell.com/test-isilon created\n"
 STEP  :      Executing  Validate custom resources
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is installed
map[com.dell.karavi-authorization-proxy:true deployment.kubernetes.io/revision:1]
map[com.dell.karavi-authorization-proxy:true deprecated.daemonset.template.generation:1]
 STEP  :      Executing  Disable [authorization] module
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is not installed
 STEP  :      Executing  Enable forceRemoveDriver on CR
 STEP  :      Executing  Delete resources
 STEP  : Ending: Install PowerScale Driver(With Authorization), Disable Authorization module"

 STEP  : Starting: Install PowerScale Driver(With Observability) 
 STEP  :      Executing  Given an environment with k8s or openshift, and CSM operator installed
 STEP  :      Executing  Apply custom resources
Oct 23 10:01:40.765: INFO: Running '/usr/bin/kubectl --namespace=test-isilon apply --validate=true -f -'
Oct 23 10:01:40.960: INFO: stderr: ""
Oct 23 10:01:40.960: INFO: stdout: "containerstoragemodule.storage.dell.com/test-isilon created\n"
 STEP  :      Executing  Validate custom resources
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [observability] module is installed
 STEP  :      Executing  Enable forceRemoveDriver on CR
 STEP  :      Executing  Delete resources
 STEP  : Ending: Install PowerScale Driver(With Observability)

 STEP  : Starting: Install PowerScale Driver(Standalone), Enable Observability 
 STEP  :      Executing  Given an environment with k8s or openshift, and CSM operator installed
 STEP  :      Executing  Apply custom resources
Oct 23 10:01:56.049: INFO: Running '/usr/bin/kubectl --namespace=test-isilon apply --validate=true -f -'
Oct 23 10:01:56.277: INFO: stderr: ""
Oct 23 10:01:56.277: INFO: stdout: "containerstoragemodule.storage.dell.com/test-isilon created\n"
 STEP  :      Executing  Validate custom resources
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [observability] module is not installed
 STEP  :      Executing  Enable [observability] module
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [observability] module is installed
 STEP  :      Executing  Enable forceRemoveDriver on CR
 STEP  :      Executing  Delete resources
 STEP  : Ending: Install PowerScale Driver(Standalone), Enable Observability

 STEP  : Starting: Install PowerScale Driver(With Observability), Disable Observability module" 
 STEP  :      Executing  Given an environment with k8s or openshift, and CSM operator installed
 STEP  :      Executing  Apply custom resources
Oct 23 10:02:21.504: INFO: Running '/usr/bin/kubectl --namespace=test-isilon apply --validate=true -f -'
Oct 23 10:02:21.786: INFO: stderr: ""
Oct 23 10:02:21.786: INFO: stdout: "containerstoragemodule.storage.dell.com/test-isilon created\n"
 STEP  :      Executing  Validate custom resources
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [observability] module is installed
 STEP  :      Executing  Disable [observability] module
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [observability] module is not installed
 STEP  :      Executing  Enable forceRemoveDriver on CR
 STEP  :      Executing  Delete resources
 STEP  : Ending: Install PowerScale Driver(With Observability), Disable Observability module"

 STEP  : Starting: Install PowerScale Driver(With Authorization and Observability) 
 STEP  :      Executing  Given an environment with k8s or openshift, and CSM operator installed
 STEP  :      Executing  Apply custom resources
Oct 23 10:02:46.965: INFO: Running '/usr/bin/kubectl --namespace=test-isilon apply --validate=true -f -'
Oct 23 10:02:47.244: INFO: stderr: ""
Oct 23 10:02:47.244: INFO: stdout: "containerstoragemodule.storage.dell.com/test-isilon created\n"
 STEP  :      Executing  Validate custom resources
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is installed
map[com.dell.karavi-authorization-proxy:true deployment.kubernetes.io/revision:1]
map[com.dell.karavi-authorization-proxy:true deprecated.daemonset.template.generation:1]
 STEP  :      Executing  Validate [observability] module is installed
map[com.dell.karavi-authorization-proxy:true deployment.kubernetes.io/revision:1]
 STEP  :      Executing  Run custom test
Oct 23 10:03:07.376: INFO: Running ./cert-csi [test vio --sc isilon --chainNumber 2 --chainLength 2]
[2022-10-23 10:03:07]  INFO Starting cert-csi; ver. 0.8.1
[2022-10-23 10:03:07]  INFO Using EVENT observer type
[2022-10-23 10:03:07]  INFO Using config from /etc/kubernetes/admin.conf
[2022-10-23 10:03:07]  INFO Successfully loaded config. Host: https://10.225.108.156:6443
[2022-10-23 10:03:07]  INFO Created new KubeClient
[2022-10-23 10:03:07]  INFO Running 1 iteration(s)
[2022-10-23 10:03:07]  INFO 	*** ITERATION NUMBER 1 ***	
[2022-10-23 10:03:07]  INFO Starting VolumeIoSuite with isilon storage class
[2022-10-23 10:03:07]  INFO Successfully created namespace volumeio-test-ce698c1d
[2022-10-23 10:03:07]  INFO Using default number of volumes
[2022-10-23 10:03:07]  INFO Creating IO pod
[2022-10-23 10:03:37]  INFO Waiting for pod iowriter-test-d4rzr to be READY
[2022-10-23 10:03:45]  INFO Waiting for pod iowriter-test-g6trw to be READY
[2022-10-23 10:03:49]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-0.data]
[2022-10-23 10:03:53]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-1.data]
[2022-10-23 10:03:54]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-0.data > /data0/writer-0.sha512]
[2022-10-23 10:03:58]  INFO Waiting until no Volume Attachments with PV csipscale-3cdc1bbc37 left
[2022-10-23 10:03:59]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-1.data > /data0/writer-1.sha512]
[2022-10-23 10:04:02]  INFO Waiting until no Volume Attachments with PV csipscale-267cc30467 left
[2022-10-23 10:04:08]  INFO VolumeAttachment deleted
[2022-10-23 10:04:08]  INFO Waiting for pod iowriter-test-p7s6j to be READY
[2022-10-23 10:04:14]  INFO VolumeAttachment deleted
[2022-10-23 10:04:14]  INFO Waiting for pod iowriter-test-r6hw2 to be READY
[2022-10-23 10:04:18]  INFO Executing command: [/bin/bash -c sha512sum -c /data0/writer-0.sha512]
[2022-10-23 10:04:20]  INFO Executing command: [/bin/bash -c sha512sum -c /data0/writer-1.sha512]
[2022-10-23 10:04:20]  INFO Hashes match
[2022-10-23 10:04:20]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-0.data]
[2022-10-23 10:04:24]  INFO Hashes match
[2022-10-23 10:04:24]  INFO Executing command: [/bin/bash -c dd if=/dev/urandom bs=1M count=128 oflag=sync > /data0/writer-1.data]
[2022-10-23 10:04:25]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-0.data > /data0/writer-0.sha512]
[2022-10-23 10:04:31]  INFO Executing command: [/bin/bash -c sha512sum /data0/writer-1.data > /data0/writer-1.sha512]
[2022-10-23 10:04:31]  INFO Waiting until no Volume Attachments with PV csipscale-3cdc1bbc37 left
[2022-10-23 10:04:39]  INFO Waiting until no Volume Attachments with PV csipscale-267cc30467 left
[2022-10-23 10:04:39]  INFO VolumeAttachment deleted
[2022-10-23 10:04:41]  INFO VolumeAttachment deleted
[2022-10-23 10:04:41]  INFO Deleting all resources in namespace volumeio-test-ce698c1d
[2022-10-23 10:04:53]  INFO Namespace volumeio-test-ce698c1d was deleted in 12.018967084s
[2022-10-23 10:04:57]  INFO SUCCESS: VolumeIoSuite in 1m50.072058339s
[2022-10-23 10:04:57]  INFO Started generating reports...
Collecting metrics
1 / 1 [-------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/s[2022-10-23 10:04:57]  INFO Started generating reports...
Collecting metrics
1 / 1 [-------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/sGenerating plots
1 / 1 [------------------------------------------------------------------------------------------------------------------------------------------------------>] 100.00% ? p/s1 / 1 [------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 28 p/s[2022-10-23 10:04:57]  WARN No ResourceUsageMetrics provided
[2022-10-23 10:04:57] ERROR no ResourceUsageMetrics provided
report-test-run-12afc809:
Name: test-run-12afc809
Host: https://10.225.108.156:6443
StorageClass: isilon
Minimum and Maximum EntityOverTime charts:

/root/.cert-csi/reports/test-run-12afc809/PodsCreatingOverTime.png

/root/.cert-csi/reports/test-run-12afc809/PodsReadyOverTime.png

/root/.cert-csi/reports/test-run-12afc809/PodsTerminatingOverTime.png

/root/.cert-csi/reports/test-run-12afc809/PvcsCreatingOverTime.png

/root/.cert-csi/reports/test-run-12afc809/PvcsBoundOverTime.png

Tests:
--------------------------------------------------------------
1. TestCase: VolumeIoSuite
           Started:   2022-10-23 10:03:07.481436207 -0400 -0400
           Ended:     2022-10-23 10:04:57.553923969 -0400 -0400
           Result:    SUCCESS

           Stage metrics:
   	    PVCBind:
   		Avg: 17.955256848s
   		Min: 7.801567583s
   		Max: 28.108946114s
   		Histogram:
   /root/.cert-csi/reports/test-run-12afc809/VolumeIoSuite13/PVCBind.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-12afc809/VolumeIoSuite13/PVCBind_boxplot.png
   	    PVCCreation:
   		Avg: 24.372759581s
   		Min: 13.660487908s
   		Max: 35.085031255s
   		Histogram:
   /root/.cert-csi/reports/test-run-12afc809/VolumeIoSuite13/PVCCreation.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-12afc809/VolumeIoSuite13/PVCCreation_boxplot.png
   	    PVCDeletion:
   		Avg: 23.675786ms
   		Min: 16.910179ms
   		Max: 30.441394ms
   		Histogram:
   /root/.cert-csi/reports/test-run-12afc809/VolumeIoSuite13/PVCDeletion.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-12afc809/VolumeIoSuite13/PVCDeletion_boxplot.png
   	    PVCUnattachment:
   		Avg: 31.999781166s
   		Min: 31.521820559s
   		Max: 32.477741774s
   		Histogram:
   /root/.cert-csi/reports/test-run-12afc809/VolumeIoSuite13/PVCUnattachment.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-12afc809/VolumeIoSuite13/PVCUnattachment_boxplot.png
   	    PodCreation:
   		Avg: 8.036682477s
   		Min: 5.377463448s
   		Max: 10.650118581s
   		Histogram:
   /root/.cert-csi/reports/test-run-12afc809/VolumeIoSuite13/PodCreation.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-12afc809/VolumeIoSuite13/PodCreation_boxplot.png
   	    PodDeletion:
   		Avg: 2.350323355s
   		Min: 1.366178644s
   		Max: 4.661823582s
   		Histogram:
   /root/.cert-csi/reports/test-run-12afc809/VolumeIoSuite13/PodDeletion.png
   		BoxPlot:
   /root/.cert-csi/reports/test-run-12afc809/VolumeIoSuite13/PodDeletion_boxplot.png
   		EntityNumberOverTime:
   /root/.cert-csi/reports/test-run-12afc809/VolumeIoSuite13/EntityNumberOverTime.png

[2022-10-23 10:04:58]  INFO Avg time of a run:	 94.31s
[2022-10-23 10:04:58]  INFO Avg time of a del:	 12.02s
[2022-10-23 10:04:58]  INFO Avg time of all:	 110.07s
[2022-10-23 10:04:58]  INFO During this run 100.0% of suites succeeded
 STEP  :      Executing  Enable forceRemoveDriver on CR
 STEP  :      Executing  Delete resources
 STEP  : Ending: Install PowerScale Driver(With Authorization and Observability)

 STEP  : Starting: Install PowerScale Driver(Standalone), Enable Authorization, Enable Observability 
 STEP  :      Executing  Given an environment with k8s or openshift, and CSM operator installed
 STEP  :      Executing  Apply custom resources
Oct 23 10:05:03.233: INFO: Running '/usr/bin/kubectl --namespace=test-isilon apply --validate=true -f -'
Oct 23 10:05:03.493: INFO: stderr: ""
Oct 23 10:05:03.493: INFO: stdout: "containerstoragemodule.storage.dell.com/test-isilon created\n"
 STEP  :      Executing  Validate custom resources
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is not installed
 STEP  :      Executing  Validate [observability] module is not installed
 STEP  :      Executing  Enable [authorization] module
 STEP  :      Executing  Set Driver secret to [test-isilon-creds-auth]
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is installed
map[deployment.kubernetes.io/revision:1]
map[com.dell.karavi-authorization-proxy:true deployment.kubernetes.io/revision:2]
map[com.dell.karavi-authorization-proxy:true deprecated.daemonset.template.generation:2]
 STEP  :      Executing  Validate [observability] module is not installed
 STEP  :      Executing  Enable [observability] module
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is installed
map[com.dell.karavi-authorization-proxy:true deployment.kubernetes.io/revision:2]
map[com.dell.karavi-authorization-proxy:true deprecated.daemonset.template.generation:2]
 STEP  :      Executing  Validate [observability] module is installed
map[com.dell.karavi-authorization-proxy:true deployment.kubernetes.io/revision:1]
 STEP  :      Executing  Enable forceRemoveDriver on CR
 STEP  :      Executing  Delete resources
 STEP  : Ending: Install PowerScale Driver(Standalone), Enable Authorization, Enable Observability

 STEP  : Starting: Install PowerScale Driver(With Authorization and Observability), Disable Observability module, Disable Authorization module" 
 STEP  :      Executing  Given an environment with k8s or openshift, and CSM operator installed
 STEP  :      Executing  Apply custom resources
Oct 23 10:05:38.901: INFO: Running '/usr/bin/kubectl --namespace=test-isilon apply --validate=true -f -'
Oct 23 10:05:39.221: INFO: stderr: ""
Oct 23 10:05:39.221: INFO: stdout: "containerstoragemodule.storage.dell.com/test-isilon created\n"
 STEP  :      Executing  Validate custom resources
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is installed
map[com.dell.karavi-authorization-proxy:true deployment.kubernetes.io/revision:1]
map[com.dell.karavi-authorization-proxy:true deprecated.daemonset.template.generation:1]
 STEP  :      Executing  Validate [observability] module is installed
map[com.dell.karavi-authorization-proxy:true deployment.kubernetes.io/revision:1]
 STEP  :      Executing  Disable [observability] module
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is installed
map[com.dell.karavi-authorization-proxy:true deployment.kubernetes.io/revision:1]
map[com.dell.karavi-authorization-proxy:true deprecated.daemonset.template.generation:1]
 STEP  :      Executing  Validate [observability] module is not installed
 STEP  :      Executing  Disable [authorization] module
 STEP  :      Executing  Set Driver secret to [test-isilon-creds]
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is not installed
 STEP  :      Executing  Validate [observability] module is not installed
 STEP  :      Executing  Enable forceRemoveDriver on CR
 STEP  :      Executing  Delete resources
 STEP  : Ending: Install PowerScale Driver(With Authorization and Observability), Disable Observability module, Disable Authorization module"

 STEP  : Starting: Install PowerScale Driver(With Authorization and Observability), Disable Authorization module, Disable Observability module" 
 STEP  :      Executing  Given an environment with k8s or openshift, and CSM operator installed
 STEP  :      Executing  Apply custom resources
Oct 23 10:06:24.590: INFO: Running '/usr/bin/kubectl --namespace=test-isilon apply --validate=true -f -'
Oct 23 10:06:24.841: INFO: stderr: ""
Oct 23 10:06:24.841: INFO: stdout: "containerstoragemodule.storage.dell.com/test-isilon created\n"
 STEP  :      Executing  Validate custom resources
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is installed
map[com.dell.karavi-authorization-proxy:true deployment.kubernetes.io/revision:1]
map[com.dell.karavi-authorization-proxy:true deprecated.daemonset.template.generation:1]
 STEP  :      Executing  Validate [observability] module is installed
map[com.dell.karavi-authorization-proxy:true deployment.kubernetes.io/revision:1]
 STEP  :      Executing  Disable [authorization] module
 STEP  :      Executing  Set Driver secret to [test-isilon-creds]
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is not installed
 STEP  :      Executing  Validate [observability] module is installed
 STEP  :      Executing  Disable [observability] module
 STEP  :      Executing  Validate [powerscale] driver is installed
 STEP  :      Executing  Validate [authorization] module is not installed
 STEP  :      Executing  Validate [observability] module is not installed
 STEP  :      Executing  Enable forceRemoveDriver on CR
 STEP  :      Executing  Delete resources
 STEP  : Ending: Install PowerScale Driver(With Authorization and Observability), Disable Authorization module, Disable Observability module"


[32m• [SLOW TEST:688.091 seconds]  
[run-e2e-test]E2E Testing
[90m ~/csm-operator/tests/e2e/e2e_test.go:109  
 Running all test Given Test Scenarios
  [90m ~/csm-operator/tests/e2e/e2e_test.go:110  
[90m------------------------------  

  [32mRan 1 of 1 Specs in 688.473 seconds  
  [32mSUCCESS!   --  [32m  1 Passed   |  [91m  0 Failed   |  [33m  0 Pending   |  [36m  0 Skipped  
PASS

Ginkgo ran 1 suite in 11m32.85578848s
Test Suite Passed

  • manual test
    Grafana UI display correctly

image

image

@taohe1012
Copy link
Contributor Author

Hi Code Owners, please kindly review the PR and let me know if any change needed. Thank you!

@taohe1012 taohe1012 force-pushed the feature-488-obs-pscale-metrics-auth branch from 606b053 to a3a32ac Compare October 26, 2022 09:09
Copy link
Contributor

@hoppea2 hoppea2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM based on unit and e2e test results. Have yo tested the authorization unit and e2e tests with this config as well?

@taohe1012
Copy link
Contributor Author

LGTM based on unit and e2e test results. Have yo tested the authorization unit and e2e tests with this config as well?

hi @hoppea2 , yes, the authorization unit tests are passed when testing modules package; And for the e2e tests, they are passed: enable authorization standalone, and enable both authorization and observability modules with different combinations.

@taohe1012 taohe1012 force-pushed the feature-488-obs-pscale-metrics-auth branch from a3a32ac to 536d32c Compare October 27, 2022 11:58
@taohe1012 taohe1012 force-pushed the feature-488-obs-pscale-metrics-auth branch from 536d32c to eff690e Compare October 27, 2022 12:10
@taohe1012
Copy link
Contributor Author

unit tests and e2e tests are run and passed again. Please help review this PR.

@rensyct rensyct merged commit d098d24 into main Oct 28, 2022
@taohe1012 taohe1012 deleted the feature-488-obs-pscale-metrics-auth branch October 28, 2022 06:29
@YianZong YianZong linked an issue Nov 24, 2022 that may be closed by this pull request
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.

[FEATURE]: CSM Operator: Support install of Observability
4 participants