Kea issueshttps://gitlab.isc.org/isc-projects/kea/-/issues2018-11-30T11:07:38Zhttps://gitlab.isc.org/isc-projects/kea/-/issues/306Distribute YANG modules.2018-11-30T11:07:38ZFrancis DupontDistribute YANG modules.Reference #298.Reference #298.Kea1.5-beta2Wlodzimierz WencelWlodzimierz Wencelhttps://gitlab.isc.org/isc-projects/kea/-/issues/195Document sample NETCONF operation2018-11-28T22:03:52ZTomek MrugalskiDocument sample NETCONF operationThe User's Guide does not have a clear, simple example how to use kea-netconf. We need a simple example that will cover:
- start kea-dhcp4
- load basic config into sysrepo using sysrepocfg
- start kea-netconf and explain what's going on...The User's Guide does not have a clear, simple example how to use kea-netconf. We need a simple example that will cover:
- start kea-dhcp4
- load basic config into sysrepo using sysrepocfg
- start kea-netconf and explain what's going on
- change the configuration a bit
- explain how kea-netconf picks up the changes
Also clean up example sysrepo configs (they're in src/bin/netconf/configs, should be moved to doc/examples/netconf).Kea1.5-beta2Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/190incorrectly closed bracket in kea-dhcp4/6-server.yang model forcing to use co...2018-11-22T09:47:03ZWlodzimierz Wencelincorrectly closed bracket in kea-dhcp4/6-server.yang model forcing to use corrupted XML fileRight now if user want to configure Kea using sysrepo with XML (and probably error will propagate to JSON)
with logger included user have to use two XML files combined. e.g:
```
<config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp4-serve...Right now if user want to configure Kea using sysrepo with XML (and probably error will propagate to JSON)
with logger included user have to use two XML files combined. e.g:
```
<config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp4-server">
<subnet4>
<subnet4>
<id>1</id>
<pools>
<pool>
<start-address>192.168.50.1</start-address>
<end-address>192.168.50.1</end-address>
</pool>
</pools>
<subnet>192.168.50.0/24</subnet>
<interface>eth2</interface>
</subnet4>
</subnet4>
<interfaces-config>
<interfaces>eth2</interfaces>
</interfaces-config>
<valid-lifetime>4000</valid-lifetime>
<renew-timer>1000</renew-timer>
<rebind-timer>2000</rebind-timer>
<lease-database>
<database-type>memfile</database-type>
</lease-database>
</config>
<logging xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp4-server">
<loggers>
<logger>
<name>kea-dhcp4.dhcp4</name>
<output-options>
<option>
<output>/home/test/jenkins_lab/var/area_A/var/kea/kea.log</output>
</option>
</output-options>
<severity>INFO</severity>
</logger>
</loggers>
</logging>
```
This file has improper XML syntax (two main containers config and logging), and will break any automated generator/reader/validator... container 'logging' should be included within 'config'.
Correct file should look like this:
```
<config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp4-server">
<subnet4>
<subnet4>
<id>1</id>
<pools>
<pool>
<start-address>192.168.50.1</start-address>
<end-address>192.168.50.1</end-address>
</pool>
</pools>
<subnet>192.168.50.0/24</subnet>
<interface>eth2</interface>
</subnet4>
</subnet4>
<interfaces-config>
<interfaces>eth2</interfaces>
</interfaces-config>
<valid-lifetime>4000</valid-lifetime>
<renew-timer>1000</renew-timer>
<rebind-timer>2000</rebind-timer>
<lease-database>
<database-type>memfile</database-type>
</lease-database>
<logging>
<loggers>
<logger>
<name>kea-dhcp4.dhcp4</name>
<output-options>
<option>
<output>/home/test/jenkins_lab/var/area_A/var/kea/kea.log</output>
</option>
</output-options>
<severity>INFO</severity>
</logger>
</loggers>
</logging>
</config>
```
Incorrectly closed bracket in files:
./src/lib/yang/models/kea-dhcp6-server.yang
./src/lib/yang/models/kea-dhcp4-server.yang
cause this situation.
Fix is simple closing bracket of container 'config' should be moved below container 'logging':
```
diff --git a/src/lib/yang/models/kea-dhcp4-server.yang b/src/lib/yang/models/kea-dhcp4-server.yang
index e997dfbed..fd15885eb 100644
--- a/src/lib/yang/models/kea-dhcp4-server.yang
+++ b/src/lib/yang/models/kea-dhcp4-server.yang
@@ -405,15 +405,13 @@ module kea-dhcp4-server {
description "Global host reservations.";
}
}
- }
-
- container logging {
+ container logging {
// config true;
description "Logging";
uses logging:configuration;
}
-
+}
/*
* State data
*/
diff --git a/src/lib/yang/models/kea-dhcp6-server.yang b/src/lib/yang/models/kea-dhcp6-server.yang
index e39847382..c39a83cb0 100644
--- a/src/lib/yang/models/kea-dhcp6-server.yang
+++ b/src/lib/yang/models/kea-dhcp6-server.yang
@@ -447,15 +447,13 @@ module kea-dhcp6-server {
description "Global host reservations.";
}
}
- }
-
- container logging {
+ container logging {
// config true;
description "Logging";
uses logging:configuration;
}
-
+}
/*
* State data
*/
```
Tested, with this change sysrepo accept correctly formatted XML file.Kea1.5-beta2Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/177serialize netconf tests2018-11-26T16:55:46ZFrancis Dupontserialize netconf testsNetconf has both unit tests and shell tests which interfere badly when run in parallel.
The obvious round about is to not call make check with a -j parameter including make distcheck.
IMHO the problem belongs in Sysrepo which was not d...Netconf has both unit tests and shell tests which interfere badly when run in parallel.
The obvious round about is to not call make check with a -j parameter including make distcheck.
IMHO the problem belongs in Sysrepo which was not designed to support parallel activities on same objects.
If nobody (Stephen?) proposes something simpler I'll put the shell script into a separated directory.
Note I leave the classification of this to QA, i.e. is the constraint to not run make distcheck in parallel is a problem.Kea1.5-beta2https://gitlab.isc.org/isc-projects/kea/-/issues/176Update to sysrepo 0.7.6 release2018-11-19T14:53:29ZFrancis DupontUpdate to sysrepo 0.7.6 releaseSome comments:
- avoid to overload #65
- if it is mainly about src/lib/yang there are impacts on src/bin/netconf too
- explicitly do not put in 1.5 milestoneSome comments:
- avoid to overload #65
- if it is mainly about src/lib/yang there are impacts on src/bin/netconf too
- explicitly do not put in 1.5 milestoneKea1.5-beta2Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/130Provide sample ('complete') json configuration files with all the keys presen...2018-10-24T13:12:45ZCathy AlmondProvide sample ('complete') json configuration files with all the keys present, demonstrating their usageA Support customer asked (in ticket https://support.isc.org/Ticket/Display.html?id=13388):
```
I would like to have a complete json configuration file with all the "keys" present. Is this something you can help me with?
i have searched...A Support customer asked (in ticket https://support.isc.org/Ticket/Display.html?id=13388):
```
I would like to have a complete json configuration file with all the "keys" present. Is this something you can help me with?
i have searched but not found a complete configuration for kea 1.3 & 1.4
```
The engineering response was to craft a v4 configuration containing all keys or almost all keys. It comes with the following warning:
`Note that this configuration may not be valid, even though it is valid JSON, because usually we don't specify all keys. It is meant to be an example of what parameters can be specified at what level.`
This feature request is to formalise the need for such a document, and to extend it to cover other areas of Kea Configuration, starting with v6, and potentially extending to the control agent.
Meanwhile, here is what was generated for v4:
```
{
"Dhcp4": {
"next-server": "192.0.2.123",
"boot-file-name": "/dev/null",
"client-classes": [
{
"boot-file-name": "",
"name": "phones_server1",
"next-server": "0.0.0.0",
"option-data": [],
"option-def": [],
"server-hostname": "",
"test": "member('HA_server1')"
},
{
"boot-file-name": "",
"name": "phones_server2",
"next-server": "0.0.0.0",
"option-data": [],
"option-def": [],
"server-hostname": "",
"test": "member('HA_server2')"
},
{
"boot-file-name": "",
"name": "laptops_server1",
"next-server": "0.0.0.0",
"option-data": [],
"option-def": [],
"server-hostname": "",
"test": "member('HA_server1')"
},
{
"boot-file-name": "",
"name": "laptops_server2",
"next-server": "0.0.0.0",
"option-data": [],
"option-def": [],
"server-hostname": "",
"test": "member('HA_server2')"
}
],
"control-socket": {
"socket-name": "/tmp/kea-dhcp4-ctrl.sock",
"socket-type": "unix"
},
"decline-probation-period": 86400,
"dhcp-ddns": {
"always-include-fqdn": false,
"enable-updates": false,
"generated-prefix": "myhost",
"hostname-char-replacement": "",
"hostname-char-set": "",
"max-queue-size": 1024,
"ncr-format": "JSON",
"ncr-protocol": "UDP",
"override-client-update": false,
"override-no-update": false,
"qualifying-suffix": "",
"replace-client-name": "never",
"sender-ip": "0.0.0.0",
"sender-port": 0,
"server-ip": "127.0.0.1",
"server-port": 53001
},
"dhcp4o6-port": 0,
"echo-client-id": true,
"expired-leases-processing": {
"flush-reclaimed-timer-wait-time": 25,
"hold-reclaimed-time": 3600,
"max-reclaim-leases": 100,
"max-reclaim-time": 250,
"reclaim-timer-wait-time": 10,
"unwarned-reclaim-cycles": 5
},
"hooks-libraries": [
{
"library": "/home/marcin/devel/kea-build/lib/hooks/libdhcp_lease_cmds.so",
"parameters": {}
},
{
"library": "/home/marcin/devel/kea-build/lib/hooks/libdhcp_ha.so",
"parameters": {
"high-availability": [
{
"heartbeat-delay": 10000,
"max-ack-delay": 5000,
"max-response-delay": 10000,
"max-unacked-clients": 0,
"mode": "load-balancing",
"peers": [
{
"auto-failover": true,
"name": "server1",
"role": "primary",
"url": "http://192.168.56.33:8080/"
},
{
"auto-failover": true,
"name": "server2",
"role": "secondary",
"url": "http://192.168.56.66:8080/"
}
],
"send-lease-updates": true,
"state-machine": {
"states": [
{
"pause": "always",
"state": "waiting"
},
{
"pause": "once",
"state": "partner-down"
}
]
},
"sync-leases": true,
"sync-timeout": 60000,
"this-server-name": "server1"
}
]
}
}
],
"host-reservation-identifiers": [
"hw-address",
"duid",
"circuit-id",
"client-id"
],
"interfaces-config": {
"dhcp-socket-type": "udp",
"interfaces": [
"enp0s8"
],
"re-detect": true
},
"lease-database": {
"lfc-interval": 3600,
"name": "/home/marcin/devel/kea-build/kea-dhcp4.csv",
"persist": true,
"type": "memfile"
},
"option-data": [
{
"always-send": false,
"code": 6,
"csv-format": true,
"data": "192.0.3.1, 192.0.3.2",
"name": "domain-name-servers",
"space": "dhcp4"
}
],
"option-def": [],
"rebind-timer": 40,
"renew-timer": 30,
"sanity-checks": {
"lease-checks": "warn"
},
"shared-networks": [
{
"match-client-id": true,
"name": "my-secret-network",
"option-data": [],
"relay": {
"ip-addresses": []
},
"reservation-mode": "all",
"require-client-classes": [ "Client_foo" ],
"subnet4": [
{
"4o6-interface": "",
"4o6-interface-id": "",
"4o6-subnet": "",
"boot-file-name": "",
"id": 1,
"match-client-id": true,
"next-server": "0.0.0.0",
"option-data": [
{
"always-send": false,
"code": 3,
"csv-format": true,
"data": "192.0.3.1",
"name": "routers",
"space": "dhcp4"
}
],
"pools": [
{
"client-class": "phones_server1",
"option-data": [],
"pool": "192.1.0.1/16"
},
{
"client-class": "laptops_server1",
"option-data": [],
"pool": "192.2.0.1/16"
},
{
"client-class": "phones_server2",
"option-data": [],
"pool": "192.3.0.1/16"
},
{
"client-class": "laptops_server2",
"option-data": [],
"pool": "192.4.0.1/16"
}
],
"rebind-timer": 40,
"relay": {
"ip-addresses": [
"192.168.56.1"
]
},
"renew-timer": 30,
"reservation-mode": "all",
"reservations": [],
"require-client-classes": [ "Client_foo" ],
"server-hostname": "",
"subnet": "192.0.0.0/8",
"valid-lifetime": 6000
}
]
}
],
"subnet4": [],
"valid-lifetime": 6000
},
"Logging": {
"loggers": [
{
"debuglevel": 99,
"name": "kea-dhcp4",
"output_options": [
{
"flush": true,
"maxsize": 10240000,
"maxver": 1,
"output": "stdout"
}
],
"severity": "INFO"
},
{
"debuglevel": 99,
"name": "kea-dhcp4.ha_hooks",
"output_options": [
{
"flush": true,
"maxsize": 10240000,
"maxver": 1,
"output": "stdout"
}
],
"severity": "INFO"
},
{
"debuglevel": 99,
"name": "kea-dhcp4.commands",
"output_options": [
{
"flush": true,
"maxsize": 10240000,
"maxver": 1,
"output": "stdout"
}
],
"severity": "INFO"
},
{
"debuglevel": 99,
"name": "kea-dhcp4.http",
"output_options": [
{
"flush": true,
"maxsize": 10240000,
"maxver": 1,
"output": "stdout"
}
],
"severity": "INFO"
}
]
}
}
```Kea1.5-beta2Marcin SiodelskiMarcin Siodelski