osd: Don't exit on finding own state key, arm lease timers only after the grant #186
Open
koolkhel
wants to merge 2 commits from
koolkhel/vitastor:osd-own-lease-stats-timer into master
pull from: koolkhel/vitastor:osd-own-lease-stats-timer
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:osd-own-lease-stats-timer"
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
Two fixes for OSDs that start while etcd answers slower than
etcd_quick_timeout, for example when many OSDs start at once./osd/state/Ncreation transaction can time out even though etcd has already applied it. The retry then finds the key with the OSD's own lease, and the OSD exits with "Key ... already exists in etcd, OSD N is still up". It is restarted only to repeat the same start against the same slow etcd. A key that holds our own lease now counts as created.acquire_lease()armed the periodic lease renewal and statistics timers on every call. Each failed lease grant left one more renewal timer and one more statistics timer running for the life of the process, which multiplied the keepalive and statistics load on etcd exactly when it was already overloaded. The timers are now armed once, when the lease is granted.Found: the exit on the OSD's own state key was seen on a 16-node test stand with 3840 OSDs at cold start: 259 of 951 "already exists" exits came right after a timeout of the create transaction in the same process. The stats timer armed on every grant call was found by reading the code.
Tested with a proxy in front of etcd that holds back the reply to each OSD's first state key creation for 1.5 s. On master all three OSDs find their own key, print "already exists ... still up" and exit, so the pool never comes up. With the fix all OSDs come up. The test is left out of this PR, as asked in review. It merges cleanly with #140, which also touches
acquire_lease(). The timer change has no test of its own.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.