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

Add request param to calculate partition capacity for specific project #588

Merged
merged 4 commits into from
Nov 11, 2024

Conversation

Gerrit91
Copy link
Contributor

@Gerrit91 Gerrit91 commented Nov 7, 2024

Description

This helps in cases where you have machine reservations for a project and want to display the proper free counts for it.

Some higher-level applications check if clusters can be created by using the partition capacity call and prevent creation in case not enough machines are available. These applications will then be enabled to check the counts for specific projects and let them pass in case there are reservations for this project.

@Gerrit91 Gerrit91 marked this pull request as ready for review November 7, 2024 15:03
@Gerrit91 Gerrit91 requested a review from a team as a code owner November 7, 2024 15:03
@Gerrit91 Gerrit91 requested a review from majst01 November 7, 2024 15:03
This helps in cases where you have machine reservations for a project and want to display the proper free counts in case this project.
@Gerrit91 Gerrit91 force-pushed the partition-capacity-for-project branch from 81635e9 to c80e786 Compare November 11, 2024 08:41
@majst01
Copy link
Contributor

majst01 commented Nov 11, 2024

linter was updated, i will prepare a linter fix PR

@Gerrit91
Copy link
Contributor Author

❯ m partition capacity --size c1-large-x86
PARTITION   SIZE           ALLOCATED   FREE   UNAVAILABLE   RESERVATIONS   |   TOTAL   |   FAULTY 
fra-equ01   c1-large-x86   1           1      1             0              |   3       |   0        
Total                      1           1      1             0              |   3       |   0        

❯ m size reservation create --project dc565451-3864-4355-bef5-080a9d0e4068 --size c1-large-x86 --amount 1 --partitions fra-equ01
---
amount: 1
changed: "2024-11-11T10:27:36.560Z"
created: "2024-11-11T10:27:36.560Z"
id: d52e3b30-8ccd-4abb-bd23-cb729592f4cb
partitionids:
- fra-equ01
projectid: dc565451-3864-4355-bef5-080a9d0e4068
sizeid: c1-large-x86

❯ m partition capacity --size c1-large-x86
PARTITION   SIZE           ALLOCATED   FREE   UNAVAILABLE   RESERVATIONS   |   TOTAL   |   FAULTY 
fra-equ01   c1-large-x86   1           0      1             1 (0/1 used)   |   3       |   0        
Total                      1           0      1             1              |   3       |   0    

❯ m partition capacity --size c1-large-x86 --project-id dc565451-3864-4355-bef5-080a9d0e4068
PARTITION   SIZE           ALLOCATED   FREE   UNAVAILABLE   RESERVATIONS   |   TOTAL   |   FAULTY 
fra-equ01   c1-large-x86   1           1      1             1 (0/1 used)   |   3       |   0        
Total                      1           1      1             1              |   3       |   0     

@majst01 majst01 merged commit 0b41d8d into master Nov 11, 2024
2 checks passed
@majst01 majst01 deleted the partition-capacity-for-project branch November 11, 2024 12:57
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