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

Take amount of reservations into account for free machine count. #538

Merged
merged 20 commits into from
Sep 13, 2024

Conversation

Gerrit91
Copy link
Contributor

@Gerrit91 Gerrit91 commented Jun 12, 2024

Currently it's not possible to see overbooking and also it is not possible to see how many machines are really in the pool of waiting machines because the reservations are not considered in the free count.

This PR adds the following changes:

  • The faulty machine count is now always counted, independent of allocation state (this is IMHO clearer because it aligns with the output of machine issues)
  • There are now dedicated counts that deal with machine allocation
    • The free machine count is now really the amount of machines that can be allocated by anyone (waiting machines that are available and not reserved).
    • A new unavailable count is introduced, which shows the machines that are not allocatable at the moment because they are not waiting or locked
    • allocated count now reflects machines that are allocated by a project
    • These three counts add up to total count
  • Then there are dedicated counts for machine provisioning states, they are independent of the allocation-specific counts presented above
    • A new waiting count is introduced, which shows how many machines are in the waiting provisioning state
    • A new phoned home is introduced, which shows how many machines are in the phone home provisioning state
    • The other count shows how many machines are in another provisioning state
    • These three counts also add up to total count

Breaking Change

The partition capacity calculation was improved to include machine reservation counts. For example the free machine count is now reduced in case there is a size reservation with unused reservations for this machine size. Please adapt metrics and dashboards if necessary.

@Gerrit91 Gerrit91 changed the title Take amount of used reservations into account for free machine count. Take amount of reservations into account for free machine count. Jul 29, 2024
@Gerrit91 Gerrit91 marked this pull request as ready for review July 30, 2024 07:07
@Gerrit91 Gerrit91 requested a review from a team as a code owner July 30, 2024 07:07
@Gerrit91 Gerrit91 requested a review from mwennrich July 30, 2024 07:07
@Gerrit91
Copy link
Contributor Author

metalctl partition capacity could then look like:

❯ m partition capacity
PARTITION   SIZE            ALLOCATED   WAITING   OTHER   TOTAL   ||   FREE   FAULTY   RESERVATIONS 
fra-equ01   c1-large-x86        2          1        0       3     ||    1       0           0         
fra-equ01   c1-xlarge-x86       6          1        1       8     ||    1       1           0         
fra-equ01   c2-large-x86        4          0        0       4     ||    0       3           0         
fra-equ01   g1-medium-x86       0          1        0       1     ||    1       1           0         
fra-equ01   n1-medium-x86       7          1        0       8     ||    0       1      0 (1/1 used)   
fra-equ01   s2-xlarge-x86       3          0        0       3     ||    0       0           0         
fra-equ01      unknown          0          0        1       1     ||    0       1           0         
    Σ                          22          4        2      28     ||    3       7           0    

@Gerrit91
Copy link
Contributor Author

We could also add an "Unvailable" count which shows how many machines are either locked or reserved through machine state.

@Gerrit91
Copy link
Contributor Author

Gerrit91 commented Jul 30, 2024

I now made it like this:

❯ m partition capacity       
PARTITION   SIZE            ALLOCATED   FREE   UNAVAILABLE   RESERVATIONS   |   TOTAL   |   FAULTY 
fra-equ01   c1-large-x86    2           1      0             0              |   3       |   0        
fra-equ01   c1-xlarge-x86   6           2      0             0              |   8       |   1        
fra-equ01   c2-large-x86    4           0      0             0              |   4       |   3        
fra-equ01   g1-medium-x86   0           1      0             0              |   1       |   0        
fra-equ01   n1-medium-x86   7           0      1             0 (1/1 used)   |   8       |   0        
fra-equ01   s2-xlarge-x86   3           0      0             0              |   3       |   0        
fra-equ01   unknown         0           0      1             0              |   1       |   1        
Σ                           22          4      2             0              |   28      |   5        

❯ m partition capacity -o wide     
PARTITION   SIZE            ALLOCATED   FREE   UNAVAILABLE   RESERVATIONS   |   TOTAL   |   FAULTY   PHONED HOME   WAITING   OTHER 
fra-equ01   c1-large-x86    2           1      0             0              |   3       |   0        2             1         0       
fra-equ01   c1-xlarge-x86   6           2      0             0              |   8       |   1        6             1         1       
fra-equ01   c2-large-x86    4           0      0             0              |   4       |   3        1             0         3       
fra-equ01   g1-medium-x86   0           1      0             0              |   1       |   0        0             1         0       
fra-equ01   n1-medium-x86   7           0      1             0 (1/1 used)   |   8       |   0        7             1         0       
fra-equ01   s2-xlarge-x86   3           0      0             0              |   3       |   0        3             0         0       
fra-equ01   unknown         0           0      1             0              |   1       |   1        0             0         1       
Σ                           22          4      2             0              |   28      |   5        19            4         5   

@Gerrit91 Gerrit91 merged commit 732b6ca into master Sep 13, 2024
2 checks passed
@Gerrit91 Gerrit91 deleted the partition-capacity-with-reservations branch September 13, 2024 09:55
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