Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

RFC: #420 + Device manager tests in same cluster as e2e tests #474

Closed
wants to merge 7 commits into from

Conversation

avalluri
Copy link
Contributor

To avoid extra time consumed to create a new VM to run device manager tests in CI, Now we run them at the time of running e2e tests so that we can reuse the same cluster.

DeviceManager.FlushDeviceData() is unused anywhere in the code and could not see
any such need going forward.
Defined package level error codes. The implementations are supposed to return
these error codes. And also revised the error message formatting and wrapping
using go-1.13 fmt package.
Discussion on issue intel#413, raised a requirement that PMEM-CSI should handle the
DeleteVolume() call for volumes that the underlined device already deleted
manually by the admin.  So for such a volume we just ignore and return no error
in DeviceManager.DeleteVolume(). This also makes DeleteVolume() idempotent.
…paces

While deleting a namespace ndctl might still keeep the namespace inactive
and with size zero. And also there might be possible that the unsuccessful
deletes via Region.DestroyNamespace() might left the namespace disabled but not
deleted, so we should not ignore them too.

This change, considers the size of the found namespace and considers only if
it's non-zero.
Tests for both device managers: direct and LVM.

LVM tests used file backed loop device to mimic an logical volume group, This
requires /dev/loop-control file on host where the tests are run.

Intentionally disable running these device manager unit tests as it requires sudo/root user
permission.
Device manager tests need root/sudo user permission, and loop control device on
host where they run. So to avoid this we run these tests under a new virtual
machine.

Added new make target 'run_dm_tests' which sets up pmem-csi-${CLUSTER}-worker1
node if not exists and runs the device manager unit tests in it.

To make use of existing test cluster scripts, made needed changes to them to
support creating a single pmem node.
As creating a new VM is expensive, Hence running device manager tests in the
same cluster used by e2e tests. It uses the first worker of the populated
cluster to run tests.
@avalluri avalluri force-pushed the devicemanager+dmtests-in-e2e branch from 9393553 to 8ea3940 Compare November 22, 2019 08:49
@avalluri
Copy link
Contributor Author

@pohly Does this change makes any sense for your concern about the increase in CI time.

@pohly
Copy link
Contributor

pohly commented Nov 22, 2019

Does this change makes any sense for your concern about the increase in CI time.

I don't want special cases for individual tests. If run_dm_tests is how you intend to run this test that's fine, but I prefer a uniform way of running tests.

@avalluri
Copy link
Contributor Author

Closing this in favour of #473

@avalluri avalluri closed this Nov 26, 2019
@avalluri avalluri deleted the devicemanager+dmtests-in-e2e branch December 12, 2019 14:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants