feat(ogcore): update client status from agent heartbeat busy field #109

Merged
narenas merged 1 commits from notify_ogagent_status into main 2026-05-08 07:10:06 +02:00
Collaborator

feat(ogcore): update client status from agent heartbeat busy field

Summary

  • Heartbeat status sync: el ping periódico del agente ahora incluye los campos
    busy (bool) y st (tipo de OS: OGL/LNX/WIN/OSX). StatusController
    los procesa para mantener el estado del cliente sincronizado sin esperar a la
    respuesta de un comando:
    • busy: true → establece el estado BUSY
    • busy: false mientras el cliente está en BUSY → revierte al estado idle
      correcto (og-live, linux, windows, macos) según el campo st
  • Logging de transiciones de estado: todos los cambios de estado en el webhook
    (heartbeat y REBOOT/POWEROFF) quedan registrados en syslog
    (journalctl -t ogcore) con el estado anterior/nuevo y el tipo de OS
  • Gestión de ocupado en PowerOff/Reboot: PowerOffAction y RebootAction
    ahora distinguen HTTP 409 (agente ocupado) de 500 (error del agente) y encolan
    el comando en ambos casos, no solo en caso de error

Test plan

  • Lanzar un script en un cliente ogLive y verificar que el cliente pasa a estado
    busy en ogGUI en menos de 10 segundos (siguiente heartbeat)
  • Dejar que el script termine y verificar que el cliente vuelve a og-live sin
    sincronización manual
  • Repetir con un cliente Linux/Windows y verificar que revierte a
    linux/windows respectivamente
  • Enviar un apagado/reinicio a un cliente ocupado y verificar que el comando
    queda en cola (traza en estado PENDING)
  • Comprobar journalctl -t ogcore -f durante los pasos anteriores y verificar
    que aparecen las entradas de transición de estado

🤖 Generated with Claude Code

# feat(ogcore): update client status from agent heartbeat busy field ## Summary - **Heartbeat status sync**: el ping periódico del agente ahora incluye los campos `busy` (bool) y `st` (tipo de OS: `OGL`/`LNX`/`WIN`/`OSX`). `StatusController` los procesa para mantener el estado del cliente sincronizado sin esperar a la respuesta de un comando: - `busy: true` → establece el estado `BUSY` - `busy: false` mientras el cliente está en `BUSY` → revierte al estado idle correcto (`og-live`, `linux`, `windows`, `macos`) según el campo `st` - **Logging de transiciones de estado**: todos los cambios de estado en el webhook (heartbeat y REBOOT/POWEROFF) quedan registrados en syslog (`journalctl -t ogcore`) con el estado anterior/nuevo y el tipo de OS - **Gestión de ocupado en PowerOff/Reboot**: `PowerOffAction` y `RebootAction` ahora distinguen HTTP 409 (agente ocupado) de 500 (error del agente) y encolan el comando en ambos casos, no solo en caso de error ## Test plan - [ ] Lanzar un script en un cliente ogLive y verificar que el cliente pasa a estado `busy` en ogGUI en menos de 10 segundos (siguiente heartbeat) - [ ] Dejar que el script termine y verificar que el cliente vuelve a `og-live` sin sincronización manual - [ ] Repetir con un cliente Linux/Windows y verificar que revierte a `linux`/`windows` respectivamente - [ ] Enviar un apagado/reinicio a un cliente ocupado y verificar que el comando queda en cola (traza en estado `PENDING`) - [ ] Comprobar `journalctl -t ogcore -f` durante los pasos anteriores y verificar que aparecen las entradas de transición de estado 🤖 Generated with [Claude Code](https://claude.ai/claude-code)
narenas added 1 commit 2026-05-08 07:09:13 +02:00
testing/ogcore-api/pipeline/head There was a failure building this commit Details
testing/ogcore-api/pipeline/pr-main There was a failure building this commit Details
90f06de0a0
feat(ogcore): update client status from agent heartbeat busy field
- StatusController: process 'busy' and 'st' fields from agent heartbeat
  to keep client status in sync without waiting for a command response.
  busy:true sets BUSY; busy:false reverts to og-live/linux/windows/macos
  based on the 'st' field sent by the agent
- StatusController: add detailed logging for all status transitions
  (heartbeat and REBOOT/POWEROFF) visible via journalctl -t ogcore
- PowerOffAction, RebootAction: distinguish HTTP 409 (agent busy) from
  500 (agent error) and enqueue the command in both cases
narenas merged commit dbf54ed81a into main 2026-05-08 07:10:06 +02:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: opengnsys/ogcore#109
There is no content yet.