Skip to content

Commit

Permalink
dhcp: T5840: Merge systemd service overrides for kea-ctrl-agent
Browse files Browse the repository at this point in the history
Default systemd service for kea-ctrl-agent expects
`/etc/kea/kea-api-password` which is not used in
VyOS.

The systemd unit override to remove the condition
does not need to be in a separate (templated and
dynamic) override file and can be merged into the
existing static override file.
  • Loading branch information
indrajitr committed Jan 17, 2025
1 parent 99d0c7a commit 48e253c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions data/templates/dhcp-server/10-override.conf.j2

This file was deleted.

3 changes: 0 additions & 3 deletions src/conf_mode/service_dhcp-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
config_file = '/run/kea/kea-dhcp4.conf'
lease_file = '/config/dhcp/dhcp4-leases.csv'
lease_file_glob = '/config/dhcp/dhcp4-leases*'
systemd_override = r'/run/systemd/system/kea-ctrl-agent.service.d/10-override.conf'
user_group = '_kea'

ca_cert_file = '/run/kea/kea-failover-ca.pem'
Expand Down Expand Up @@ -395,8 +394,6 @@ def generate(dhcp):

dhcp['high_availability']['ca_cert_file'] = ca_cert_file

render(systemd_override, 'dhcp-server/10-override.conf.j2', dhcp)

render(ctrl_config_file, 'dhcp-server/kea-ctrl-agent.conf.j2', dhcp, user=user_group, group=user_group)
render(config_file, 'dhcp-server/kea-dhcp4.conf.j2', dhcp, user=user_group, group=user_group)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[Unit]
After=
After=vyos-router.service
ConditionFileNotEmpty=

[Service]
ExecStart=
Expand Down

0 comments on commit 48e253c

Please sign in to comment.