Skip to content

Power State API doesn't timeout if device is not actually connected to MPS #328

@msbreton

Description

@msbreton

Describe the bug 🪲
If you call /api/v1/amt/power/state/{guid} when a device is CIRA disconnected, but MPS has not yet updated the state (has not yet timed out and connectionStatus is still true) then MPS doesn't timeout and does not return a proper status code.

To Reproduce 🪜
Steps to reproduce the behavior:

  1. Activate device in CCM / CIRA
  2. Connect device
  3. Remove network cable
  4. In less than 90 seconds, call /api/v1/amt/power/state/{guid}

Expected behavior
API should timeout in a reasonable time (15 seconds?) and respond with a proper status code (404?).

Screenshots 🖼️
If applicable, add screenshots to help explain your problem.
d772aef2-9199-4b5a-8787-5db3898d6f7b

AMT Device (please complete the following information): 🖥️

  • OS: [e.g. Linux Kernel & Version]
  • AMT Version: [e.g. 11.8.5, 12.0.45]
  • AMT Configuration Mode: [e.g. Admin Control Mode or Client Control Mode]
  • Network Configuration [e.g. Dynamic IP or Static IP]

Service Deployment (please complete the following information): ⛈️

  • Deployment Type: [e.g. Azure, Docker, K8s]
  • Node Version: [e.g. LTS 14]
  • Component & Version: MPS version 2.13.10.

Additional context
Here is the code we suspect is missing the timeout.
https://github.com/open-amt-cloud-toolkit/mps/blob/bb713a3e62f4d0abcbb98923892ba1ad7a699c6a/src/routes/amt/getPowerState.ts#L15

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Status

Q2 2025

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions