Bug 1025195 - gear quota limit will be raised after migration when reaching the quota limit
Summary: gear quota limit will be raised after migration when reaching the quota limit
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Dan McPherson
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-31 08:28 UTC by zhaozhanqi
Modified: 2015-05-15 00:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-12 03:05:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zhaozhanqi 2013-10-31 08:28:04 UTC
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:
always

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
   cd $OPENSHIFT_REPO_DIR
   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
RESULT:

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 22:52:49 UTC
https://github.com/openshift/origin-server/pull/4788

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-18 00:00:16 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/86e3ec95acc630edfbfb7e3df5f292fd362616df
Bug 1025195 - Reset quota to the min extra

Comment 4 Meng Bo 2014-02-18 03:36:36 UTC
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.