This repository was archived by the owner on Jun 28, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +41
-25
lines changed
popular_docker_hub_images Expand file tree Collapse file tree 8 files changed +41
-25
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,15 @@ set -e
10
10
SCRIPT_PATH=$( dirname " $( readlink -f " $0 " ) " )
11
11
source " ${SCRIPT_PATH} /../../.ci/lib.sh"
12
12
source " ${SCRIPT_PATH} /crio_skip_tests.sh"
13
+ source " ${SCRIPT_PATH} /../../metrics/lib/common.bash"
13
14
source /etc/os-release || source /usr/lib/os-release
14
15
15
16
crio_repository=" github.com/kubernetes-incubator/cri-o"
16
17
crio_repository_path=" $GOPATH /src/${crio_repository} "
17
18
19
+ # Check no processes are left behind
20
+ check_processes
21
+
18
22
# devicemapper device and options
19
23
LVM_DEVICE=${LVM_DEVICE:-/ dev/ vdb}
20
24
DM_STORAGE_OPTIONS=" --storage-driver devicemapper --storage-opt dm.directlvm_device=${LVM_DEVICE}
Original file line number Diff line number Diff line change 5
5
# SPDX-License-Identifier: Apache-2.0
6
6
#
7
7
8
+ SCRIPT_PATH=$( dirname " $( readlink -f " $0 " ) " )
9
+ source " ${SCRIPT_PATH} /../../metrics/lib/common.bash"
10
+
8
11
export KUBECONFIG=/etc/kubernetes/admin.conf
9
12
sudo -E kubeadm reset --cri-socket=/var/run/crio/crio.sock
10
13
@@ -26,3 +29,6 @@ sudo ip link set dev cni0 down
26
29
sudo ip link set dev flannel.1 down
27
30
sudo ip link del cni0
28
31
sudo ip link del flannel.1
32
+
33
+ # Check no processes are left behind
34
+ check_processes
Original file line number Diff line number Diff line change 9
9
10
10
SCRIPT_PATH=$( dirname " $( readlink -f " $0 " ) " )
11
11
source " ${SCRIPT_PATH} /../../.ci/lib.sh"
12
+ source " ${SCRIPT_PATH} /../../metrics/lib/common.bash"
13
+
14
+ # Check no processes are left behind
15
+ check_processes
12
16
13
17
# The next workaround is to be able to communicate between pods
14
18
# Issue: https://github.com/kubernetes/kubernetes/issues/40182
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ set -e
10
10
SCRIPT_PATH=$( dirname " $( readlink -f " $0 " ) " )
11
11
source " ${SCRIPT_PATH} /openshiftrc"
12
12
source " ${SCRIPT_PATH} /../../.ci/lib.sh"
13
+ source " ${SCRIPT_PATH} /../../metrics/lib/common.bash"
14
+
15
+ # Check no processes are left behind
16
+ check_processes
13
17
14
18
echo " Start crio service"
15
19
sudo systemctl start crio
Original file line number Diff line number Diff line change 9
9
10
10
SCRIPT_PATH=$( dirname " $( readlink -f " $0 " ) " )
11
11
source " ${SCRIPT_PATH} /openshiftrc"
12
+ source " ${SCRIPT_PATH} /../../metrics/lib/common.bash"
12
13
13
14
echo " Terminate Openshift master and node processes"
14
15
pgrep openshift | xargs sudo kill -9
15
16
16
17
echo " Stop cri-o service"
17
18
sudo systemctl stop crio
19
+
20
+ # Check no processes are left behind
21
+ check_processes
Original file line number Diff line number Diff line change 10
10
source ${BATS_TEST_DIRNAME} /../../metrics/lib/common.bash
11
11
12
12
setup () {
13
+ # Check that processes are not running
14
+ run check_processes
15
+ echo " $output "
16
+ [ " $status " -eq 0 ]
13
17
clean_env
14
18
}
15
19
@@ -372,4 +376,8 @@ setup() {
372
376
373
377
teardown () {
374
378
clean_env
379
+ # Check that processes are not running
380
+ run check_processes
381
+ echo " $output "
382
+ [ " $status " -eq 0 ]
375
383
}
Original file line number Diff line number Diff line change @@ -23,13 +23,8 @@ number_of_retries=5
23
23
24
24
setup () {
25
25
# Check that processes are not running
26
- run check_processes ${PROXY_PATH}
27
- [ " $status " -eq 0 ]
28
-
29
- run check_processes ${SHIM_PATH}
30
- [ " $status " -eq 0 ]
31
-
32
- run check_processes ${HYPERVISOR_PATH}
26
+ run check_processes
27
+ echo " $output "
33
28
[ " $status " -eq 0 ]
34
29
35
30
interfaces=$( basename -a /sys/class/net/* )
@@ -69,13 +64,8 @@ teardown() {
69
64
docker service remove " ${SERVICE_NAME} "
70
65
docker swarm leave --force
71
66
72
- # Check that processes are not left by Swarm
73
- run check_processes ${PROXY_PATH}
74
- [ " $status " -eq 0 ]
75
-
76
- run check_processes ${SHIM_PATH}
77
- [ " $status " -eq 0 ]
78
-
79
- run check_processes ${HYPERVISOR_PATH}
67
+ # Check that processes are not running
68
+ run check_processes
69
+ echo " $output "
80
70
[ " $status " -eq 0 ]
81
71
}
Original file line number Diff line number Diff line change @@ -246,16 +246,12 @@ kill_processes_before_start() {
246
246
# Normally used to look for errant processes, and hence prints
247
247
# a warning
248
248
check_processes () {
249
- process=$1
250
-
251
- [[ -z " ${process} " ]] && return 0
252
-
253
- pgrep -f " $process "
254
- if [ $? -eq 0 ]; then
255
- warning " Found unexpected ${process} present"
256
- ps -ef | grep $process
257
- return 1
258
- fi
249
+ general_processes=( ${PROXY_PATH} ${HYPERVISOR_PATH} ${SHIM_PATH} )
250
+ for i in " ${general_processes[@]} " ; do
251
+ if pgrep -f " $i " ; then
252
+ die " Found unexpected ${i} present"
253
+ fi
254
+ done
259
255
}
260
256
261
257
# Generate a random name - generally used when creating containers, but can
You can’t perform that action at this time.
0 commit comments