Skip to content
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

FEATURE: Create function to check if SMD service is ready through /service/ready endpoint #15

Open
Masber opened this issue Apr 6, 2024 · 0 comments

Comments

@Masber
Copy link
Collaborator

Masber commented Apr 6, 2024

Introduction

it would be good to have an integration of the service health endpoints for relevant CSM/OpenCHAMI services into mesa.
This ticket is to create a service health check for the SMD/HSM service https://github.com/Cray-HPE/hms-smd . The goal is to create a function in mesa under mesa::hsm module (https://github.com/eth-cscs/mesa/blob/main/src/hsm.rs).
This code could be reused for OpenCHAMI if we decide to adapt mesa to it in the future.

How to implement (suggestion)

create a new Rust module mesa::hsm::service and create a function inside called ready the function signature could be something like pub fn async ready() -> Result<bool, Error>. This function should return the return message from the API like the example below:

# curl -s -H "Authorization: Bearer $TOKEN" https://api-gw-service-nmn.local/apis/smd/hsm/v2/service/ready | jq
{
  "code": 0,
  "message": "HSM is healthy"
}

A reference/example to create a http request against a CSM endpoint can be found in https://github.com/eth-cscs/mesa/blob/main/src/cfs/configuration/shasta/http_client.rs#L12

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

No branches or pull requests

1 participant