Bug 971129 - Handle edge-cases for cartridge migration
Handle edge-cases for cartridge migration
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Paul Morie
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-06-05 14:46 EDT by Paul Morie
Modified: 2015-05-14 19:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-06-24 10:51:25 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 Paul Morie 2013-06-05 14:46:21 EDT
While fixing issues that came up during the V1 -> V2 migration in production, we determined a couple edge-cases that need to be accounted for in the cartridge migrations going forward:

1. Gear without cartridges
2. Gear at quota
Comment 1 Paul Morie 2013-06-18 13:29:23 EDT
Only quota handling should be tested for this bug.  The case for a gear without cartridges is covered by https://bugzilla.redhat.com/show_bug.cgi?id=971120
Comment 2 Paul Morie 2013-06-18 17:06:36 EDT
PR submitted to master.
Comment 3 openshift-github-bot 2013-06-18 21:27:45 EDT
Commit pushed to master at https://github.com/openshift/li

Fix bug 971129: enhance quota handling for gears during migration
Comment 4 Paul Morie 2013-06-18 21:29:53 EDT
Quota should be doubled for blocks and/or inodes if usage is above 50%.

Available in devenv 3384.
Comment 5 Meng Bo 2013-06-20 05:11:11 EDT
Checked on devenv_3390,

1. Create app with 700M file in the app-root/data dir.
2. Do migration
3. Will find the quota resetting to 2x during migration and reset back after that.

Migrating app 'quota' gear 'quota' with uuid '44d83d32d97411e2a0e222000a8a2816' on node 'ip-10-138-40-22' for user: bmeng@redhat.com
Migrating gear on node with: /usr/bin/rhc-admin-migrate --login 'bmeng@redhat.com' --migrate-gear '44d83d32d97411e2a0e222000a8a2816' --app-name 'quota' --version '2.0.29' --ignore-cartridge-version
Migrating on node...
Migrate on node output:
 Beginning 2.0.29 migration for 44d83d32d97411e2a0e222000a8a2816
Inspecting gear at /var/lib/openshift/44d83d32d97411e2a0e222000a8a2816
Pre-migration state: started
Marking step inspect_gear_state complete
Migrating gear at /var/lib/openshift/44d83d32d97411e2a0e222000a8a2816
Relaxing quota to blocks=2097152, inodes=40000
Refreshing cartridge redhat:ruby:1.9:0.0.2, ignoring cartridge version.
Creating migration instruction validate_gear
Stopping gear with uuid '44d83d32d97411e2a0e222000a8a2816' on node 'ip-10-138-40-22'
Marking step stop_gear complete
Creating migration instruction restart_gear
Incompatible migration of cartridge redhat:ruby:1.9:0.0.2

Marking step ruby_setup complete
Marking step ruby_erb complete
Marking step ruby_connect_frontend complete
Marking step ruby_migrate complete
Marking step ruby_update_ident complete
Starting gear with uuid '44d83d32d97411e2a0e222000a8a2816' on node 'ip-10-138-40-22'
Start gear output: Starting Ruby cart

Marking step start_gear complete
Resetting quota blocks: 1048576  inodes: 40000
Validating gear 44d83d32d97411e2a0e222000a8a2816 post-migration
Pre-migration state: started
Post-migration response code: 200
Marking step validate_gear complete
Cleaning up after migration

After migration check the app:
[quota-bmengdev.dev.rhcloud.com app-root]\> du -sh
701M	.
[quota-bmengdev.dev.rhcloud.com app-root]\> quota
Disk quotas for user 44d83d32d97411e2a0e222000a8a2816 (uid 541): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
     /dev/xvde2  717812       0 1048576             295       0   40000        

Move bug to verified.

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