Structure is as follows:
Describe("SGX plugin")
BeforeEach("deploys plugin")
Context("When device resources are available")
BeforeEach("checks if resources are available")
It("runs a pod requesting resources")
AfterEach("undeploys plugin")
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
move duplicate code for testing plugins using operator to
operator module
replace the code for deploying operator webhook in operator module
with the code using utils.Kubectl to make simple for undeploying
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
setInitContainer() adds "init-sriov-numvfs" to initContainers
but uses initcontainerName constant to search where to add
the QAT configMap volumeMount. Fix by moving all code to use
the const.
It was also noticed in the controller logs that setting Pod
Volumes is not idempotent but broken DaemonSet gets created:
""intel-device-plugins-manager: Reconciler error "err="DaemonSet.apps
\"intel-qat-plugin\" is invalid: spec.template.spec.volumes[6].name:
Duplicate value: \"qat-config\"" controller="qatdeviceplugin"
controllerGroup="deviceplugin.intel.com"
Finally, change 'qat-config' to 'intel-qat-config-volume' to
better describe that it's a volume.
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
runTests=4 is dsa test, and it does not run anything for now.
So, use runTests=1, which is symmetric test code.
In addition, make CpaSampleCode's params const and add comments
for the sample codes' param numbering.
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
to mitigate spurious errors with:
E0515 15:28:06.626887 1995892 listener.go:48] "controller-runtime/metrics:
metrics server failed to listen. You may want to disable the metrics
server or use another port if it is due to conflicts" err="error lis
tening on :8080: listen tcp :8080: bind: address already in use"
disable metrics completely. Moreover, check for error value from
NewManager() before proceeding with the tests to avoid crashes.
This makes envtest more robust but the up()/down() logic needs
careful review to ensure there are no race conditions.
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
k8s 1.27.x triggers build errors on controller-runtime 0.14.x
so we will need to update to 0.15.x at the same time.
Changes include:
* k8s e2e framework moved to use Ginkgo context so we add
test context to all our test nodes.
* adapt Ginkgo parameter modifications.
* adapt SGX admissionwebhook to InjectDecoder removal.
* adapt deviceplugins and FPGA CRDs to controller-runtime
API changes.
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
- add /usr/share/qat/calgary32 necessary for running dc test
to Dockerfile
- add e2e test for dc that runs cpa-sample with different
resource and command.
- remove openssl yaml file and use podSpec instead for cy test
- make a common func runCpaSampleCode for both cy and dc test
that have same process with a few differences
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
In the e2e test running in CI/CD, crypto-perf cannot be run.
So, we do not make it run by default.
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
Add a process to create a configMap for cy service
The structure of e2e test flows is as follows:
BeforeEach(createing a configMap)
JustBeforeEach(deploying QAT plugin)
Context(
- BeforeEach(checks if resources are available)
- It(runs a test pod)
[- It(runs another test pod)]*
)
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
'AfterEach' was made to prevent the failure of a plugin pod that
occurs due to 'BeforeEach' that deploys a plugin pod. If it is
inside a 'Context' it will still occur the same problem. Since
current e2e tests have one 'Context' in general, problems were not
visible, but it still have problem in logic and would cause the
same problems if more 'Contexts' are made. So, this commit fixes
'AfterEach' to be in the correct location.
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
Though namespace is deleted after each It(), it does not ensure
that it is deleted. Because of this reason, device plugin did not
get deleted before the next one is deployed. This can cause a
temporary crash of the new plugin and sometimes becomes the cause
of e2e test's failure. This commit fixes it by ensuring previous
device plugin gets deleted after each run.
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
Structure is as follows:
Describe("QAT plugin")
BeforeEach("deploys plugin")
Context("When device resources are available")
BeforeEach("checks if resources are available")
It("runs a pod requesting resources")
It("runs another pod requesting resources if there is")
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
Structure is as follows:
Describe("IAA plugin")
Describe("without using operator")
BeforeEach("deploys plugin")
Context("When device resources are available")
BeforeEach("checks if resources are available")
It("runs a pod requesting resources")
Describe("with using operator")
It("deploys with operator")
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
Structure is as follows:
Describe("DSA plugin")
Describe("without using operator")
BeforeEach("deploys plugin")
Context("When device resources are available")
BeforeEach("checks if resources are available")
It("runs a pod requesting resources")
Describe("with using operator")
It("deploys with operator")
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
Structure is as follows:
Describe("DLB plugin")
BeforeEach("deploys plugin")
Context("When device resources are available")
BeforeEach("checks if resources are available")
It("runs a pod requesting resources")
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
Apparently some of simulated CI nodes have out of sync boot configuration.
In order to be able to get the configuration in sync, the e2e NFD timeout
should be increased (it takes 250-260 seconds for NFD to get up with the right
boot parameters in the simulated environments).
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
initcontainer enables vfs and configures vfs
- only first pf is used to configure a vf
- only one vf is configured from the pf
add dlb-initcontainer kustomize overlay
update CRD to have initImage
implment operator to run initcontainer
update e2e test to run initcontainer overlay
update envtest to test initimage
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
Added testssl.sh switches to add more tests
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Jason Culligan <jason.culligan@intel.com>
Due to a regression in k8s.io@v1.25, WaitForPodsWithLabelRunningReady()
ignored user provided timeout and defaulted to 60s. In some cases, NFD
needs more than that to the tests fail.
Workaround the problem by moving to use WaitForPodsRunningReady() with
minPods=2 (nfd-master and at least one nfd-worker).
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
- used different pods for PF and VF workloads
- increased waiting timeout to 200s
- used 'epoll' waiting mode for test apps
- decreased amount of packets from 128 to 8 for test apps
- output pod logs
- done small code optimisations
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>