Repository navigation
Preserve exclusive device leases across daemon restarts - #2157
Merged
Merged
Conversation
Fixes #2150 Ci-Attestation: {"at":1795398521,"gate":"rust/all/fmt","host":"linux-x86_64","key":"036190d003e833913cc9bd9893a305709cd8b70009d2f6664ce02280df2ef3f2","lane":"lint","parents":["9b1bf567c863d6dce01d0e2aaa1237cd39e920de"],"secs":2154,"stamp":"7d9340d4cc285b5513fb68d2cf25cfa5","tree":"ad29d25de5a7acd15b289198c21fe13b1b03c8bd","v":1,"via":"run"} Ci-Attestation: {"at":1795398521,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"1551c08c606c5e723baea50f7cfd5d2f12819aa516fe29e3680a54ffb37e3b36","lane":"dylint","parents":["9b1bf567c863d6dce01d0e2aaa1237cd39e920de"],"secs":2154,"stamp":"0e1b1a955f18d33e29eb311d6fa1a8aa","tree":"ad29d25de5a7acd15b289198c21fe13b1b03c8bd","v":1,"via":"run"} Ci-Attestation: {"at":1795398522,"gate":"rust/x86_64-unknown-linux-gnu/dylint","host":"linux-x86_64","key":"1551c08c606c5e723baea50f7cfd5d2f12819aa516fe29e3680a54ffb37e3b36","lane":"dylint","parents":["9b1bf567c863d6dce01d0e2aaa1237cd39e920de"],"secs":2154,"stamp":"0e3b2d272c2cc2efc714bf9368c00cda","tree":"ad29d25de5a7acd15b289198c21fe13b1b03c8bd","v":1,"via":"run"}
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2150.
fbuild device lease --ttl-secondsfor workflows that need automatic expiration. Explicit release and takeover update the saved reservations.The restart regression exercises holder admission, competing acquisition, release by the original ID, USB port reuse, repeated renumbering, and expired leases.
The daemon suite passed 345 unit tests and 13 integration tests, including all 48 device-manager tests. A real USB board on a private daemon data directory reproduced the lost lease with the installed daemon. The patched daemon retained the lease ID after restart, rejected the competitor, and released the original lease.
A timed lease also expired across a real daemon restart, and its old ID could not release the next workflow's lease.