...
 
Commits (3)
...@@ -9,7 +9,19 @@ Requirements ...@@ -9,7 +9,19 @@ Requirements
Variables Variables
--------- ---------
*todo* * kea_ha_mode
* description:
* This option defines the high availabilty mode.
* If this option is set to *loadbalancing* the *dhcp_primary_server* is the primary server and the *dhcp_secondary_server* is the secondary server. All other servers of this host group are backup server.
* If this option is set to *hotstandby* the *dhcp_primary_server* is the active server and the *dhcp_secondary_server* is the standby server. All other servers of this host group are backup server.
* choices: [none, loadbalancing, hotstandby]
* default: none
* kea_control_agent_port
* description:
* This option defines the communication port for the kea control agents.
* The related IP address is marked with the service ID *dhcp-ha* (see well-known services).
* default: 8080
Processes Processes
========= =========
......
--- ---
# defaults file for package.dhcp.kea/
\ No newline at end of file dhcp_leasetimes: {"default": 86400}
dhcp_network_relays: {"default": []}
dhcp_network_interfaces: {}
dhcp_backend: "memfile"
dhcp_db_host: ""
dhcp_db_port: ""
dhcp_db_user: ""
dhcp_db_password: ""
dhcp_db_dbname: ""
kea_ctrl_configfile: "/usr/local/etc/kea/keactrl.conf"
kea_dhcp4_config: "kea-dhcp4.conf.j2"
kea_dhcp6_config: "kea-dhcp6.conf.j2"
kea_control_agent_config: "kea-control-agent.conf.j2"
kea_ha_mode: "none"
kea_control_agent_port: 8080
package_packages: {
"freebsd": ["kea"]
}
package_service: {
"freebsd": "kea"
}
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
{%- for ifname, ifdata in nodenetwork.devices.items() if ifdata.services is defined and ("dhcp-ha" in (ifdata.services | default([]))) %} {%- for ifname, ifdata in nodenetwork.devices.items() if ifdata.services is defined and ("dhcp-ha" in (ifdata.services | default([]))) %}
{%- set has = {"name": fctnhst} {%- set has = {"name": fctnhst}
{%- if ipversion == "ipv4" %} {%- if ipversion == "ipv4" %}
{%- do has.update({"url": 'http://%s:%s/' | format(ifdata.ipv4 | default("127.0.0.1"), kea_ha_port)} %} {%- do has.update({"url": 'http://%s:%s/' | format(ifdata.ipv4 | default("127.0.0.1"), kea_control_agent_port)} %}
{%- else %} {%- else %}
{%- do has.update({"url": 'http://[%s]:%s/' | format(ifdata.ipv6 | default("::1"), kea_ha_port)} %} {%- do has.update({"url": 'http://[%s]:%s/' | format(ifdata.ipv6 | default("::1"), kea_control_agent_port)} %}
{%- endif %} {%- endif %}
{%- if fctnhst != dhcp_primary_server or fctnhst != dhcp_secondary_server %} {%- if fctnhst != dhcp_primary_server or fctnhst != dhcp_secondary_server %}
{%- do has.update({"auto-failover": false, "role": "backup"}) %} {%- do has.update({"auto-failover": false, "role": "backup"}) %}
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
{%- if (ha_servers | length) > 0 -%} {%- if (ha_servers | length) > 1 -%}
"hooks-libraries": [ "hooks-libraries": [
{ {
"library": "/usr/lib/hooks/libdhcp_lease_cmds.so", "library": "/usr/lib/hooks/libdhcp_lease_cmds.so",
......