Skip to content

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 #221

Open
@JacobGros

Description

@JacobGros

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions