Bug 981273 - oo-admin-repair-node should clean upgrade metadata in gears
Summary: oo-admin-repair-node should clean upgrade metadata in gears
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-04 10:54 UTC by chunchen
Modified: 2016-09-30 02:15 UTC (History)
2 users (show)

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


Attachments (Terms of Use)

Description chunchen 2013-07-04 10:54:56 UTC
Description of problem:
The oo-admin-repair-node can not clean successfully when there are upgrade metadata in gears, but oo-accept-node can detect the upgrade metadata.

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

How reproducible:
always

Steps to Reproduce:
1. Create a app
rhc app create cpl01 perl-5.10 --no-git
2. SSH into this app
    1)create some file with '.upgrade' beginning  on 'app-root/data/', like ' ..upgrade13', '.upgrade-32.tst'.
    2)create some file named '.preupgrade_state' on 'app-root/runtime/'
3. SSH into the instance and run oo-accept-node
oo-accept-node --include-upgrade-checks
4. SSH into the instance and run oo-admin-repair-node
oo-admin-repair-node clean-upgrade
5. SSH into this app and check the upgrade metadata
ls -a app-root/runtime/
ls -a app-root/data/

Actual results:
Step3:
FAIL: directory f9107d6ce48e11e29efd22000aec86aa contains upgrade data
FAIL: directory f9107d6ce48e11e29efd22000aec86aa contains pre-upgrade state
2 ERRORS

Step5
\> ls -a app-root/runtime/
.  ..  data  .preupgrade_state	repo  .state
\> ls -a app-root/data
.  ..  .bash_history  .bash_profile  .upgrade13  .upgrade-32.tst

Expected results:
The upgrade metadata should be cleaned

Additional info:

Comment 2 Paul Morie 2013-07-09 21:41:17 UTC
Should be available in devenv ami 3471

Comment 3 chunchen 2013-07-10 02:19:07 UTC
It's fixed, verified on devenv_3471, please refer to the following results:

# oo-admin-repair-node clean-upgrade
Removing /var/lib/openshift/51dcc0960ef4360893000001/app-root/data/.upgrade-32.tst
Removing /var/lib/openshift/51dcc0960ef4360893000001/app-root/data/.upgrade13
Removing /var/lib/openshift/51dcc0960ef4360893000001/app-root/runtime/.preupgrade_state

[root@F17-CCY ~]# rhc ssh drupal "ls -a app-root/runtime/"
.
..
data
repo
.state
[root@F17-CCY ~]# rhc ssh drupal "ls -a app-root/data/"
.
..
.bash_history
.bash_profile


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