diff options
author | Theodore Ts'o <tytso@mit.edu> | 2023-07-03 13:50:49 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-07-03 16:07:01 -0400 |
commit | 1c347c58c31926d0dda62146f1e3d55dfa9c850d (patch) | |
tree | 8696ae2a8e515e153cce324e094f58d544c8fa17 | |
parent | 6158561878bda3e3dd98893400a0041091ce7ec2 (diff) | |
download | xfstests-bld-1c347c58c31926d0dda62146f1e3d55dfa9c850d.tar.gz |
gce-xfstests, test-appliance: disable the vm timeout when ltm runs tests
Add the --no-vm-timeout option to gce-xfststs which requests that the
test appliance disables the gce-finalize timer. This timer is
responsible for forcibly cutting the test run short after 24 hours.
When test vm is managed by ltm, when a test takes more than an hour,
the VM will be forcibly restarted. So we don't need the VM-level
timeout.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rwxr-xr-x | run-fstests/gce-xfstests | 7 | ||||
-rw-r--r-- | run-fstests/util/parse_cli | 5 | ||||
-rwxr-xr-x | test-appliance/files/root/kvm-xfstests.boot | 5 | ||||
-rwxr-xr-x | test-appliance/files/root/runtests.sh | 5 | ||||
-rw-r--r-- | test-appliance/files/usr/local/lib/gce-server/ltm/shard.go | 1 |
5 files changed, 22 insertions, 1 deletions
diff --git a/run-fstests/gce-xfstests b/run-fstests/gce-xfstests index 00e7b8ae..4caa14cd 100755 --- a/run-fstests/gce-xfstests +++ b/run-fstests/gce-xfstests @@ -1178,7 +1178,12 @@ fi if test -n "$GCE_OSLOGIN_2FA" then - ARG="$ARG enable-oslogin-2fa=GCE_OSLOGIN_2FA" + ARG="$ARG enable-oslogin-2fa=$GCE_OSLOGIN_2FA" +fi + +if test -n "$GCE_NO_VM_TIMEOUT" +then + ARG="$ARG gce_no_vm_timeout=$GCE_NO_VM_TIMEOUT" fi if test -n "$RUN_ON_LTM"; then diff --git a/run-fstests/util/parse_cli b/run-fstests/util/parse_cli index 8b1f4bb4..18b459b6 100644 --- a/run-fstests/util/parse_cli +++ b/run-fstests/util/parse_cli @@ -291,6 +291,7 @@ no-preemptible no-punch no-region-shard no-virtio-rng +no-vm-timeout no-zero numa: pmem-device @@ -587,6 +588,10 @@ while (( $# >= 1 )); do supported_flavors kvm NO_VIRTIO_RNG=yes ;; + --no-vm-timeout) + supported_flavors gce + GCE_NO_VM_TIMEOUT=yes + ;; --preemptible|--preempt) supported_flavors gce PREEMPTIBLE=yes diff --git a/test-appliance/files/root/kvm-xfstests.boot b/test-appliance/files/root/kvm-xfstests.boot index 49410b25..8137936f 100755 --- a/test-appliance/files/root/kvm-xfstests.boot +++ b/test-appliance/files/root/kvm-xfstests.boot @@ -202,5 +202,10 @@ else else /usr/local/lib/gce-add-metadata "kernel_version=$(uname -a)" & fi + if test -n "$(gce_attribute no_vm_timeout)" ; then + systemctl stop gce-finalize.timer + systemctl disable gce-finalize.timer + logger -i "Disabled gce-finalize timer" + fi fi fi diff --git a/test-appliance/files/root/runtests.sh b/test-appliance/files/root/runtests.sh index d2a0e6ef..23b2b280 100755 --- a/test-appliance/files/root/runtests.sh +++ b/test-appliance/files/root/runtests.sh @@ -246,6 +246,11 @@ if test -n "$RUN_ON_GCE" then cp /usr/local/lib/gce-local.config /root/xfstests/local.config . /usr/local/lib/gce-funcs + if test -n "$(gce_attribute no_vm_timeout)" ; then + systemctl stop gce-finalize.timer + systemctl disable gce-finalize.timer + logger -i "Disabled gce-finalize timer" + fi image=$(gcloud compute disks describe --format='value(sourceImage)' \ --zone "$ZONE" ${instance} | \ sed -e 's;https://www.googleapis.com/compute/v1/projects/;;' \ diff --git a/test-appliance/files/usr/local/lib/gce-server/ltm/shard.go b/test-appliance/files/usr/local/lib/gce-server/ltm/shard.go index bef49236..3c7632e3 100644 --- a/test-appliance/files/usr/local/lib/gce-server/ltm/shard.go +++ b/test-appliance/files/usr/local/lib/gce-server/ltm/shard.go @@ -91,6 +91,7 @@ func NewShardWorker(sharder *ShardScheduler, shardID string, config string, zone "--kernel", sharder.gsKernel, "--bucket-subdir", sharder.bucketSubdir, "--no-email", + "--no-vm-timeout", "-c", config, } |