remote-network4-set doesn't save some parameters
config parameters:
- rebind-timer
- renew-timer
- valid-lifetime
- reservation-mode
are not saved when remote-network4-set is used.
Scenario add network:
{
"arguments": {
"remote": {
"type": "mysql"
},
"server-tags": [
"abc"
],
"shared-networks": [
{
"client-class": "abc",
"interface": "enp0s9",
"name": "net1",
"option-data": [
{
"always-send": true,
"code": 6,
"csv-format": true,
"data": "192.0.2.1"
}
],
"rebind-timer": 200,
"renew-timer": 100,
"reservation-mode": "global",
"subnet4": [
{
"interface": "enp0s9",
"pools": [
{
"pool": "192.8.0.1-192.8.0.1"
}
],
"subnet": "192.8.0.0/24"
}
],
"user-context": "some weird network",
"valid-lifetime": 300
}
]
},
"command": "remote-network4-set"
}
response:
{
"arguments": {
"shared-networks": [
{
"name": "net1"
}
]
},
"result": 0,
"text": "IPv4 shared network successfully set."
}
get network:
{
"arguments": {
"remote": {
"type": "mysql"
},
"server-tags": [
"abc"
],
"shared-networks": [
{
"name": "net1"
}
]
},
"command": "remote-network4-get"
}
returned configuration:
{
"arguments": {
"count": 1,
"shared-networks": [
{
"authoritative": false,
"client-class": "abc",
"interface": "enp0s9",
"match-client-id": true,
"name": "net1",
"option-data": [
{
"always-send": true,
"code": 6,
"csv-format": true,
"data": "192.0.2.1",
"name": "domain-name-servers",
"space": "dhcp4"
}
],
"relay": {
"ip-addresses": []
},
"reservation-mode": "all",
"subnet4": [],
"user-context": "some weird network"
}
]
},
"result": 0,
"text": "IPv4 shared network 'net1' found."
}
quick peak into database:
mysql> select * from dhcp4_shared_network;
+----+------+--------------+-----------+-----------------+---------------------+--------------+-------+-------------+------------------------+------------------+----------------------+----------------+
| id | name | client_class | interface | match_client_id | modification_ts | rebind_timer | relay | renew_timer | require_client_classes | reservation_mode | user_context | valid_lifetime |
+----+------+--------------+-----------+-----------------+---------------------+--------------+-------+-------------+------------------------+------------------+----------------------+----------------+
| 1 | net1 | abc | enp0s9 | 1 | 2019-03-01 05:31:28 | NULL | NULL | NULL | [ ] | 3 | "some weird network" | NULL |
+----+------+--------------+-----------+-----------------+---------------------+--------------+-------+-------------+------------------------+------------------+----------------------+----------------+
1 row in set (0.00 sec)
...and values are indeed missing. Related: #508 (closed)