Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Kea Kea
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 502
    • Issues 502
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 54
    • Merge requests 54
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • KeaKea
  • Issues
  • #732
Closed
Open
Created Jul 12, 2019 by Wlodzimierz Wencel@wlodekMaintainer

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
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking