File tree 6 files changed +19
-11
lines changed
6 files changed +19
-11
lines changed Original file line number Diff line number Diff line change 33
33
- name : ctr0
34
34
image : ubuntu:22.04
35
35
command : ["bash", "-c"]
36
- args : ["export; sleep 9999"]
36
+ args : ["export; trap 'exit 0' TERM; sleep 9999 & wait "]
37
37
resources :
38
38
claims :
39
39
- name : gpu
54
54
- name : ctr0
55
55
image : ubuntu:22.04
56
56
command : ["bash", "-c"]
57
- args : ["export; sleep 9999"]
57
+ args : ["export; trap 'exit 0' TERM; sleep 9999 & wait "]
58
58
resources :
59
59
claims :
60
60
- name : gpu
Original file line number Diff line number Diff line change 35
35
- name : ctr0
36
36
image : ubuntu:22.04
37
37
command : ["bash", "-c"]
38
- args : ["export; sleep 9999"]
38
+ args : ["export; trap 'exit 0' TERM; sleep 9999 & wait "]
39
39
resources :
40
40
claims :
41
41
- name : gpus
Original file line number Diff line number Diff line change @@ -31,14 +31,14 @@ spec:
31
31
- name : ctr0
32
32
image : ubuntu:22.04
33
33
command : ["bash", "-c"]
34
- args : ["export; sleep 9999"]
34
+ args : ["export; trap 'exit 0' TERM; sleep 9999 & wait "]
35
35
resources :
36
36
claims :
37
37
- name : shared-gpu
38
38
- name : ctr1
39
39
image : ubuntu:22.04
40
40
command : ["bash", "-c"]
41
- args : ["export; sleep 9999"]
41
+ args : ["export; trap 'exit 0' TERM; sleep 9999 & wait "]
42
42
resources :
43
43
claims :
44
44
- name : shared-gpu
Original file line number Diff line number Diff line change 32
32
- name : ctr0
33
33
image : ubuntu:22.04
34
34
command : ["bash", "-c"]
35
- args : ["export; sleep 9999"]
35
+ args : ["export; trap 'exit 0' TERM; sleep 9999 & wait "]
36
36
resources :
37
37
claims :
38
38
- name : shared-gpu
53
53
- name : ctr0
54
54
image : ubuntu:22.04
55
55
command : ["bash", "-c"]
56
- args : ["export; sleep 9999"]
56
+ args : ["export; trap 'exit 0' TERM; sleep 9999 & wait "]
57
57
resources :
58
58
claims :
59
59
- name : shared-gpu
Original file line number Diff line number Diff line change @@ -54,31 +54,31 @@ spec:
54
54
- name : ts-ctr0
55
55
image : ubuntu:22.04
56
56
command : ["bash", "-c"]
57
- args : ["export; sleep 9999"]
57
+ args : ["export; trap 'exit 0' TERM; sleep 9999 & wait "]
58
58
resources :
59
59
claims :
60
60
- name : shared-gpus
61
61
request : ts-gpu
62
62
- name : ts-ctr1
63
63
image : ubuntu:22.04
64
64
command : ["bash", "-c"]
65
- args : ["export; sleep 9999"]
65
+ args : ["export; trap 'exit 0' TERM; sleep 9999 & wait "]
66
66
resources :
67
67
claims :
68
68
- name : shared-gpus
69
69
request : ts-gpu
70
70
- name : sp-ctr0
71
71
image : ubuntu:22.04
72
72
command : ["bash", "-c"]
73
- args : ["export; sleep 9999"]
73
+ args : ["export; trap 'exit 0' TERM; sleep 9999 & wait "]
74
74
resources :
75
75
claims :
76
76
- name : shared-gpus
77
77
request : sp-gpu
78
78
- name : sp-ctr1
79
79
image : ubuntu:22.04
80
80
command : ["bash", "-c"]
81
- args : ["export; sleep 9999"]
81
+ args : ["export; trap 'exit 0' TERM; sleep 9999 & wait "]
82
82
resources :
83
83
claims :
84
84
- name : shared-gpus
Original file line number Diff line number Diff line change @@ -63,4 +63,12 @@ if [ $gpu_test_5 != 1 ]; then
63
63
exit 1
64
64
fi
65
65
66
+ # test that deletion is fast (less than the default grace period of 30s)
67
+ # see https://github.com/kubernetes/kubernetes/issues/127188 for details
68
+ kubectl delete -f demo/gpu-test1.yaml --timeout=25s
69
+ kubectl delete -f demo/gpu-test2.yaml --timeout=25s
70
+ kubectl delete -f demo/gpu-test3.yaml --timeout=25s
71
+ kubectl delete -f demo/gpu-test4.yaml --timeout=25s
72
+ kubectl delete -f demo/gpu-test5.yaml --timeout=25s
73
+
66
74
echo " test ran successfully"
You can’t perform that action at this time.
0 commit comments