Bug 1025195 - gear quota limit will be raised after migration when reaching the quota limit
gear quota limit will be raised after migration when reaching the quota limit
Product: OpenShift Online
Classification: Red Hat
Component: Image (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan McPherson
libra bugs
: UpcomingRelease
Depends On:
  Show dependency treegraph
Reported: 2013-10-31 04:28 EDT by zhaozhanqi
Modified: 2015-05-14 20:34 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-03-11 23:05:43 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)

  None (edit)
Description zhaozhanqi 2013-10-31 04:28:04 EDT
Description of problem:
Given an app created.the quota limit is 1024. and then ssh into app,add 1G big file in the repo directory. Do migration, check the quota limit will be 2048.

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

How reproducible:

Steps to Reproduce:
1.Prepare applications in devenv-stage_528 instance
2.check the quota by rhcsh into app
3. add 1G file in the repo directroy
   dd if=/dev/zero of bigfile bs=1M count=1024
4. Upgrade the devent-stage instance to latest as devenv_3973
5. After upgrade, clear broker cache, restart broker and mcollective services
6. Do datastore migration
  rhc-admin-migrate-datastore --compatible --version 2.0.35
7. Do gear migration
# oo-admin-upgrade upgrade-node --version 2.0.35 --ignore-cartridge-version

8. check the quota by rhcsh into app

Actual results:

step 7:
zqperl-zqd.dev.rhcloud.com 5271c3985c116dab120001a3]\> quota -s
Disk quotas for user 5271c3985c116dab120001a3 (uid 6764): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
     /dev/xvde2   1025M       0   2048M             164       0   40000 

however, check the storage:

 rhc cartridge storage -a zqperl --show -l zzhao@redhat.com

Perl 5.10
  Base Gear Storage:       1GB
  Additional Gear Storage: None

Expected results:
the limit still be 1024.

Additional info:
Comment 2 Dan McPherson 2014-02-17 17:52:49 EST

I have changed the code to set the quota back to the minimum possible.  So it will only take up the extra space the new cart required.  So you might use a few extra blocks/inodes but it will no longer take up double the space each time.
Comment 3 openshift-github-bot 2014-02-17 19:00:16 EST
Commit pushed to master at https://github.com/openshift/origin-server

Bug 1025195 - Reset quota to the min extra
Comment 4 Meng Bo 2014-02-17 22:36:36 EST
Checked on devenv_4387, issue has been fixed.

Following log found in the upgrade result:

"Migrating gear at /var/lib/openshift/5302cd88befd0a9020000006", 
"Relaxing quota to blocks=2097152, inodes=160000", 
"Marking step start_gear complete", 
"Gear restart time (ms): 1049", 
"Resetting quota blocks: 1048576  inodes: 80000", 

After migration, both the quota and inodes are reset to the default value.

Disk quotas for user 5302cd88befd0a9020000006 (uid 1000):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
     /dev/xvde2    962M       0   1024M           79282       0   80000

Move bug to verified.

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