Skip to content

Conversation

@cesnietor
Copy link
Collaborator

@cesnietor cesnietor commented Sep 2, 2020

Resouces api changed to GET on /api/v1/cluster/max-allocatable-memory
which returns the max allocatable memory for a given number of nodes,
nodes with taints NoExecute or NoSchedule shall not be considered.
request needs to be e.g.

/api/v1/cluster/max-allocatable-memory?num_nodes=4

Response payload:

{
    "max_memory": 4131528704
}

If not enough nodes or no available memory response will be empty {}

  • Tests included

@cesnietor cesnietor self-assigned this Sep 2, 2020
tags:
- AdminAPI

/cluster/resources:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this is no longer needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not anymore, this was meant to be for the same feature of calculating the max ram but we'll do it in this new api

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think resources could also express storage capacity if available right? I think nesting this API under resources made sense

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that api is no longer needed, was designed for the main purpose

Alevsk
Alevsk previously approved these changes Sep 2, 2020
@cesnietor cesnietor added the WIP This PR is WIP and cannot be merged yet label Sep 2, 2020
@cesnietor cesnietor removed the WIP This PR is WIP and cannot be merged yet label Sep 2, 2020
@cesnietor cesnietor requested review from Alevsk and bexsoft September 2, 2020 20:56
@cesnietor
Copy link
Collaborator Author

PR modified to use queryparameter instead of body parameter

@dvaldivia dvaldivia merged commit 624891a into minio:master Sep 3, 2020
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.

4 participants