Fail the fio job instead of exiting the process on a client error #202
Open
koolkhel
wants to merge 2 commits from
koolkhel/vitastor:fio-no-exit-on-error into master
pull from: koolkhel/vitastor:fio-no-exit-on-error
merge into: vitalif:master
vitalif:master
vitalif:primary-stickiness
vitalif:libvfn
vitalif:canceling
vitalif:immediate-repeering
vitalif:rdma-close-tcp
vitalif:use-degraded-writes
vitalif:fix-write-delete-flow
vitalif:openssl-3.0.12
vitalif:openssl-capture-secrets
vitalif:ignore-small-rdma-end
vitalif:encrypt-batch
vitalif:faster-peering-calc
vitalif:http-hello
vitalif:xxh3-bench
vitalif:create-user-etcd-based
vitalif:aesxts_streaming_nosupport
vitalif:refactor-heap-continue-write
vitalif:ston3lu-patch-0127
vitalif:rdma-credits
vitalif:heap-meta
vitalif:sendmsg-zc-no-more-error
vitalif:fix-clear-refs
vitalif:veeam-trick
vitalif:test-etcd-schizo
vitalif:test
vitalif:test1
vitalif:test2
vitalif:cow-meta
vitalif:kv-readahead
vitalif:qemu-fix-crash-idea
vitalif:eventloop-auto-init-trigger
vitalif:hugo-docs
vitalif:node-mutex-and-postpone
vitalif:check-writeback
vitalif:msgr-iothreads-v2
vitalif:antietcd
vitalif:rel-1.4
vitalif:test-fix-ec-unknown-state-51
vitalif:kv-update
vitalif:kv-debug
vitalif:hotfix-1.2.0
vitalif:rdma-simple-nodp
vitalif:zerocopy-tcp-send
vitalif:csi-staging
vitalif:hotfix-1.1.0
vitalif:hotfix-1.0.0
vitalif:fsync-feedback
vitalif:cached-reads
vitalif:qemu-send-loop
vitalif:test-double-alloc
vitalif:hier-failure-domains
vitalif:mon-self-restart
vitalif:epoch-deletions
vitalif:rdma-flow-control
vitalif:csi-use-vitastor-cli
vitalif:rdma-v2
vitalif:etcd-hide-base64
vitalif:lrc-matrix
vitalif:rm-left-on-dead
vitalif:nfs-proxy-old
vitalif:non-odp-rdma
vitalif:test-zctr
vitalif:separate-data-connections
vitalif:sec_osd_msgr
vitalif:test-assert
vitalif:nbd-vmsplice
vitalif:allow-etcd-address-option
vitalif:rdma-zerocopy
vitalif:rel-0.5
vitalif:openonload
vitalif:sync-io-test
vitalif:trace-sync
vitalif:trace-sqes
vitalif:test-submit-and-wait
vitalif:test-sq-poll
vitalif:blocking-uring-test
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "koolkhel/vitastor:fio-no-exit-on-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The fio engine left
client_exit_on_errorat its default, so a fatal client error at start (for example an invalidosd_networkmask in the global etcd config) calledexit()inside the fio job, and fio then crashed (SIGSEGV or afio_sem_downassertion, depending on the fio version). Disable the exit like the QEMU driver does and fail the job's setup with the client's error.An aborted client still accepted new ops and never completed them:
continue_rw()returns at once when the client is aborted, so a job without-image(-pool/-inode) hung on its first I/O once the exit was disabled. Fail ops on an aborted client with ECANCELED, including the ones still waiting for PGs when the error comes, because an error that stops the PG load would leave them waiting forever. Clients that keepclient_exit_on_errorat its default exit beforeabortedis set, so they don't reach the new code.A fatal error after the job has started no longer exits fio either. Ops already in progress then never complete (
continue_rw()returns at once), so the second commit makesgeteventsreturn EIO once the client has failed and nothing it waits for has completed, and fio ends the job with an error instead of waiting forever.Found: seen in a run on a test cluster:
fio -ioengine=libfio_vitastor.so -image=... -rw=read -bs=4k -size=4Mwith"osd_network": "10.0.0.0/33"in/vitastor/config/globalcrashed 5 times out of 5 after printingError: Invalid IP address mask: 10.0.0.0/33, exiting.Tested:
test_cluster_clientgetstest_abort_before_ready(a write queued before PGs are loaded must fail with ECANCELED on a fatal error), which fails on master. On a 3-OSD cluster with the invalid mask in the global config, fio with-imagenow exits with code 1 (io engine init failed ... Invalid IP address mask: 10.0.0.0/33), and fio with-pool -inodeexits with code 1 on an ECANCELED I/O error. Without the client change, the-pool -inodejob hangs. On master both jobs are killed by a signal. Thegeteventscheck is not covered by a test: a fatal error in the middle of a job (etcd cancelling the watch) is hard to provoke.Contributor Name
Yury Luneff (MIND Software LLC, https://mindsw.io)
CLA
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.