Skip to content

Commit

Permalink
Update the custom option for jobs pynfs and pynfs-acl to abort after …
Browse files Browse the repository at this point in the history
…4 hours

Signed-off-by: Rakshitha Kamath <[email protected]>
  • Loading branch information
rakshithakamath94 committed Jul 20, 2023
1 parent 2bd1fc5 commit f68ff0b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
19 changes: 12 additions & 7 deletions build_scripts/cthon04/client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ set -x

# install build and runtime dependencies
yum -y install git gcc nfs-utils time make
if [ "${CENTOS_VERSION}" == "9s" ]; then
if [ "${CENTOS_VERSION}" == "8s" ] || [ "${CENTOS_VERSION}" == "9s" ]; then
yum -y install libtirpc-devel
fi

#Logic to generate corefiles
echo "/tmp/cores/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
mkdir -p /tmp/cores

# checkout the connectathon tests
git clone --depth=1 git://git.linux-nfs.org/projects/steved/cthon04.git
cd cthon04
Expand All @@ -27,13 +31,14 @@ make all
# v3 mount
mkdir -p /mnt/nfsv3
mount -t nfs -o vers=3 ${SERVER}:${EXPORT} /mnt/nfsv3
timeout -s SIGKILL 240s ./server -a -p ${EXPORT} -m /mnt/nfsv3 ${SERVER}
TIMED_OUT=$?
./server -a -p ${EXPORT} -m /mnt/nfsv3 ${SERVER}
#timeout -s SIGKILL 240s ./server -a -p ${EXPORT} -m /mnt/nfsv3 ${SERVER}
#TIMED_OUT=$?
#Return code will be 124 if it ends the process by using SIGTERM for not getting any response. 137 when used SIGKILL to kill the process
if [ $TIMED_OUT == 137 ]; then
echo -e "The process timed out after 4 minute!\nLooks like the Server process to see if it has crashed!"
exit 1
fi
#if [ $TIMED_OUT == 137 ]; then
# echo -e "The process timed out after 4 minute!\nLooks like the Server process to see if it has crashed!"
# exit 1
#fi

# v4 mount
mkdir -p /mnt/nfsv4
Expand Down
1 change: 1 addition & 0 deletions jobs/cthon04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
wrappers:
- cleanup-ws
- terminate_stuck_build
- gerrithub_key

publishers:
Expand Down
15 changes: 8 additions & 7 deletions jobs/macros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,14 @@
variable: GERRITHUB_KEY

#Enable this to over-ride the configuration under Manage Jenkins > Configure System > Global Build Time Out
#- wrapper:
# name: terminate_stuck_build
# wrappers:
# - timeout:
# timeout: 120
# abort: true
# type: no-activity
#This one is meant for pynfs jobs, setting the value to 4 hours as a part of my testing!
- wrapper:
name: terminate_stuck_build
wrappers:
- timeout:
timeout: 240
abort: true
type: no-activity

- publisher:
name: post_build_task_return-node
Expand Down
1 change: 1 addition & 0 deletions jobs/pynfs-acl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

wrappers:
- gerrithub_key
- terminate_stuck_build
- cleanup-ws

publishers:
Expand Down
1 change: 1 addition & 0 deletions jobs/pynfs-ceph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
project-type: freestyle
concurrent: false
allow-manual-triggers: true
disabled: true

scm:
- ci-tests
Expand Down
1 change: 1 addition & 0 deletions jobs/pynfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

wrappers:
- gerrithub_key
- terminate_stuck_build
- cleanup-ws

triggers:
Expand Down

0 comments on commit f68ff0b

Please sign in to comment.