Bug 844948 - The quota didn't change after move app from medium district to small district
The quota didn't change after move app from medium district to small district
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Rob Millner
libra bugs
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-08-01 06:39 EDT by Rony Gong
Modified: 2015-05-14 18:57 EDT (History)
3 users (show)

See Also:
Fixed In Version: devenv_1933
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-07 16:43:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
development.log (8.70 KB, text/plain)
2012-08-01 06:39 EDT, Rony Gong
no flags Details

  None (edit)
Description Rony Gong 2012-08-01 06:39:50 EDT
Created attachment 601705 [details]

Description of problem:
The quota didn't change after move app from medium district to small district

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Setup multi node env, and create 2 districts, small and medium
2.Create a medium app, eg php
3.Move this php to small node across district.
4.Check the quota of this app
Actual results:
Still large for that 468114
[qphp-qgong1.dev.rhcloud.com ~]\> quota
Disk quotas for user 1263e78e26a343ab9050554ea167d321 (uid 1002): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
     /dev/xvde2     620       0 1048576             159       0  468114  

Expected results:
The files limit should be 40000, small

Additional info:
I find if move app from small to medium district, the quota could change to meidum.
Comment 1 Dan McPherson 2012-08-01 09:44:31 EDT
Why is the inodes limit different for small vs medium (or any gear size using 1G for that matter)?  From what we are selling we say they are both 1G.  I would expect changing gear sizes wouldn't give me more files I can add within the same space.  The issue being that going from a medium to small would mean my same data might not fit (once we allow users to make these kinds of choices).
Comment 2 Rob Millner 2012-08-01 13:54:19 EDT
[rmillner@splat stickshift]$ grep quota_files *

It seems accidental that the medium quota is different than either the large or the small.

When you migrate from medium to small; should the quota retain medium's settings or should it force quota small?  

The former means we risk over-allocating disk on the small ex nodes.  The latter means we either risk a failure if the app's disk usage is beyond the limit or have to build in additional checks.

For this sprint; I'm going to verify that moving the quota is intentional behaviour.  If so, then this will move to FutureFeature to determine what the correct behaviour should be.
Comment 3 Rob Millner 2012-08-01 14:18:28 EDT
From the logs and code; it seems as though we're intentionally setting the new quota based on the old on.  Moving to FutureFeature to discuss if that's the correct semantics.
Comment 4 Dan McPherson 2012-08-01 14:39:06 EDT
That is the correct semantics.  Once they are given more space we can't just take it away.  But the issue is we set a different inodes limit for small vs medium gears.  I think that was done because the medium gears had less apps.  But I believe that's the wrong logic.  We should keep the same 1G standard across all gear sizes.
Comment 5 Rob Millner 2012-08-01 14:46:48 EDT
Agreed - and its a quick fix to set medium's quotas to the same as small and large.

Pull request:
Comment 6 Rob Millner 2012-08-01 14:48:19 EDT
Taking off future Feature since its being dealt with in this sprint.
Comment 7 Rob Millner 2012-08-01 14:50:19 EDT
Pull request accepted.
Comment 8 Chandrika Gole 2012-08-02 13:32:43 EDT
Verified - all node profiles now have same default quota limit i.e. 40000

To test -

1. Created 2 districts, one small one medium
2. Added a node with a small profile to the small distrct and a medium profile node to the large district
3. Create a app.
4. login to the app and type quota. Make sure the files limit is 40000
5. Check which district the app is in and move the app to the other district
6. login to the app and type quota. Make sure the files limit is 40000

Note You need to log in before you can comment on or make changes to this bug.