Bug 971129 - Handle edge-cases for cartridge migration
Summary: Handle edge-cases for cartridge migration
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Paul Morie
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-05 18:46 UTC by Paul Morie
Modified: 2015-05-14 23:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-24 14:51:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Paul Morie 2013-06-05 18:46:21 UTC
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 17:29:23 UTC
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 21:06:36 UTC
PR submitted to master.

Comment 3 openshift-github-bot 2013-06-19 01:27:45 UTC
Commit pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/5f09dd6fcba48e99187dca925f399c8e05b0d8d7
Fix bug 971129: enhance quota handling for gears during migration

Comment 4 Paul Morie 2013-06-19 01:29:53 UTC
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 09:11:11 UTC
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
Migrating gear on node with: /usr/bin/rhc-admin-migrate --login 'bmeng' --migrate-gear '44d83d32d97411e2a0e222000a8a2816' --app-name 'quota' --version '2.0.29' --ignore-cartridge-version
Migrating on node...
***time_migrate_on_node_measured_from_broker=19521***
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
***time_restart=8710***
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
***time_migrate_on_node_measured_from_node=19390***
***time_redeploy_httpd_proxy=0***
***time_restart=0***
***time_total_migrate_gear_measured_from_broker=19533***


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.