Skip to content

SQS Monitor should handle all kinds of InvalidInstanceID errors #1034

@guessi

Description

@guessi

Describe the bug

If invalid event format in queue, NTH would failed.

Steps to reproduce

Produce invalid instance id to queue, and NTH would emit error as follow

{"level":"error","error":"InvalidInstanceID.Malformed: Invalid id: \"arn:aws:ec2:REGION:ACCOUNT_ID:instance/INSTANCE_ID\"\n\tstatus code: 400, request id: ...","time":"...","message":"ignoring interruption event due to error"}
...
{"level":"error","error":"some interruption events for message Id ... could not be processed","time":"...","message":"error processing interruption events"}
...
{"level":"warn","event_type":"SQS_MONITOR","error":"none of the waiting queue events could be processed","time":"...","message":"There was a problem monitoring for events"}
...

// ... few rounds later, NTH will stop working
{"level":"warn","time":"...","message":"Stopping NTH - Duplicate Error Threshold hit."}

Expected outcome

NTH should ignore the error and continue its work.

Application Logs

See above description

Environment

  • NTH App Version: latest
  • NTH Mode (IMDS/Queue processor): Queue
  • OS/Arch: n/a
  • Kubernetes version: n/a
  • Installation method: n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions