Skip to content

scheduler: implement /health endpoint for k8s and docker #1253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 15, 2025

Conversation

nuclearcat
Copy link
Member

Sometimes process might get stuck, and this compromise whole idea of scheduler, as events will get lost and etc.
We can implement http server thread that will watch for variable that is updated every "loop". If variable not updated anymore, loop is not working anymore.

Depends-on: kernelci/kernelci-core#2923

Sometimes process might get stuck, and this compromise whole idea
of scheduler, as events will get lost and etc.
We can implement http server thread that will watch for variable
that is updated every "loop". If variable not updated anymore,
loop is not working anymore.

Signed-off-by: Denys Fedoryshchenko <[email protected]>
@nuclearcat nuclearcat force-pushed the receive-event-nonblock branch from a48ba38 to 2a0797a Compare July 14, 2025 15:22
Copy link
Contributor

@pawiecz pawiecz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

super().__init__(server_address, RequestHandlerClass)
self.last_heartbeat = last_heartbeat

server = CustomHTTPServer(('0.0.0.0', 8080), HealthHandler, last_heartbeat)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know listen address was hardcoded to get the probe running quickly (same goes to FAILURE_TIMEOUT).

I'm still pointing it out to assure you I do read your patches before LGTMing them ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

@@ -68,22 +92,6 @@ spec:
- name: tmpsecrets
mountPath: /home/kernelci/.azure
subPath: k8s-credentials/.azure
initContainers:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct me if I'm wrong: this change is just a cleanup to group both initContainers together, not a functional one?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, i just spotted mistake when i was editing file. Not best approach to mix in PR, but at least did as separate commit. I was afraid yaml failure might lead to other failures, e.g. to read health section.

@nuclearcat nuclearcat force-pushed the receive-event-nonblock branch from 8b58976 to eb0067f Compare July 15, 2025 11:29
@nuclearcat nuclearcat added this pull request to the merge queue Jul 15, 2025
Merged via the queue into kernelci:main with commit 793e75b Jul 15, 2025
4 checks passed
@nuclearcat nuclearcat deleted the receive-event-nonblock branch July 15, 2025 20:07
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.

2 participants