-
Notifications
You must be signed in to change notification settings - Fork 35
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
Verify environment variables in e2e test #73
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: nojnhuh The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
||
kubectl wait --for=condition=Ready -n gpu-test4 pod/pod0 --timeout=120s | ||
kubectl wait --for=condition=Ready -n gpu-test4 pod/pod1 --timeout=120s | ||
gpu_test_4=$(kubectl get pods -n gpu-test4 | grep -c 'Running') | ||
if [ $gpu_test_4 != 2 ]; then | ||
echo "gpu_test_4 $gpu_test_4 failed to match against 1 expected pods" | ||
echo "gpu_test_4 $gpu_test_4 failed to match against 2 expected pods" |
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.
FYI I did sneak in this typo fix also.
@nojnhuh this is definitely an improvement, thanks. Do you have a feel for the effort required to actually test the expected behaviour as called out in the README? |
Do you mean checking at least as far as whether certain containers have the same or different GPUs allocated based on the environment variables defined in each container? And that the correct TimeSlicing/SpacePartitioning parameters are set? I could definitely do that, but it might get a little messy in a bash script. |
I pushed these changes in a new commit which I plan to squash if we're good with those changes. /hold |
@@ -35,6 +72,36 @@ if [ $gpu_test_1 != 2 ]; then | |||
exit 1 | |||
fi | |||
|
|||
gpu_test1_pod0_ctr0_logs=$(kubectl logs -n gpu-test1 pod0 -c ctr0) |
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.
I'm very open to suggestions for ways to make this less of a copy-paste nightmare.
This change adds new steps to the e2e test to verify that each container in each pod contains logs showing the presence of any
GPU_DEVICE_*
environment variables. I checked that this at least catches where the CDI config is not setup properly, but didn't try all of the other possible failure modes here.Fixes #57