-
Notifications
You must be signed in to change notification settings - Fork 40k
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
feat(e2e): refactor hard-coded provision size #78306
feat(e2e): refactor hard-coded provision size #78306
Conversation
Welcome @hoyho! |
@hoyho: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi @hoyho. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/sig storage |
there shouldn't be such merge commits. please squash the change into one commit. |
/release-note-none |
55d845c
to
3bc62cb
Compare
/ok-to-test |
/assign @jsafrane |
WIP |
075da07
to
ef57183
Compare
ef57183
to
37e56a8
Compare
/test pull-kubernetes-e2e-gce-storage-slow |
37e56a8
to
0017048
Compare
/retest |
/test pull-kubernetes-e2e-gce-100-performance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we have some test which actually writes quite a bit of data? volume IO
or something? That test then may need a larger minimum volume size.
I can't think of a reason why a test should have a maximum volume size.
@@ -80,6 +81,9 @@ func initHostPathCSIDriver(name string, capabilities map[testsuites.Capability]b | |||
SupportedFsType: sets.NewString( | |||
"", // Default fsType | |||
), | |||
SupportedSizeRange: volume.SizeRange{ | |||
Min: "5Gi", | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed. The hostpath driver is one of those drivers where we can be sure that it has no minimum size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed. The hostpath driver is one of those drivers where we can be sure that it has no minimum size.
I am afraid the hostpath driver should have a minimum size 1Mb?
From source code here https://github.com/kubernetes-csi/csi-driver-host-path/blob/3488dc7f994e33485629b86b69a6f34ebb7ef2d9/pkg/hostpath/hostpath.go#L181 If the volume access type is 'block', then the driver will call fallocate
with size unit M .
Too small size will be invalid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I was thinking of filesystem mode. For block mode I am not sure whether the driver should round up internally - this sounds like a bug in the driver.
Anyway, let's then keep the minimum size.
// provisioned volumes. Default is "5GiB". | ||
ClaimSize string | ||
// provisioned volumes. | ||
SupportedSizeRange volume.SizeRange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ClaimSize
must be replaced with SupportedSizeRange
to match the field name.
test/e2e/storage/testsuites/base.go
Outdated
@@ -181,7 +186,7 @@ type genericVolumeTestResource struct { | |||
|
|||
var _ TestResource = &genericVolumeTestResource{} | |||
|
|||
func createGenericVolumeTestResource(driver TestDriver, config *PerTestConfig, pattern testpatterns.TestPattern) *genericVolumeTestResource { | |||
func createGenericVolumeTestResource(driver TestDriver, config *PerTestConfig, pattern testpatterns.TestPattern, tsSupportedSizeRange volume.SizeRange) *genericVolumeTestResource { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ts
prefix is non-obvious here. What does it stand for? "Test"?
What about testVolumeSizeRange
as variable name?
test/e2e/storage/testsuites/base.go
Outdated
@@ -214,7 +219,11 @@ func createGenericVolumeTestResource(driver TestDriver, config *PerTestConfig, p | |||
case testpatterns.DynamicPV: | |||
framework.Logf("Creating resource for dynamic PV") | |||
if dDriver, ok := driver.(DynamicPVTestDriver); ok { | |||
claimSize := dDriver.GetClaimSize() | |||
var err error | |||
dSupportedSizeRange := dDriver.GetDriverInfo().SupportedSizeRange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here - does "d" stand for "driver" or "dynamic"? Better spell it out.
For consistency with the proposed "testVolumeSizeRange", how about "driverVolumeSizeRange"?
@@ -49,6 +50,10 @@ func InitMultiVolumeTestSuite() TestSuite { | |||
testpatterns.BlockVolModePreprovisionedPV, | |||
testpatterns.BlockVolModeDynamicPV, | |||
}, | |||
supportedSizeRange: volume.SizeRange{ | |||
Min: "1Mi", | |||
Max: "10Gi", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the test have a max size? I don't think it needs one.
@@ -65,6 +65,10 @@ func InitSubPathTestSuite() TestSuite { | |||
testpatterns.DefaultFsDynamicPV, | |||
testpatterns.NtfsDynamicPV, | |||
}, | |||
supportedSizeRange: volume.SizeRange{ | |||
Min: "1Mi", | |||
Max: "10Gi", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here.
@@ -57,6 +58,10 @@ func InitVolumeExpandTestSuite() TestSuite { | |||
testpatterns.DefaultFsDynamicPVAllowExpansion, | |||
testpatterns.BlockVolModeDynamicPVAllowExpansion, | |||
}, | |||
supportedSizeRange: volume.SizeRange{ | |||
Min: "1Mi", | |||
Max: "10Gi", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here.
@@ -68,6 +68,10 @@ func InitVolumeIOTestSuite() TestSuite { | |||
testpatterns.DefaultFsPreprovisionedPV, | |||
testpatterns.DefaultFsDynamicPV, | |||
}, | |||
supportedSizeRange: volume.SizeRange{ | |||
Min: "1Mi", | |||
Max: "10Gi", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here.
@@ -60,6 +61,10 @@ func InitVolumeModeTestSuite() TestSuite { | |||
testpatterns.BlockVolModePreprovisionedPV, | |||
testpatterns.BlockVolModeDynamicPV, | |||
}, | |||
supportedSizeRange: volume.SizeRange{ | |||
Min: "1Mi", | |||
Max: "10Gi", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here.
@@ -71,6 +71,10 @@ func InitVolumesTestSuite() TestSuite { | |||
testpatterns.BlockVolModePreprovisionedPV, | |||
testpatterns.BlockVolModeDynamicPV, | |||
}, | |||
supportedSizeRange: volume.SizeRange{ | |||
Min: "1Mi", | |||
Max: "10Gi", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here.
test/e2e/storage/testsuites creates volumes dynamically. Initially, the size of those volumes was hard-coded in the test, which prevented using the tests with storage backends that couldn't support that hard-coded size
0017048
to
b5c1432
Compare
/test pull-kubernetes-kubemark-e2e-gce-big |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hoyho, msau42 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…ic-size feat(e2e): refactor hard-coded provision size
test/e2e/storage/testsuites creates volumes dynamically. Initially, the size of those volumes was
hard-coded in the test, which prevented using the tests with storage backends that couldn't support
that hard-coded size
What type of PR is this?
/kind feature
What this PR does / why we need it:
some e2e test will fail due to the hard coding volume size 5Gi and some
diver not support.
previously, there's a discussion and PR to solve this. But after half year,
we need to redo it base on PR because some code have changed and not easy to rebase or test
see #72080
Which issue(s) this PR fixes:
Fixes #72080
Special notes for your reviewer:
Does this PR introduce a user-facing change?: