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
Fix volumes e2e test to check fsType #70823
Conversation
Hi @mkimuram. 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. |
This PR will make fsType check as below:
I'm not sure csi gce actually works well, so I think that it would better to test |
/assign |
@@ -91,7 +91,7 @@ var _ = Describe("[sig-storage] GCP Volumes", func() { | |||
} | |||
|
|||
// Must match content of test/images/volumes-tester/nfs/index.html | |||
framework.TestVolumeClient(c, config, nil, tests) |
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.
nit, add comment a la framework.TestVolumeClient(c, config, nil, "" /* fsType */, tests)
for unnamed variables
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.
Thank you for your comment. I will fix all of them as suggested.
test/e2e/storage/drivers/csi.go
Outdated
@@ -186,6 +186,9 @@ func (g *gcePDCSIDriver) GetDynamicProvisionStorageClass(fsType string) *storage | |||
suffix := fmt.Sprintf("%s-sc", g.driverInfo.Name) | |||
|
|||
parameters := map[string]string{"type": "pd-standard"} | |||
if fsType != "" { | |||
parameters["fsType"] = fsType |
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.
I don't think we specify fsType in the storage class for GCE PD, it's actually passed in on NodeStageVolume
through the VolumeCapability
field that comes from the PVSource
.
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.
IIUC, CSI provisioner will add fsType to PVC if fsType is set in StorageClass on provision. So, fsType should also be passed to PV, as a result, it will be passed as a VolumeCapability
on NodeStageVolume
when attach is requested.
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.
oh cool, I didn't know that, thanks for the explanation!
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.
@davidz627 this will still cause pd csi driver to fail right? Should we be using the new namespaced fstype parameter?
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.
/hold
My understanding is PD csi tests in serial will start failing as is
@mkimuram I am testing this on the GCE PD CSI Driver now |
/test pull-kubernetes-e2e-kops-aws |
07cf3fc
to
2e8acd5
Compare
Update this PR with two commits:
I will check 1 to see what is happening. |
@@ -348,6 +354,9 @@ func (g *gcePDExternalCSIDriver) GetDriverInfo() *DriverInfo { | |||
func (g *gcePDExternalCSIDriver) SkipUnsupportedTest(pattern testpatterns.TestPattern) { | |||
framework.SkipUnlessProviderIs("gce", "gke") | |||
framework.SkipIfMultizone(g.driverInfo.Framework.ClientSet) | |||
if pattern.FsType == "xfs" { |
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.
is there a way to put this check in the "testsuite" skip checks instead of the driver skip tests? This skip "holds" for any driver that runs this test suite.
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.
is there a way to put this check in the "testsuite" skip checks instead of the driver skip tests? This skip "holds" for any driver that runs this test suite.
I think that moving this logic to skipUnsupportedTest
will make xfs tests skip for any drivers and any testsuites. However, to do so, we should blacklist unsupported distros instead of whitelisting just "ubuntu"
and "custom"
, because we are not sure which distro will be passed here. (In current code, it assumes that this code path in gce driver's SkipUnsupportedTest
reaches by only gce tests, so just whitelisting them is working fine.)
So, could you let me know which distro to blacklist?
(I guess that "gci"
is needed here and how about "debian"
and "coreos"
?)
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.
commit 07a456d will do above, assuming that only "gci"
should be blacklisted. If this isn't true, please point it out.
(Currently, xfs test seems running only on gce CI, so we can go ahead once we confirm that it is true in gce CI, and add blacklist when we need to add some more latter.)
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.
@msau42 @lookuptable do either of you know the answer to this? I am only aware of gci
not having xfs
support but there could be more
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.
For gce CI, blacklisting "gci" is fine, although we need to find a way to deal with "custom", which can be both ubuntu or gci. Can we check for the presence of xfs tools on the node?
Below log indicates that in-tree aws driver seems to fail in formatting or mounting ext3.
In-tree gce driver passes for both dynamic provisioning and pre-provisioned PV cases, so I suspect that this is in-tree aws driver issue. Note that in-tree aws driver doesn't run pre-provisioned PV case, because it doesn't define necessary methods like (I believe that #67195 has fixed aws drivers to at least not to fail when fsType is specified in provisioining, so this issue should happen after it.) |
GCE PD CSI driver will fail because fstype parameter is not supported on CreateVolume. This is part of a larger problem, I have a PR out here to fix. @mkimuram please keep an eye on it :) |
77784a6
to
5594b38
Compare
/retest |
I rebased the commits and updated |
tested and working with GCE PD CSI Driver now! Thanks @mkimuram |
/assign @saad-ali |
/hold cancel |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsafrane, mkimuram, saad-ali 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 |
/retest |
2 similar comments
/retest |
/retest |
@mkimuram: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Volumes test doesn't check fsType, as a result, e2e test which requires particular fsType could pass even when driver doesn't provide the right fsType. Also, current
gcePDCSIDriver.GetDynamicProvisionStorageClass
in e2e test code is broken, so this PR will also fix it.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #70822
Special notes for your reviewer:
/sig storage
Does this PR introduce a user-facing change?: