krill icon indicating copy to clipboard operation
krill copied to clipboard

Krill cannot remove child if child-parent handshake was never completed

Open Koenvh1 opened this issue 2 months ago • 0 comments

If a parent adds a child (e.g. krillc children add --ca testbed --child koen --request test-request.xml --ipv6 2001:db8::/32) and then tries to remove it (e.g. krillc children remove --ca testbed --child koen), it returns an error:

Error response from URI: https://localhost:3000/api/v1/cas/testbed/children/koen, Status: 400 Bad Request, ErrorResponse: {"label":"sys-kv","msg":"Key/Value error: Store error: failed to delete file '/var/lib/krill/data/status/testbed/children-koen.json': No such file or directory (os error 2)","args":{"cause":"Store error: failed to delete file '/var/lib/krill/data/status/testbed/children-koen.json': No such file or directory (os error 2)"}}

Adding it again is not possible either:

Error response from URI: https://localhost:3000/api/v1/cas/testbed/children, Status: 400 Bad Request, ErrorResponse: {"label":"ca-child-duplicate","msg":"CA 'testbed' already has a child named 'koen'","args":{"child":"koen","ca":"testbed"}}

Updating works just fine.

This only happens when the child did not complete the handshake, i.e. added the parent's response. If the child does complete it, the file will exist, and deleting works just fine.

(relates to https://github.com/NLnetLabs/krill/issues/1191#issuecomment-3421861052)

Koenvh1 avatar Oct 20 '25 15:10 Koenvh1