Bug 991225 - Cartridge upgrade script should be called before setup script
Cartridge upgrade script should be called before setup script
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-08-01 18:06 EDT by Jhon Honce
Modified: 2015-05-14 19:25 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-07 18:58:55 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 Jhon Honce 2013-08-01 18:06:21 EDT
Description of problem:
Cartridge upgrade script should be called before setup script during cartridge upgrades

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
Upgrade script called after setup script and ERB processing

Expected results:
Upgrade script called before setup script

Additional info:
Comment 1 Paul Morie 2013-08-02 12:06:05 EDT
PRs submitted to master and stage.
Comment 2 openshift-github-bot 2013-08-02 17:23:44 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/e6b37eadac3a50376afd40c55245b25b93497f59
Bug 991225: upgrade script should be run before setup during incompatible upgrade
Comment 3 Meng Bo 2013-08-05 03:27:09 EDT
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...
***time_upgrade_on_node_measured_from_broker=8758***
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
rc: 
stdout: SETUP_SCRIPT_RUNNING

stderr: 
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

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