#5636 closed defect (duplicate)

Problems with maria database, fields in store proc wrong

Reported by: zaffron Owned by:
Priority: high Milestone: Kea1.5
Component: database-mysql Version: git
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

I have just upgraded to Opensuse 15, and since there are problems with boost in previous versions, I upgraded to the 14 beta.

However, with a mysql database, trying to populate the lease4 & lease6 tables fail with...

2018-05-28 11:53:09.332 ERROR [kea-dhcp6.alloc-engine/11431] ALLOC_ENGINE_V6_ALLOC_ERROR duid=[00:01:00:01:1e:da:f1:1b:b8:27:eb:8f:fe:67], tid=0x2cec69: error during attempt to allocate an IPv6 address: unable to bind parameters for <INSERT INTO lease6(address, duid, valid_lifetime, expire, subnet_id, pref_lifetime, lease_type, iaid, prefix_len, fqdn_fwd, fqdn_rev, hostname, hwaddr, hwtype, hwaddr_source, state) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)>, reason: (error code 0)

&

2018-05-28 11:54:01.657 ERROR [kea-dhcp4.alloc-engine/11424] ALLOC_ENGINE_V4_ALLOC_ERROR [hwtype=1 b8:27:eb:da:12:3b], cid=[ff:eb:da:12:3b:00:01:00:01:1e:da:f1:13:b8:27:eb:8f:47:6e], tid=0xde2380dc: error during attempt to allocate an IPv4 address: unable to bind parameters for <INSERT INTO lease4(address, hwaddr, client_id, valid_lifetime, expire, subnet_id, fqdn_fwd, fqdn_rev, hostname, state) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)>, reason: (error code 0)

There seemed to be a similar problem mentioned in the forums, but there does not seem to anything which matches this.

It was mentioned something to do with timers, but I have them now set to:

"reclaim-timer-wait-time": 100,
"flush-reclaimed-timer-wait-time": 250,
"hold-reclaimed-time": 36000,
"max-reclaim-leases": 1000,
"max-reclaim-time": 2500,
"unwarned-reclaim-cycles": 5

...

"valid-lifetime": 36000,
"renew-timer": 9000,
"rebind-timer": 18000,

What is strange though, when I take a tcpdump of the connection, I see a number of packets setting SOME of the bind fields, most seem to be set to the the IP address which kea attempts to assign.

It's as if all the bind fields are corrupted.

Subtickets

Attachments (1)

eee.pcap (7.0 KB) - added by zaffron 18 months ago.
Dump of the insert into lease4 table

Download all attachments as: .zip

Change History (9)

Changed 18 months ago by zaffron

Dump of the insert into lease4 table

comment:1 Changed 18 months ago by zaffron

To match the dump...

2018-05-30 14:03:24.299 INFO [kea-dhcp4.leases/2522] DHCP4_LEASE_ADVERT [hwtype=1 b8:27:eb:b4:80:ea], cid=[ff:eb:b4:80:ea:00:01:00:01:1e:da:f1:0a:b8:27:eb:b4:80:ea], tid=0xbca06907: lease 81.187.35.194 will be advertised
2018-05-30 14:03:24.305 ERROR [kea-dhcp4.alloc-engine/2522] ALLOC_ENGINE_V4_ALLOC_ERROR [hwtype=1 b8:27:eb:b4:80:ea], cid=[ff:eb:b4:80:ea:00:01:00:01:1e:da:f1:0a:b8:27:eb:b4:80:ea], tid=0xbca06907: error during attempt to allocate an IPv4 address: unable to bind parameters for <INSERT INTO lease4(address, hwaddr, client_id, valid_lifetime, expire, subnet_id, fqdn_fwd, fqdn_rev, hostname, state) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)>, reason: (error code 0)

comment:2 Changed 18 months ago by zaffron

  • Component changed from dhcp4 to database-mysql

comment:3 Changed 17 months ago by tmark

Did you upgrade your existing Kea database? 1.4 requires that you update the database schema.

comment:4 follow-up: Changed 17 months ago by zaffron

Yes, and I also created a fresh new database.

There appears to be comments by others on the forum, that Kea no longer sits well with the maria db.

comment:5 in reply to: ↑ 4 Changed 17 months ago by tmark

Replying to zaffron:

Yes, and I also created a fresh new database.

There appears to be comments by others on the forum, that Kea no longer sits well with the maria db.

Based on the nature of the error message I was pretty certain your schema was current but thought it worth checking. We'll have to try and replicate this under OpenSuse? 15, as we have MariaDB running on a number of test VMs and it seems to work fine.

What version of MariaDB do you have?

comment:6 Changed 17 months ago by zaffron

...

zafron@eth7 ~$ rpm -qa | grep -i maria | sort
libmariadb-devel-3.0.3-lp150.1.2.x86_64
libmariadb3-3.0.3-lp150.1.2.x86_64
libmariadb_plugins-3.0.3-lp150.1.2.x86_64
mariadb-10.2.15-lp150.2.3.2.x86_64
mariadb-client-10.2.15-lp150.2.3.2.x86_64
mariadb-errormessages-10.2.15-lp150.2.3.2.noarch
mariadb-tools-10.2.15-lp150.2.3.2.x86_64

comment:7 Changed 17 months ago by tomek

  • Milestone changed from Kea-proposed to Kea1.5
  • Priority changed from very high to high

Moving to 1.5 as discussed on our last Kea call.

comment:8 Changed 15 months ago by tomek

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.