Bug 983583 - Do not leave migration metadata in place as a result of gear status
Do not leave migration metadata in place as a result of gear status
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Paul Morie
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-11 10:02 EDT by Paul Morie
Modified: 2015-05-14 19:23 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-22 11:24:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Paul Morie 2013-07-11 10:02:06 EDT
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 10:10:30 EDT
PR submitted
Comment 3 openshift-github-bot 2013-07-11 18:19:23 EDT
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 06:45:57 EDT
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@redhat.com --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@redhat.com' --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.