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

update usage formulas for Manila shares as requested by Manila team #176

Closed
wants to merge 1 commit into from

Conversation

majewsky
Copy link
Contributor

@majewsky majewsky commented Jul 4, 2023

Based on a request from @chuan137. Can you guys please verify that I understood the requirement correctly?

Copy link
Contributor

@Carthaca Carthaca left a comment

Choose a reason for hiding this comment

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

Let's exercise some examples:

Assumption: Castellum shrinks when usage is below 50%, extends when usage above 80%. Percentage-step resizing with 10%.
Share size 10GB in manila => 20GB volume in NetApp with volume usable size 10GB and snapshot reserve 10GB.
Terms: Spillover == snapshot space is eating up into volume usable size, i.e. snapshot usage > 100%

Example A:
Volume usage 60% (6 of 10GB), snapshot usage 90% (9 of 10 GB)
-> NEW: share would be extended to 12GB (50% vol and 75% snap usage)
-> OLD: no action
-> not ideal, no spillover and volume usage was not high

Example B:
Volume usage 40%, snapshot usage 60%
-> NEW: no action
-> OLD: share would be shrinked to 8GB (50% vol and 75% snap usage)
-> not ideal, old scenario had no spillover either

So I think what we want is: never shrink lower than 100% snap usage and extend if snap usage > 100%.
So using a fixed value of 100% snap usage instead of the values set from the customers that were meant for the volume size usable in the active filesystem.

Wdyt?

@Carthaca
Copy link
Contributor

@majewsky can we have it that way, that customers can set the threshold for volume usage and snapshot usage independently?

@majewsky
Copy link
Contributor Author

In principle, we do support multi-usage resources (currently only used for server groups that scale with CPU usage and RAM usage). However, changing this on an existing asset type is a breaking change in the API and UI. We should be extremely sure that it's a good idea before proceeding down that path.

@chuan137
Copy link
Member

Can we keep the old logic for proposing new share size, and add additional step to make sure the new share size is not smaller than snapshotUsage, sth like

newSize = proposeNewSize(volumeUsageSize, ...)
newSize = max(snapshotUsageSize, newSize)

UI can be kept as it was? Snapshot usage is handled internally and kept away from Customer's consideration.

@majewsky
Copy link
Contributor Author

majewsky commented Jul 26, 2023

That would require adding an asset-level MinSize constraint into the core logic. After going through all the calculations again with my colleagues over here, I can see that this would be required for a full solution. However, adding this constraint requires working on the core logic and thus would be a substantial undertaking to ensure that no bugs are accidentally introduced.

I propose the following plan:

  1. To avoid situations like this where we end up doing lots of roundtrips because I need to implement a formula that should fundamentally be under your control, I would like you to add metrics to the netapp-exporter that reflect the result of all those calculations, e.g.
    netapp_volume_size_bytes_for_castellum # must be equal to what the Manila API reports
    netapp_volume_usage_bytes_for_castellum
    netapp_volume_min_size_bytes_for_castellum # share size that Castellum should never resize below
    
    I'm not attached to these names, obviously; feel free to come up with better names if you like.
  2. As I implement these metrics, I add support for the asset-level MinSize constraint to the Castellum scaling logic.

@majewsky
Copy link
Contributor Author

majewsky commented Aug 15, 2023

FYI: I had some time today and implemented the option for asset-level MinSize constraints in the core logic (2fceeb6).

@chuan137
Copy link
Member

PR for the metrics including the minimal share size

@majewsky
Copy link
Contributor Author

We have moved to a different set of metrics that allow the Manila team to have ownership of these formulas.

@majewsky majewsky closed this Oct 16, 2023
@majewsky majewsky reopened this Oct 16, 2023
@majewsky majewsky closed this Oct 16, 2023
@majewsky majewsky deleted the update-manila-formulas branch October 16, 2023 09:54
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.

None yet

3 participants