-
Notifications
You must be signed in to change notification settings - Fork 561
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
Don't fail making mount dirs if they already exist #272
Don't fail making mount dirs if they already exist #272
Conversation
Hi @chrishenzie. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
@@ -189,7 +189,7 @@ var _ = ginkgo.Describe("[efs-csi] EFS CSI", func() { | |||
defer func() { _ = f.ClientSet.CoreV1().PersistentVolumes().Delete(pvRoot.Name, &metav1.DeleteOptions{}) }() | |||
|
|||
ginkgo.By(fmt.Sprintf("Creating pod to make subpaths /a and /b")) | |||
pod := e2epod.MakePod(f.Namespace.Name, nil, []*v1.PersistentVolumeClaim{pvcRoot}, false, "mkdir /mnt/volume1/a && mkdir /mnt/volume1/b") | |||
pod := e2epod.MakePod(f.Namespace.Name, nil, []*v1.PersistentVolumeClaim{pvcRoot}, false, "mkdir -p /mnt/volume1/a && mkdir -p /mnt/volume1/b") |
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.
Maybe the test should write to a randomly generated directory name so that we can validate in the test that read/write works?
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.
Also how similiar is this test case to https://github.com/kubernetes/kubernetes/blob/5ead4974e0133286b801915b2d8de24bb64e36aa/test/e2e/storage/testsuites/subpath.go#L291?
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 I guess this test case is creating two separate pvs for each subpath
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.
Either way I think the test should clean up after itself, i.e. not have weird sideffects like this. I am fine with current form of PR since this part is basically just setting up for the "real " test and if write is failing here then another test should cover that.
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 test is testing the workaround to issue #100, where due to how kubernetes treats volumeHandle , two volumemounts w/ same* volumeHandle won't be mounted, so we create pvs with different volumehandles like fs:/a and fs:/b (probably I should have linked it in comment of test)
/ok-to-test |
cbad62d
to
0ed8ddd
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrishenzie, wongma7 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 |
Is this a bug fix or adding new feature?
Bug fix.
What is this PR about? / Why do we need it?
When the
should mount different paths on same volume on same node
e2e test is re-ran more than once against the same pre-provisioned EFS file system, the test fails because the first pod in the test repeatedly crashloops. The pod crashloops becausemkdir
fails if the directory already exists. This fixes the issue by ignoring if the directory already exists.A followup to this might include adding a cleanup step that deletes the files / directories placed on the EFS file system in these tests. Thoughts on this?
What testing is done?
@msau42 @wongma7