not very helpful error when executing -set commands with incorrect server tag
example command:
{'arguments': {'remote': {'type': 'mysql'},
'server-tags': ['abc'],
'subnets': [{'id': 1,
'interface': 'enp0s9',
'pools': [{'pool': '2001:db8:1::1-2001:db8:1::10'}],
'shared-network-name': '',
'subnet': '2001:db8:1::/64'}]},
'command': 'remote-subnet6-set'}
result:
{
"result": 1,
"text": "unable to execute for <INSERT INTO dhcp6_subnet_server( subnet_id, modification_ts, server_id) VALUES (?, ?, (SELECT id FROM dhcp6_server WHERE tag = ?))>, reason: Column 'server_id' cannot be null (error code 1048)"
}
and at this point server tag "abc" is missing from database. This error should say something like Server tag not existing
not Column 'server_id' cannot be null
kea config:
{
"Control-agent": {
"control-sockets": {
"dhcp6": {
"socket-name": "/home/wlodek/installed/git/var/run/kea/control_socket",
"socket-type": "unix"
}
},
"http-host": "192.168.51.3",
"http-port": 8000
},
"Dhcp6": {
"config-control": {
"config-databases": [
{
"name": "keadb",
"password": "keapass",
"type": "mysql",
"user": "keauser"
}
]
},
"control-socket": {
"socket-name": "/home/wlodek/installed/git/var/run/kea/control_socket",
"socket-type": "unix"
},
"hooks-libraries": [
{
"library": "/home/wlodek/installed/git/lib/kea/hooks/libdhcp_cb_cmds.so"
},
{
"library": "/home/wlodek/installed/git/lib/kea/hooks/libdhcp_mysql_cb.so"
}
],
"interfaces-config": {
"interfaces": [
"enp0s9"
]
},
"lease-database": {
"type": "memfile"
},
"loggers": [
{
"debuglevel": 99,
"name": "kea-dhcp6",
"output_options": [
{
"output": "/home/wlodek/installed/git/var/log/kea.log"
}
],
"severity": "DEBUG"
}
],
"server-tag": "abc"
}
}
wlodek@debian9-64-2:sbin $ ./kea-dhcp6 -V
1.6.0-beta-git
git 5511725555138213de4f48dc1091d65b5db47034
linked with:
log4cplus 1.1.2
OpenSSL 1.0.2s 28 May 2019
database:
MySQL backend 8.1, library 10.1.37-MariaDB
PostgreSQL backend 5.1, library 90613
Memfile backend 2.1