Red Hat Bugzilla – Bug 991225
Cartridge upgrade script should be called before setup script
Last modified: 2015-05-14 19:25:33 EDT
Description of problem:
Cartridge upgrade script should be called before setup script during cartridge upgrades
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Upgrade script called after setup script and ERB processing
Upgrade script called before setup script
PRs submitted to master and stage.
Commit pushed to master at https://github.com/openshift/origin-server
Bug 991225: upgrade script should be run before setup during incompatible upgrade
Checked on devenv-stage_437
Add "echo SETUP_SCRIPT_RUNNING" to php cartridge setup script.
Create app via php cartridge.
Upgrade the gear.
We can know the upgrade script is called before the setup.
# oo-admin-upgrade --version 2.0.31 --login bmeng --upgrade-gear 51ff527ad032060b1f000006 --ignore-cartridge-version --app-name appa
Migrating gear on node with: /usr/sbin/oo-admin-upgrade --login 'bmeng' --upgrade-gear '51ff527ad032060b1f000006' --app-name 'appa' --version '2.0.31' --ignore-cartridge-version
Upgrading on node...
Upgrade on node output:
Beginning 2.0.31 upgrade for 51ff527ad032060b1f000006
Inspecting gear at /var/lib/openshift/51ff527ad032060b1f000006
Pre-upgrade state: started
Marking step inspect_gear_state complete
Refreshing cartridge redhat:php:5.3:0.0.3, ignoring cartridge version.
Creating itinerary entry for incompatible upgrade of redhat:php:5.3:0.0.3
Marking step compute_itinerary complete
Migrating gear at /var/lib/openshift/51ff527ad032060b1f000006
Stopping gear on node 'ip-10-164-76-49'
Marking step stop_gear complete
Incompatible upgrade of cartridge redhat:php:5.3:0.0.3
No upgrade script exists for php; skipping
Executed setup for php
Marking step php_setup complete
Marking step php_erb complete
Marking step php_create_endpoints complete
Marking step php_connect_frontend complete
Marking step php_upgrade_cart complete
Marking step php_rebuild_ident complete
Starting gear on node 'ip-10-164-76-49'
Start gear output:
Marking step start_gear complete
Gear restart time (ms): 725