Bug 971955 - oo-accept-node should detect migration metadata in gears
oo-accept-node should detect migration metadata in gears
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Paul Morie
libra bugs
: Regression
Depends On:
  Show dependency treegraph
Reported: 2013-06-07 12:53 EDT by Paul Morie
Modified: 2015-05-14 19:21 EDT (History)
4 users (show)

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

Attachments (Terms of Use)

  None (edit)
Description Paul Morie 2013-06-07 12:53:43 EDT
During the V2 rollout we began using a new migration framework that can leave metadata laying around in gears if there are bugs in its clean feature.  This bug is to add detection of this metadata to oo-accept-node, so that operations can easily find affected gears when this happens.
Comment 1 Paul Morie 2013-06-11 17:55:11 EDT
PRs made to stage and master for the fix.
Comment 2 Paul Morie 2013-06-11 18:04:19 EDT
Disregard above comment.
Comment 3 Paul Morie 2013-06-12 10:11:58 EDT
Check for migration complete markers and premigration state.  Also check for V1 cartridge directories.  Should be disabled by default in oo-accept-node; enable with a CLI option.
Comment 4 openshift-github-bot 2013-06-12 18:24:27 EDT
Commit pushed to master at https://github.com/openshift/origin-server

Fix bug 971955: migration metadata check in oo-accept-node

Create oo-admin-repair-node utility
Comment 5 Meng Bo 2013-06-14 03:27:38 EDT
Tested on devenv_3360,

Create app, login to the app via SSH
1. Touch .premigration_state under app-root/runtime/
2. Mkdir .migration_test under app-root/data/
3. Run oo-accept-node --include-upgrade-checks from server side.

[root@ip-10-203-50-14 app-root]# oo-accept-node --include-upgrade-checks
FAIL: directory 51bab44c1b9b5f097c000001 contains migration data
FAIL: directory 51bab44c1b9b5f097c000001 contains pre-migration state

4. Run oo-admin-repair-node

[root@ip-10-203-50-14 app-root]# oo-admin-repair-node clean-upgrade
Removing /var/lib/openshift/51bab44c1b9b5f097c000001/app-root/data/.migration
Removing /var/lib/openshift/51bab44c1b9b5f097c000001/app-root/data/.migration_test1
Removing /var/lib/openshift/51bab44c1b9b5f097c000001/app-root/runtime/.premigration_state

5. Run oo-accept-node again

[root@ip-10-203-50-14 app-root]# oo-accept-node --include-upgrade-checks
Comment 6 zhaozhanqi 2013-06-19 05:43:55 EDT
this issue has been reproduced on devenv_3382

Steps to Reproduce:

1.create one app
2.ssh into app 
   1)create one  file named '.premigration_state' on 'app-root/runtime/'
   2)create some file with '.migration' beginning  on 'app-root/data/', like ' .migration122', '.migration-343.test'.
   3)create a directory named 'ruby-1.8' on gear home directory.
3. run 'oo-accept-node --include-upgrade-checks'

Actual results:

[root@ip-10-114-221-243 ~]# oo-accept-node --include-upgrade-checks

Expected results:
should show the error like:
FAIL: directory 57d01c80d6fd11e2ac2f12313d23a556 contains migration data
FAIL: directory 57d01c80d6fd11e2ac2f12313d23a556 contains pre-migration state
FAIL: directory 57d01c80d6fd11e2ac2f12313d23a556 contains a V1 cartridge directory"
Comment 7 openshift-github-bot 2013-06-20 15:51:35 EDT
Commit pushed to master at https://github.com/openshift/origin-server

Fix bug 971955: load users correctly from /etc/passwd
Comment 8 Paul Morie 2013-06-20 16:26:14 EDT
The problem was that another change to avoid failing for gears that were being modified while the accept-node script was running was not loading the user list correctly.
Comment 9 zhaozhanqi 2013-06-20 22:20:45 EDT
Tested this issue on Devenv_3396, it has been fixed

[root@ip-10-145-181-217 data]# oo-accept-node --include-upgrade-checks
FAIL: directory 51c3b601b2ef9b0a12000001 contains a V1 cartridge directory
FAIL: directory 51c3b601b2ef9b0a12000001 contains migration data
FAIL: directory 51c3b601b2ef9b0a12000001 contains pre-migration state

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