Client: Keep the listing timer armed while PGs wait to become active #201

Merged
vitalif merged 1 commits from koolkhel/vitastor:list-wait-up-timer into master 2026-11-29 14:15:56 +03:00
Contributor

Description

A PG listing that waits for the PG to become active checks its deadline only when continue_lists() runs, and the listing timer is armed only for the earliest deadline. When the timer fired for one PG, PGs that started waiting later were left without a timer, so the listing (and vitastor-cli rm-data / rm) waited for an unrelated etcd event instead of failing after client_wait_up_timeout. Re-arm the timer for such PGs, as is already done for PGs that wait to retry a listing (ed94aa52).

Found: seen in a run on a test stand: with two OSDs stopped and 11 of 32 PGs of an EC 4+2 pool inactive, rm-data reported only the first PG after 16 s ("Failed to wait for PG 1/1 to become active, skipping listing") and then waited about 10 minutes, until the monitor moved the PGs after osd_out_time. Reproduced in a docker test: SIGKILL of 2 of 5 OSDs (replicated pool, size 3, pg_minsize 2, 32 PGs), rm started at once hung for more than 120 s with 7 PGs waiting for "active"; with the fix it fails after 31 s (lease expiry + 16 s) and names every inactive PG.

Tested: test_cluster_client, new test_list_wait_active_timeout (fails without the fix: the PG that started waiting later never times out).

Contributor Name

Yury Luneff (MIND Software LLC, https://mindsw.io)

CLA

### Description A PG listing that waits for the PG to become active checks its deadline only when `continue_lists()` runs, and the listing timer is armed only for the earliest deadline. When the timer fired for one PG, PGs that started waiting later were left without a timer, so the listing (and `vitastor-cli rm-data` / `rm`) waited for an unrelated etcd event instead of failing after `client_wait_up_timeout`. Re-arm the timer for such PGs, as is already done for PGs that wait to retry a listing (ed94aa52). Found: seen in a run on a test stand: with two OSDs stopped and 11 of 32 PGs of an EC 4+2 pool inactive, `rm-data` reported only the first PG after 16 s ("Failed to wait for PG 1/1 to become active, skipping listing") and then waited about 10 minutes, until the monitor moved the PGs after `osd_out_time`. Reproduced in a docker test: SIGKILL of 2 of 5 OSDs (replicated pool, size 3, pg_minsize 2, 32 PGs), `rm` started at once hung for more than 120 s with 7 PGs waiting for "active"; with the fix it fails after 31 s (lease expiry + 16 s) and names every inactive PG. Tested: test_cluster_client, new `test_list_wait_active_timeout` (fails without the fix: the PG that started waiting later never times out). ### Contributor Name Yury Luneff (MIND Software LLC, https://mindsw.io) ### CLA - [x] I accept Vitastor CLA agreement: https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/CLA-en.md
koolkhel added 1 commit 2026-11-29 10:48:52 +03:00
A PG listing that waits for the PG to become active checks its deadline
only when continue_lists() runs, and the listing timer is armed only for
the earliest deadline. When the timer fired for one PG, PGs that started
waiting later were left without a timer, so the listing (and rm-data)
waited for an unrelated etcd event instead of failing after
client_wait_up_timeout. Re-arm the timer for such PGs, as is already done
for PGs that wait to retry a listing.
vitalif merged commit 97baef8cdf into master 2026-11-29 14:15:56 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vitalif/vitastor#201
No description provided.