Bug 983583 - Do not leave migration metadata in place as a result of gear status
Summary: Do not leave migration metadata in place as a result of gear status
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Paul Morie
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-11 14:02 UTC by Paul Morie
Modified: 2015-05-14 23:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-22 15:24:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Paul Morie 2013-07-11 14:02:06 UTC
Currently if the pre-migration status does not match the status of a gear after migration, we leave the migration metadata in place.  Instead, we should log the difference and clean up after the migration - the current behavior has resulted in a lot of metadata left around which needs to be cleaned up by ops.

Comment 1 Paul Morie 2013-07-11 14:10:30 UTC
PR submitted

Comment 3 openshift-github-bot 2013-07-11 22:19:23 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/84483ecf9a37e0758ce4ed0bf9d4dd9a2096fd69
Fix bug 983583: remove gear validation step for compatible upgrades

Comment 4 Meng Bo 2013-07-12 10:45:57 UTC
Checked on devenv_3491,

1. Create app on node
2. Add .stop_lock to the app-root/runtime/ dir
3. Run upgrade
# oo-admin-upgrade --login bmeng --upgrade-gear 899641973301111773200384 --app-name php1 --version 2.0.30 --ignore-cartridge-version
Migrating gear on node with: /usr/sbin/oo-admin-upgrade --login 'bmeng' --upgrade-gear '899641973301111773200384' --app-name 'php1' --version '2.0.30' --ignore-cartridge-version
Upgrading on node...
***time_upgrade_on_node_measured_from_broker=14960***
Upgrade on node output:
 Beginning 2.0.30 upgrade for 899641973301111773200384
Inspecting gear at /var/lib/openshift/899641973301111773200384
Pre-upgrade state: started
Marking step inspect_gear_state complete
Migrating gear at /var/lib/openshift/899641973301111773200384
Refreshing cartridge redhat:php:5.3:0.0.2, ignoring cartridge version.
Creating migration instruction validate_gear
Stopping gear with uuid '899641973301111773200384' on node 'ip-10-152-168-54'
Marking step stop_gear complete
Creating migration instruction restart_gear
Incompatible upgrade of cartridge redhat:php:5.3:0.0.2

Marking step php_setup complete
Marking step php_erb complete
Marking step php_connect_frontend complete
Marking step php_upgrade complete
Marking step php_update_ident complete
Starting gear with uuid '899641973301111773200384' on node 'ip-10-152-168-54'
Start gear output: Not starting cartridge php because the application was explicitly stopped by the user
Marking step start_gear complete
***time_restart=16***
Validating gear 899641973301111773200384 post-upgrade
Pre-upgrade state: started
Post-upgrade response code: 503
Problem detected with gear status.  Post-upgrade status:
Cart status for php [PROBLEM]: CLIENT_RESULT: Application is either stopped or inaccessible

Marking step validate_gear complete
Cleaning up after upgrade
***time_upgrade_on_node_measured_from_node=14417***
***time_redeploy_httpd_proxy=0***
***time_restart=0***
***time_total_upgrade_gear_measured_from_broker=14966***



Gear status does not match for pre-upgrade and post-upgrade. And throw oroblem:
Problem detected with gear status.  Post-upgrade status:
Cart status for php [PROBLEM]: CLIENT_RESULT: Application is either stopped or inaccessible

4. Check the app-root/data/ dir there is nothing leave there.
# ls -a app-root/runtime/
.  ..  data  repo  .state  .stop_lock


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