Skip to content

Conversation

@agarcia-rb
Copy link

The state reported by systemd has been aligned with the real runtime state of rb-exporter, preventing the service from being shown as active when no pmacctd processes are running. To achieve this, the RemainAfterExit option was removed, as it caused false active states, and logic was added to detect and clean up stale pidfiles and lockfiles, returning an error code when no exporter instance can be started. With these changes, systemd correctly reflects the service state and Chef can detect failures and automatically restart rb-exporter when it is enabled from the manager.


Se ha alineado el estado reportado por systemd con el estado real de rb-exporter, evitando que el servicio aparezca como activo cuando no existen procesos pmacctd en ejecución. Para ello, se eliminó la opción RemainAfterExit, que provocaba estados falsos de ejecución, y se añadió lógica para detectar y limpiar pidfiles y lockfiles obsoletos, devolviendo un código de error cuando no se consigue arrancar ninguna instancia. Con estos cambios, systemd refleja correctamente el estado del servicio y Chef puede detectar el fallo y relanzar automáticamente rb-exporter cuando está habilitado desde el manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants