Skip to content

Fix intermittent 500/504 failures for GET Power State #877

@graikhel-intel

Description

@graikhel-intel

A customer reported intermittent failures when calling: GET /api/v1/amt/power/state/GUID. They observed that this API sometimes fails with 500 or 504 errors, sometimes multiple times in a row, before eventually succeeding.

In the 500 failure case, Console is also generating a panic in the logs.

Observed panic:

2026/04/01 16:01:56 [Recovery] 2026/04/01 - 16:01:56 panic recovered:
GET /api/v1/amt/power/state/GUID

runtime error: index out of range [0] with length 0
/usr/local/go/src/runtime/panic.go:115
/app/internal/usecase/devices/power.go:147
/app/internal/controller/httpapi/v1/power.go:14
....

Customer environment:

  • Console version: v1.22.4
  • AMT version: 18.x

This needs to be fixed so the API handles this scenario safely and does not panic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions