Opened 4 years ago

Closed 4 years ago

#4238 closed defect (fixed)

MySQL foreign key constraint prevents kea-dhcp6 from inserting leases with hwarddr_source = 0

Reported by: tmark Owned by: tmark
Priority: high Milestone: Kea1.0
Component: database-all 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


MySQL schema version 4 added a foreign key constraint requiring lease6 hdwaddr_source map to a value in lease6_hwaddr_source. Unfortunately there is no entry in lease6_hwaddr_source for a source value of 0, which prevents kea-dhcp6 from inserting leases without an hwaddr.

We need to add an entry for 0 and probably ANY = 255 to the schema creation and upgrade scripts.

The dhcpsrv unit tests are currently using schema_mysql_copy.h which has all of the foreign keys commented out. This is wrong. We need to make the unit tests in dhcpsrv use the actual schema creation script. We would have caught this had this been case. I am goig to open another ticket to address that.t


Change History (3)

comment:1 Changed 4 years ago by tmark

  • Owner set to tmark
  • Status changed from new to assigned

comment:2 Changed 4 years ago by tmark

In order to reduce the number of MySQL schema version increases, this ticket is being worked as part of #4237.

The unit tests changes will be made under #4239.

comment:3 Changed 4 years ago by tmark

  • Resolution set to fixed
  • Status changed from assigned to closed

#4237 has been completed and merged with git # f0fb9f35a394785215573a591c2bcc68ab481436, which resolved this ticket.

This ticket is closed.

Note: See TracTickets for help on using tickets.