From 68f207157fc1af574afc1b265a78454400580122 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Wed, 18 Dec 2024 17:15:53 -0600 Subject: [PATCH] T6948: systemd-service adjustment to invoke helper script The helper script updates VyOS hostd records from DHCP server leases. This ensures that hostd records with the DHCP server leases are kept in sync with VyOS hostd records right after DHCP server is started. Note that `Restart` directive needs to be updated to `on-failure` so that the service is restarted in case of failure/timeout in interaction with hostd service. --- src/etc/systemd/system/kea-dhcp4-server.service.d/override.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/etc/systemd/system/kea-dhcp4-server.service.d/override.conf b/src/etc/systemd/system/kea-dhcp4-server.service.d/override.conf index 682e5bbcee..048236aa3e 100644 --- a/src/etc/systemd/system/kea-dhcp4-server.service.d/override.conf +++ b/src/etc/systemd/system/kea-dhcp4-server.service.d/override.conf @@ -5,3 +5,5 @@ After=vyos-router.service [Service] ExecStart= ExecStart=/usr/sbin/kea-dhcp4 -c /run/kea/kea-dhcp4.conf +ExecStartPost=!/usr/bin/python3 /usr/libexec/vyos/op_mode/dhcp.py update_dhcp_server_lease_to_hostd_state --family inet +Restart=on-failure