Static DHCP leases are deleted after update
Prerequisites
-
[X] I have checked the Wiki and Discussions and found no answer
-
[X] I have searched other issues and found no duplicates
-
[X] I want to report a bug and not ask a question
Operating system type
Linux, Other (please mention the version in the description)
CPU architecture
Other (please mention in the description)
Installation
Docker
Setup
Other (please mention in the description)
AdGuard Home version
v0.107.13
Description
Version of AdGuard Home server: v0.107.13 How did you install AdGuard Home: Docker (adguard/adguardhome:latest) How did you setup DNS configuration: ? If it's a router or IoT, please write device model: Synology DS614!play CPU architecture: Intel Operating system and version: DSM 7.1-42661 Update 4
What did you do?
I updated my docker image with the latest release image.
Expected result
The static dhcp leases are taken from the previous version like the others configurations and are not be "nulled".
Actual result
The static dhcp leases are empty and I have to add all static leases again.
Screenshots (if applicable)
Additional information
Perhaps when this is to difficult, than perhaps it would be nice to have an "mass export/import" for the static leases, for example a "textbox" where multiple macs/ips/names can be set, like xx:xx:xx:xx:xx:xx 192.168.xx.xxx xxxname yy:yy:yy:yy:yy:yy 192.168.yy.yyy yyyname zz:zz:zz:zz:zz:zz 192.168.zz.zzz zzz and so on ;-)
Hello and thanks for the report. Are you sure that the leases were valid? That is, were within the subnet prefix?
@EugeneOne1, please investigate.
@RealKev79, if there any chance to recover the leases.db file, so that we could check it out? Perhaps, the working directory has been changed during the update?
Btw, all the errors related to leases should be printed to the log regardless of the log level, so may be you've got the log's part just after the update? If yes, could you please send it to the [email protected]? Also, it'd be really helpful if you could reproduce the issue and capture the verbose log for us.
Anyway thanks for the report.
Hi, first, yes I think the leases are valid because before the leases are given correctly to the clients, even after a restart from the docker etc. Also the logs it says "2022/09/16 15:44:19.792200 [info] dhcp: stored 21 leases in db" so I think they should be valid.
The update is done with another docker "watchtower" and is done in the night, so I think should not be changed within the update.
I have mailed you my active "leases.db". Is it a problem that the leases.db is NOT in the "/opt/adguardhome/work/data"-folder. I found it direct in the "/opt/adguardhome/work"-folder.
Regards Kevin Metzner
Tonight my Watchtower updated my AdGuardHome and again all static leases are deleted. After the update the log only says: [dhcpv4] 2022/09/30 04:09:58 Handling request from 192.168.xx.yy:68 2022/09/30 04:09:58.724816 [info] dhcpv4: warning: no existing lease for aa:bb:cc:dd:ee:ff
I have "anonymized" the mac-address.
After the newest update to v0.107.15 and verbose=true the logfiles said nothing about my "old" leases. The first "leases"-log-entry is the same as in my last comment. This time I backuped my leases.db and after override the new "empty" leases.db and restart all my static leases are back on track ;-)
After restore the old leases.db and restart the logfile says: 2022/10/04 08:30:58.702704 [info] AdGuard Home, version v0.107.15 2022/10/04 08:30:58.715331 [info] dhcp: loaded leases v4:20 v6:1 total-read:21 from DB 2022/10/04 08:30:59.094861 [info] Initializing auth module: /opt/adguardhome/work/data/sessions.db 2022/10/04 08:30:59.095129 [info] auth: initialized. users:1 sessions:7 2022/10/04 08:30:59.095175 [info] web: initializing
After the update the log has following entries: 2022/10/04 04:03:54.646786 [info] AdGuard Home, version v0.107.15 2022/10/04 04:03:55.072647 [info] Initializing auth module: /opt/adguardhome/work/data/sessions.db 2022/10/04 04:03:55.072908 [info] auth: initialized. users:1 sessions:7 2022/10/04 04:03:55.072954 [info] web: initializing
I hope this helps.
Hello, Why the static lease conf is not saved with AdGuardHome.yaml ? I never use this dhcp because of the lost of all static lease parameters when recreating image.
The leases.db is not the place where the static conf is stored, I am looking for the place of this conf...