Bug 971357

Summary: [upgrade]old v1 cartridge directories are not cleaned after migrate
Product: OpenShift Container Platform Reporter: Johnny Liu <jialiu>
Component: NodeAssignee: Luke Meyer <lmeyer>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.2.0CC: bleanhar, jialiu, libra-onpremise-devel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-07 16:08:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Johnny Liu 2013-06-06 10:54:41 UTC
Description of problem:
old v1 cartridge directories are not cleaned after migrate

Version-Release number of selected component (if applicable):
1.2/2013-06-05.9

How reproducible:
Always

Steps to Reproduce:
1. Setup ose-1.1.3 env
2. Create a scalable app, embed mysql and jenkins-client to it
3. Following http://etherpad.corp.redhat.com/OSE-1-2-upgrade-notes to do upgrade testing
4. After upgrade, check app dir

Actual results:
[root@node1 openshift]# ls 4941e92aa5714fc1885ed93bd1ca75d4/
app-root  git  haproxy  haproxy-1.4  jenkins-client  jenkins-client-1.4  python  python-2.6
[root@node1 openshift]# ls b716573b54
b716573b545b43a2858a18ee78ae5dbb/ b716573b54-jialiu/                
[root@node1 openshift]# ls b716573b545b43a2858a18ee78ae5dbb/
app-root  git  python  python-2.6
[root@node1 openshift]# ls f9f90dd76e
f9f90dd76ec14bf5992fec192fd8aab6/ f9f90dd76e-jialiu/                
[root@node1 openshift]# ls f9f90dd76e
f9f90dd76ec14bf5992fec192fd8aab6/ f9f90dd76e-jialiu/                
[root@node1 openshift]# ls f9f90dd76e
f9f90dd76ec14bf5992fec192fd8aab6/ f9f90dd76e-jialiu/                
[root@node1 openshift]# ls f9f90dd76ec14bf5992fec192fd8aab6/
app-root  mysql  mysql-5.1


Expected results:
v1 cartridge dirs should be cleaned up after migrate, e.g: haproxy-1.4, jenkins-client-1.4, python-2.6 and mysql-5.1

Additional info:

Comment 2 Luke Meyer 2013-06-06 19:09:24 UTC
The v1 cartridge dirs should be left as symlinks to the corresponding v2 cartridge dirs. Is that the case, or is there some v1 content remaining in the dir?

Comment 3 Johnny Liu 2013-06-07 09:12:51 UTC
(In reply to Luke Meyer from comment #2)
> The v1 cartridge dirs should be left as symlinks to the corresponding v2
> cartridge dirs. Is that the case, 
Yeah, it is the case. Is it by design? Why these v1 cartridge dirs should be left as symlinks, I tried manual remove these symlinks, this app still works fine.

>or is there some v1 content remaining in the dir?

Comment 4 Luke Meyer 2013-06-07 15:43:24 UTC
It has to do with this:
https://www.openshift.com/blogs/important-changes-in-the-new-version-2-cartridge-format

In short, it is to support existing apps in case they were actually using those paths in some way. Most won't so in most cases it makes no difference.

Comment 5 Luke Meyer 2013-06-07 16:08:28 UTC
I added a note to the upgrade notes regarding this; I think that should be adequate for addressing this concern.