Persist dnsmasq DHCP leases on mounted storage#1695
Merged
gsanchietti merged 1 commit intoMay 26, 2026
Merged
Conversation
stephdl
reviewed
May 26, 2026
d766a95 to
eba8e86
Compare
Tbaile
reviewed
May 26, 2026
Collaborator
Tbaile
left a comment
There was a problem hiding this comment.
Definitely not fond of a hotplug that writes down uci changes, the alternative should be to have a proc.d that listens on changes of fstab configuration, not sure it's the scope here.
Member
Author
|
I agree @Tbaile: I'm going to remove the hotplug part: It should not be needed 99% of the time. |
eba8e86 to
ad8d0bf
Compare
Tbaile
requested changes
May 26, 2026
Store dnsmasq DHCP leases on /mnt/data when storage is available and keep /tmp/dhcp.leases as the compatibility path for existing readers. Switch back to /tmp before storage removal and restart victoria-metrics around fstab changes so the data mount can be released cleanly. Assisted-by: Copilot:gpt-5.4
ad8d0bf to
df76962
Compare
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.
Summary
/mnt/data/dnsmasq/dhcp.leaseswhen storage is mounted/tmp/dhcp.leasesas the compatibility path and fall back to it before storage removalremove-storagecan release/mnt/dataRelated issue
#1694
How to test
uci get dhcp.ns_dnsmasq.leasefileis/tmp/dhcp.leaseswhen storage is not configured.add-storage /dev/<data-partition>and verify the lease path switches to/mnt/data/dnsmasq/dhcp.leases,/tmp/dhcp.leasesbecomes a symlink, and the storage lease file is created./mnt/datais preserved.remove-storageand verify dnsmasq returns to/tmp/dhcp.leasesbefore/mnt/datais unmounted.Dependencies
None.