Resolve "kea-admin lease-upload fails if CSV file contains duplicate leases"
Closes #2293 (closed).
-
c52f590b call kea-lfc in kea-admin lease-upload - One thing here is the placement of temporary files in
/tmp
rather than in the same directory. I've done this inlease-upload
and also changed it inlease-dump
for consistency. This tries to address various permission problems that were mentioned in another issue. On one hand, the user might not have permission to write to the same directory as was done before in lease-dump. On the other, it just delays the write to the actual file further, so not much progress is actually done. However, lease-upload does succeed this way if the user does not have write permissions to the directory.
- One thing here is the placement of temporary files in
-
3116ab4e adjust tests for kea-lfc called in kea-admin lease-upload - LFC formats the user context, probably through
.toElement()->str()
which spaces it out more, so I had to adjust CSV reference files and some inserts in tests. You can remove these spacings to see the failure. - LFC did not load the second row in
lease6_dump_test.reference.csv
. It complains withEmpty DUIDs not allowed
. So I added a DUID.
- LFC formats the user context, probably through
-
30368501 assume a default for kea-admin on non-interactive shells - This commit is extraneous to the issue, but please read the story first. While developing I had unit tests block in the
Do you want to continue?
question because a file would be left from a previous test failure. The question did not even appear probably due to flushing problems that I don't know how to fix off the top of my head. What I thought happened was that the tests ran in a non-interactive shell and I thought I would fix that. It turned out not to be a problem and the proper fix was therm -f "${output_file}"
at the beginning of the text, see the associated comment. But I thought I would keep the non-interactive fix too.
- This commit is extraneous to the issue, but please read the story first. While developing I had unit tests block in the
Edited by Andrei Pavel