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 requests and limits to Persistent Volume Claim #74

Merged
merged 1 commit into from
Oct 30, 2017

Conversation

zakiva
Copy link
Contributor

@zakiva zakiva commented Sep 24, 2017

@miq-bot
Copy link
Member

miq-bot commented Sep 24, 2017

Checked commit zakiva@fbb610d with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks fine. 🍪

@Fryguy
Copy link
Member

Fryguy commented Oct 9, 2017

@zakiva @simon3z I'm ok with this, but why is this modeled as a serialized Hash as opposed to fully modeled out? Will we ever want it more modeled out in the future?

@simon3z
Copy link
Contributor

simon3z commented Oct 9, 2017

Will we ever want it more modeled out in the future?

@zakiva can you reference the relevant BZ in the description? I wonder if indeed we want to model that now.

@zakiva
Copy link
Contributor Author

zakiva commented Oct 16, 2017

@zakiva can you reference the relevant BZ in the description? I wonder if indeed we want to model that now.

I didn't find a relevant BZ for that (maybe @Loicavenel knows if we have one).
Anyway, this is part of the storage for chargeback feature @zeari is working on. We currently collect only the actual capacity of the pvc's bounded volume, which also saved as a serialized hash and been accessed in some places, here for example.

@zakiva
Copy link
Contributor Author

zakiva commented Oct 29, 2017

@simon3z Do you want to merge this before the freeze?

@Loicavenel
Copy link

@zakiva @zeari can you tell me what is this PR is about? I am not sure I understand it. Is it to have Chargeback for VolumeS?

@zeari
Copy link

zeari commented Oct 30, 2017

@zakiva @zeari can you tell me what is this PR is about? I am not sure I understand it. Is it to have Chargeback for VolumeS?

@Loicavenel yes. the values we are collecting now might not be the correct values to use for chargeback with storage.

@Loicavenel
Copy link

@zeari can you be more explicite? We do have PV and the Size... this is fixed.. how it can be wrong?

@zakiva
Copy link
Contributor Author

zakiva commented Oct 30, 2017

@zeari can you be more explicite? We do have PV and the Size... this is fixed.. how it can be wrong?

@Loicavenel The claim can have 3 different values related to the storage size:

  1. allocated - this is the actual allocated storage of the bounded volume.
  2. requested - the requested size by the claim, this is a lower bound for the allocated size.
  3. limit - upper bound.

We currently persist only the first one, this PR adds the other two.

@zeari
Copy link

zeari commented Oct 30, 2017

@zeari can you be more explicite? We do have PV and the Size... this is fixed.. how it can be wrong?

The capacity we are currently listing is the size of PV that was assigned to a pod\project instead of how much the claim asked for. If you request 1GB volume, you might be assigned a 2GB volume since that is the volume closest to the size to what you ask. So the size we know about would be 2GB instead if what was actually requested.
It makes more sense to charge for what someone asked for instead of what they were upgraded to.
@zakiva @simon3z Correct me if im wrong.

@Loicavenel
Copy link

@zeari so, Openshift is rounding up to the closest higher GB?

@zeari
Copy link

zeari commented Oct 30, 2017

The process AFAIK

  1. a project\pod requests a PV of size x
  2. openshift has(for example) PVs of size 1GB, 2GB, 3GB...
  3. openshift finds a PV with a size closest to x and binds it to that project

@Loicavenel
Copy link

I look in the doc here: https://docs.openshift.com/container-platform/3.5/dev_guide/compute_resources.html.. I don't see anything in Limits regarding PV storage. But I see it in Quota... requests.storage.
Where the PoD request will come from? how do we know what was requested?

@zakiva
Copy link
Contributor Author

zakiva commented Oct 30, 2017

I look in the doc here: https://docs.openshift.com/container-platform/3.5/dev_guide/compute_resources.html.. I don't see anything in Limits regarding PV storage. But I see it in Quota... requests.storage.

These limits/quotas are in project level (summary of resources used in the project). The requested storage in this PR is per specific Persistent Volume Claim which represents a specific user request for storage, e.g. one pod needs 1GB.

@zakiva
Copy link
Contributor Author

zakiva commented Oct 30, 2017

@Fryguy PTAL

@chessbyte chessbyte merged commit 08d1171 into ManageIQ:master Oct 30, 2017
@chessbyte chessbyte added this to the Sprint 72 Ending Oct 30, 2017 milestone Oct 30, 2017
@chessbyte chessbyte assigned chessbyte and unassigned Fryguy Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants