Bug 902243 - Quotas are wiped out for old apps when 'yum update' is done as part of migration on devenv
Summary: Quotas are wiped out for old apps when 'yum update' is done as part of migrat...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-21 08:50 UTC by Jianwei Hou
Modified: 2015-05-14 23:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-15 14:17:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
yum update log (331.23 KB, text/x-log)
2013-01-23 03:24 UTC, Jianwei Hou
no flags Details
yum update log (331.23 KB, text/x-log)
2013-01-23 03:25 UTC, Jianwei Hou
no flags Details

Description Jianwei Hou 2013-01-21 08:50:40 UTC
Description of problem:
After upgrade and migrate, ssh into gear and run 'quota' ,  command line returns "Disk quotas for user bffc73524c7b4208bd89872d5567e08d (uid 552): none"
This can be reproduced regardless of gear type, user's plan_id etc.

Version-Release number of selected component (if applicable):
from stage_272 upgraded to fork_ami_434

How reproducible:
Always

Steps to Reproduce:
1. Create an application with mongodb embedded, set 3G additional quota to mongodb as megashift user
2. Copy pacakges under ~/devenv-local and local.repo to devenv-stage_272 instance 
3. Modify devenv.repo, replace 'stage' with 'candidate' in order to update to latest 
sed -i 's/stage/candidate/g' /etc/yum.repos.d/devenv.repo
4. yum update
5. Execute migrate-mongo-2.1
6. SSH into gear, run quota
7. Call rest api to get quota of gear
  
Actual results:
After step 6:
[php1-jhou2.dev.rhcloud.com ~]\> quota
Disk quotas for user bffc73524c7b4208bd89872d5567e08d (uid 552): none

After step 7: The storage info returned by rest api is correct
.....................
   <cartridge>
          <connection-url>mongodb://127.1.21.1:27017/</connection-url>
          <username>admin</username>
          <password>wf17QP_brJW7</password>
          <database-name>perl1</database-name>
          <name>mongodb-2.2</name>
          <display-name>MongoDB NoSQL Database 2.2</display-name>
          <tags>
            <tag>service</tag>
            <tag>database</tag>
            <tag>nosql</tag>
            <tag>embedded</tag>
          </tags>
        </cartridge>
      </cartridges>
      <scales-from>1</scales-from>
      <scales-to>1</scales-to>
      <base-gear-storage>1</base-gear-storage>
      <additional-gear-storage>3</additional-gear-storage>
....................................

Expected results:
Should display user's quota

Additional info:

Comment 1 Rajat Chopra 2013-01-22 09:57:43 UTC
Similar to bug#902309 the migration should not affect any node properties as its a purely mongo migration.
Can we do a double check on this one, too?
Thanks.

Comment 2 Jianwei Hou 2013-01-23 03:23:09 UTC
I have checked it again, and this is still reproduced.
This time, I checked directly after I finished a yum update, so this problem probably cause by the update of instance.

Before yum update:
[php1-272t.dev.rhcloud.com ~]\> quota
Disk quotas for user 04306c702e9348078435724b2fa08c12 (uid 501): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
     /dev/xvde2     616       0 1048576             157       0   40000 

After yum update:
[php1-272t.dev.rhcloud.com ~]\> quota
Disk quotas for user 04306c702e9348078435724b2fa08c12 (uid 501): none

I have attached upgrade log.

Comment 3 Jianwei Hou 2013-01-23 03:24:03 UTC
Created attachment 685612 [details]
yum update log

Comment 4 Jianwei Hou 2013-01-23 03:25:07 UTC
Created attachment 685613 [details]
yum update log

Comment 5 Ravi Sankar 2013-02-01 19:03:24 UTC
Quota issue is fixed.
Current problem is with 'yum update' step for the migration [check description for the detailed steps].
'yum update' is updating rhc-devenv rpm package and that is running rhc-init-quota as part of post install which wipes out quota for all old apps on that instance.
I'm not sure how OPs team is doing migration vs migration done by QE.
Assigning the bug to Runtime.

Comment 6 manoj 2013-02-01 19:38:12 UTC
Marking Low because of a devenv issue

Comment 7 Jhon Honce 2013-02-16 20:23:24 UTC
Fixed in https://github.com/openshift/li/pull/894

Comment 8 openshift-github-bot 2013-02-16 22:41:55 UTC
Commit pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/f00ce0371a5fa8af164c87c0b8fce8666544d443
Bug 902243 - Guard for existing quotas

* Stop resetting disk quotas when updating devenv rpm

Comment 9 Jianwei Hou 2013-02-17 02:45:28 UTC
Verified this bug:
Launch a devenv-stage instance from last sprint, upgrade it to the latest devenv(currently -- devenv_2822). Then ssh into app gear and show quota :

[php1-jhou.dev.rhcloud.com ~]\> quota
Disk quotas for user 4816365288c441ba9d1fe166b61fbea2 (uid 501): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
     /dev/xvde2     628       0 1048576             162       0   40000  

The quota for old apps are not wiped out.
So moving this bug to verified.


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