Skip to content

KeyError exception during ROA import #962

@schelcj

Description

@schelcj

Describe the bug

ROA Importer is failing to complete with a KeyError exception being thrown during validate_all_routes() in rpki.validators. The uuid in question in each exception does not exist in the database.

Exceptions found in the logs:

2024-08-30 12:16:06,600 irrd[3350118]: [irrd.mirroring.mirror_runners_import#ERROR] An exception occurred while attempting a ROA import: UUID('46e0477b-98eb-4dc9-afbb-eafd3dd5aaa5')
Traceback (most recent call last):                                                                                                                                        
  File "/home/irrd/srv/releases/4.4.2/venv/lib/python3.10/site-packages/irrd/mirroring/mirror_runners_import.py", line 293, in run
    objs_now_valid, objs_now_invalid, objs_now_not_found = validator.validate_all_routes()
  File "/home/irrd/srv/releases/4.4.2/venv/lib/python3.10/site-packages/irrd/rpki/validators.py", line 123, in validate_all_routes
    rpsl_obj.update(rows_per_pk[rpsl_obj["pk"]])                                                                                                                          
KeyError: UUID('46e0477b-98eb-4dc9-afbb-eafd3dd5aaa5') 

To Reproduce

Haven't been able to manually reproduce this but have seen it happen on multiple importer runs.

Expected behaviour

For the ROA import to complete successfully.

IRRd version you are running

4.4.2

Additional context

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions