Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

WIP: try with csi-test upgraded to 2.2.0 and change of #393 added #414

Closed
wants to merge 3 commits into from

Conversation

okartau
Copy link
Contributor

@okartau okartau commented Sep 20, 2019

No description provided.

@okartau okartau changed the title Try with changes of csi-test 2.2.0 applied WIP: Try with changes of csi-test 2.2.0 applied Sep 20, 2019
@okartau okartau changed the title WIP: Try with changes of csi-test 2.2.0 applied Step csi-test up to 2.2.0 Sep 23, 2019
@pohly
Copy link
Contributor

pohly commented Sep 23, 2019

This is a subset of #401. Can we merge that instead?

@okartau
Copy link
Contributor Author

okartau commented Sep 23, 2019

The essential change in 2.2.0 is use of ID Generator instead of static strings.
IDGen is an optional interface for callers to provide a generator for valid Volume and Node IDs. Defaults to DefaultIDGenerator which generates generic string IDs

Use of generated IDs is good thing as otherwise the static string IDs could remain same and cause hash collisions in VolumeIDs that PMEM-CSI generates.

Despite the promise in comment "optional, defaults to DefaultIDGenerator" it does not work without explicit init.value in Config (which I added in separate comment). Without that initialization, sc.Config.IDGen remains nil and causes tester code panic when sc.ConfigIDGen. method is called.

@okartau
Copy link
Contributor Author

okartau commented Sep 23, 2019

This is a subset of #401. Can we merge that instead?

indeed, it is. somehow, #401 gets tests running without adding IDGen to Config ?

@pohly
Copy link
Contributor

pohly commented Sep 23, 2019 via email

@okartau
Copy link
Contributor Author

okartau commented Sep 23, 2019

yes as I explained in comment above. If I just made change to 2.2.0, test code paniced as sc.Config.IDGen was nil. Code started to run when I added IDGen init in Config.

@pohly
Copy link
Contributor

pohly commented Sep 23, 2019

yes as I explained in comment above. If I just made change to 2.2.0, test code paniced as sc.Config.IDGen was nil. Code started to run when I added IDGen init in Config.

Hmm, then why did the PR test of #401 pass?

@okartau
Copy link
Contributor Author

okartau commented Sep 23, 2019

no idea. My first thought after I saw the panic was that there is something else involved which my isolated version step-up did not bring in. I tried to find it, but IDGen change seems quite well isolated. So I went on and created workaround using Config init.line.
Now with bigger change working OK, my first idea gets more support again.

@pohly
Copy link
Contributor

pohly commented Sep 23, 2019

#401 passed PR testing because... no E2E tests ran (https://cloudnative-k8sci.southcentralus.cloudapp.azure.com/blue/organizations/jenkins/pmem-csi/detail/PR-401/2/pipeline/58).

That is the Achilles heel of automatically choosing which tests to run in the code: if choosing the tests is buggy, testing may silently not run as intended.

I'll investigate that in #401.

@@ -65,6 +65,7 @@ var _ = Describe("sanity", func() {
// and deletes all extra entries that it does not know about.
TargetPath: "/var/lib/kubelet/plugins/kubernetes.io/csi/pv/pmem-sanity-target.XXXXXX",
StagingPath: "/var/lib/kubelet/plugins/kubernetes.io/csi/pv/pmem-sanity-staging.XXXXXX",
IDGen: &sanity.DefaultIDGenerator{},
Copy link
Contributor

@pohly pohly Sep 23, 2019

Choose a reason for hiding this comment

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

This shouldn't be necessary. I think it's a bug in csi-test, which we should fix there: https://github.com/kubernetes-csi/csi-test/blob/82b05190c167c52bb6d5aaf2e1d7c833fa539783/pkg/sanity/sanity.go#L161-L163 was added to Test, but not GinkgoTest.

We should have a common function that is used by both code paths to sanitize the config.

@okartau as you found this, can you do the upstream fix?

In this repo we can keep IDGen: &sanity.DefaultIDGenerator{} as a temporary workaround for 2.2.0, but there should be a TODO comment above it about removing it.

Copy link
Contributor

Choose a reason for hiding this comment

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

@okartau okartau mentioned this pull request Sep 24, 2019
@okartau okartau force-pushed the try-csi-test-220 branch 3 times, most recently from 0642817 to ae6b5bf Compare October 8, 2019 05:36
@okartau okartau changed the title Step csi-test up to 2.2.0 WIP: try with csi-test upgraded to 2.2.0 and change of #393 added Oct 8, 2019
This requires to change claim size from 1MB to 110 MB,
otherwise files created by test will not fit (needs 102 MB).
@okartau
Copy link
Contributor Author

okartau commented Oct 15, 2019

closing as devel stepped up to csi-test 2.2.0

@okartau okartau closed this Oct 15, 2019
@okartau okartau deleted the try-csi-test-220 branch February 5, 2020 14:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants