Skip to content

Resolve "MySQL schema support for lease limits"

Andrei Pavel requested to merge 2438-mysql-schema-support-for-lease-limits into master

Closes #2438 (closed).

  • 5d2d52bf some outstanding minor corrections
  • 1b4a29f1 MySQL schema changes in support of lease limiting
  • 4c74672d add tests for lease counting
  • 97d730f9 add ChangeLog entry

Apart from the minor corrections mentioned above, justifying some changes:

  • While developing these schema changes, lease upload tests would fail because of the schema changes in this MR. On a second run, it would halt because of kea-admin asking for input. The changes in lease dump and lease upload tests address this problem. The tests clean up better now, removing /tmp/$(basename "${output_file}").tmp or "/tmp/$(basename "${input_file}").tmp" based on the test that is run. You can see these files are prompted input on by searching check_file_overwrite in kea-admin.in.
  • The truncation in are-scripts-in-sync.py is no longer required since we started matching specific versions for the This.*starts line. And it causes the script to display not relevant output if you have a difference that spans too many lines. You can test it by removing a sizable portion from dhcpdb_create or the upgrade script. So the truncation was removed.
  • The change from This line starts the database upgrade to This line starts the schema upgrade is purely cosmetical.
  • Some UPGRADE schema_version statements were missing in dhcpdb_create.pgsql. They are important for debugging what version you're on in case the script fails.
Edited by Andrei Pavel

Merge request reports