Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Kea Kea
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 501
    • Issues 501
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 54
    • Merge requests 54
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • KeaKea
  • Merge requests
  • !1626

Resolve "kea-admin lease-upload fails if CSV file contains duplicate leases"

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Andrei Pavel requested to merge 2293-kea-admin-lease-upload-duplicate-leases into master Apr 05, 2022
  • Overview 21
  • Commits 7
  • Changes 7

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 in lease-upload and also changed it in lease-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.
  • 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 with Empty DUIDs not allowed. So I added a DUID.
  • 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 the rm -f "${output_file}" at the beginning of the text, see the associated comment. But I thought I would keep the non-interactive fix too.
Edited May 23, 2022 by Andrei Pavel
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 2293-kea-admin-lease-upload-duplicate-leases