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.
PR submitted
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/84238f6962408d02e33e50d16f52706b6dffa323 Fix bug 983583
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
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