csi-test icon indicating copy to clipboard operation
csi-test copied to clipboard

CSI sanity test 'check the presence of new volumes and absence of deleted ones in the volume list' can fail when server isn't idle

Open JacobGros opened this issue 6 years ago • 7 comments

The test (in pkg/sanity/controller.go) steps: Step 1: The test checks how many volumes are already present: vols, err := c.ListVolumes( context.Background(), &csi.ListVolumesRequest{}) totalVols := len(vols.GetEntries())

Step 2: The test adds and deletes a volume

Step 3: The test checks how many volumes are present again

vols, err = c.ListVolumes( context.Background(), &csi.ListVolumesRequest{}) Expect(len(vols.GetEntries())).To(Equal(totalVols))

The issue is that if someone else is using the server, the second time ListVolumesResponse.GetEntries is called, it is not guaranteed to be the same as when it was called the first time. The test is not accounting for other volumes being made/deleted while it runs, which can cause it to fail sometimes.

JacobGros avatar Sep 23 '19 16:09 JacobGros

That is correct. Any suggestions for how to solve this?

pohly avatar Sep 24 '19 07:09 pohly

Maybe only check volumes that have the prefix of "sanity"?

JacobGros avatar Sep 24 '19 13:09 JacobGros

/help /kind bug

msau42 avatar Oct 04 '19 00:10 msau42

@msau42: This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to this:

/help /kind bug

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.

k8s-ci-robot avatar Oct 04 '19 00:10 k8s-ci-robot

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Jan 02 '20 01:01 fejta-bot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

fejta-bot avatar Feb 01 '20 02:02 fejta-bot

/lifecycle frozen

msau42 avatar Feb 01 '20 02:02 msau42