Opened 16 months ago

#5710 new defect

config-get API call returns error with some Cassandra backend options

Reported by: bconry Owned by:
Priority: medium Milestone: Kea-proposed
Component: Unclassified Version: 1.4.0
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

When Kea is configured with a Cassandra backend, an error is returned on a config-get API call. I believe it is doing some config validation which is unaware of some DB options. Using the following lease configuration:

    "lease-database": {
        "type": "cql",
        "keyspace": "kea",
        "contact-points": "127.0.0.1",
        "port": 9042,
        "tcp-keepalive": 1,
        "tcp-nodelay": true,
        "connect-timeout": 5000,
        "max-reconnect-tries": 5,
        "reconnect-wait-time": 2000
    },

Here is the curl output of config-get:

$ curl -X POST -H "Content-Type: application/json" -d '{ "command": "config-get", "service": [ "dhcp4" ] }' http://localhost:8080/
[ { "result": 1, "text": "Error during command processing: unknown DB access parameter: max-reconnect-tries=5" } ]

If I remove max-connect-retries, it gives the same error for reconnect-wait-time. Removing that results in the same error for tcp-keepalive, then tcp-nodelay.

Once the configuration has those options removed:

    "lease-database": {
        "type": "cql",
        "keyspace": "kea",
        "contact-points": "127.0.0.1",
        "port": 9042,
        //"tcp-keepalive": 1,
        //"tcp-nodelay": true,
        "connect-timeout": 5000
        //"max-reconnect-tries": 5,
        //"reconnect-wait-time": 2000
    },

The config-get call works:

$ curl -X POST -H "Content-Type: application/json" -d '{ "command": "config-get", "service": [ "dhcp4" ] }' http://localhost:8080/
[ { "arguments": { "Dhcp4": { "client-classes": [ { "boot-file-name": "/dev/null", "name": "voip", "next-server": "192.0.2.254", "option-data": [  ], "option-def": [  ], "server-hostname": "hal", ...

Subtickets

Change History (0)

Note: See TracTickets for help on using tickets.