Resolve "MySQL schema support for lease limits"
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 searchingcheck_file_overwrite
inkea-admin.in
. - The truncation in
are-scripts-in-sync.py
is no longer required since we started matching specific versions for theThis.*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 fromdhcpdb_create
or theupgrade
script. So the truncation was removed. - The change from
This line starts the database upgrade
toThis line starts the schema upgrade
is purely cosmetical. - Some
UPGRADE schema_version
statements were missing indhcpdb_create.pgsql
. They are important for debugging what version you're on in case the script fails.
Edited by Andrei Pavel