Bug 824409

Summary: Symbolic link for mysql gear is not created after move mysql gear from one node to another node.
Product: OKD Reporter: Johnny Liu <jialiu>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: dmcphers, jhonce, qgong, ramr, rmillner
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-25 18:26:50 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 2012-05-23 12:20:37 UTC
Description of problem:
Symbolic link for mysql gear is not created after move mysql gear from one node to another node.
Before move:
# ll
<--snip-->
drwxr-x---.  8 root 70c40eec853649f7a4e61238989f9e83 4096 May 23 08:11 70c40eec853649f7a4e61238989f9e83
lrwxrwxrwx.  1 root root                               52 May 23 08:11 70c40eec85-jialiu -> /var/lib/stickshift/70c40eec853649f7a4e61238989f9e83
<--snip-->

# ls 70c40eec85-jialiu
70c40eec85  git  mysql-5.1

After move:
# ll
total 12
<--snip-->
drwxr-x---. 8 root 70c40eec853649f7a4e61238989f9e83 4096 May 23 08:11 70c40eec853649f7a4e61238989f9e83
<--snip-->



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

How reproducible:
Always

Steps to Reproduce:
1. Create a scalable app
2. Embed mysql to this app
3. Move mysql gear from one node to another
  
Actual results:
Symbolic link for mysql gear is not created after move mysql gear from one node to another node.

Expected results:
Symbolic link for mysql gear should be created after move

Additional info:

Comment 1 Rob Millner 2012-05-23 19:37:46 UTC
This only affects devenv; stg and prod do not create these symlinks in the first place.

Comment 2 Ram Ranganathan 2012-06-05 18:18:00 UTC
Assigning to rchopra -- looks like gear move is not creating the symlink.

Comment 3 Dan McPherson 2012-06-05 18:42:38 UTC
This is a cartridge level operation.  Why assign to rchopra?

Comment 4 Ram Ranganathan 2012-06-05 19:48:30 UTC
Ideally, we should do this on a gear move -- not in each cartridge ... today its done in stickshift/abstract/abstract/info/lib/util  (originally only for the "framework"). 
That util function is also called via abstract/info/hooks/move but not in any other "embeddable" cartridge (ala mongo/mysql, eventually postgres and anything else that requires to override the default move hook -- which could be a lot more once we completely get to typeless gears) -- and that will result in a lot of duplication/potential failure points.
 
Having it done once as part of the application/gear workflow makes more sense ... imho, we should do it when the gear is created -- really a stickshift-node thing (based on the stickshift-node.conf config). So do it in stickshift-node/model/application_container.rb  -- it will get called on gear create [both when its originally created and on moves]. Probably should have made that clearer, my bad.

Comment 5 Dan McPherson 2012-06-05 19:58:41 UTC
That's still node code :)  And sounds like a future topic.  Same with everything else that should be moved into stickshift-node from the carts.  For now it's owned by the carts and should be fixed there.  If the fix is to move into stickshift-node then great.

Comment 6 Ram Ranganathan 2012-06-05 20:07:47 UTC
Okay  -- will fix it for now in both mysql and mongo ... I can do that its not a biggie -- one call in each. Just wanted to call out there's potential for more stuff like this happening -- example the mysql's move hook's not been changed in a while.

Comment 7 Jhon Honce 2012-06-13 01:21:57 UTC
Mongo/Mysql fix in crankcase commit f8b8c646d127a3449448f5550abd942286c832cf

All cartridge suppot tracked here: https://rally1.rallydev.com/#/4670516379d/detail/userstory/6625302852

Comment 8 Rony Gong 🔥 2012-06-14 07:27:10 UTC
This issue still exist on devenv_1843

Comment 9 Jhon Honce 2012-06-14 16:08:10 UTC
Where there any errors in the logs during the move?

Comment 10 Rony Gong 🔥 2012-06-25 06:55:13 UTC
verified on devenv_1863

Comment 11 Rony Gong 🔥 2012-06-25 07:07:52 UTC
verified on devenv_1863

Comment 12 Rony Gong 🔥 2012-06-25 07:23:46 UTC
After move mysql gear to destination node could find the symbol link and $gera_uuid.conf created.

d5ef78a368bb466d87afa6799b24753c is the mysql gear_uuid.


[root@ip-10-120-206-229 stickshift]# ls -al
total 44
drwxr-x--x. 11 root root                             4096 Jun 25 02:15 .
drwxr-xr-x. 37 root root                             4096 Jun 23 21:56 ..
drwxr-x---. 12 root 11816b28a7e644eca19fdad42ae0600f 4096 Jun 25 01:44 11816b28a7e644eca19fdad42ae0600f
drwxr-x---. 13 root 6921073c20894e9dbebb5dcf344fc63e 4096 Jun 24 22:43 6921073c20894e9dbebb5dcf344fc63e
drwxr-x---. 12 root b29fee16aef24a538897a975c4e49523 4096 Jun 25 02:19 b29fee16aef24a538897a975c4e49523
drwxr-x---.  8 root d5ef78a368bb466d87afa6799b24753c 4096 Jun 24 22:49 d5ef78a368bb466d87afa6799b24753c
lrwxrwxrwx.  1 root root                               52 Jun 25 01:12 d5ef78a368-qgong -> /var/lib/stickshift/d5ef78a368bb466d87afa6799b24753c
drwxr-x---.  8 root ecc2e556c2c2455ea495476c73074eb3 4096 Jun 25 01:55 ecc2e556c2c2455ea495476c73074eb3
lrwxrwxrwx.  1 root root                               52 Jun 25 01:55 ecc2e556c2-qgong -> /var/lib/stickshift/ecc2e556c2c2455ea495476c73074eb3
drwxr-x---.  7 root root                             4096 Jun 25 02:15 .httpd.d
drwxr-xr-x.  2 root root                             4096 Jun 25 02:00 .last_access
-rw-r--r--.  1 root root                                0 Jun 25 03:00 last_access.log
lrwxrwxrwx.  1 root root                               52 Jun 25 01:54 myapp2-qgong -> /var/lib/stickshift/b29fee16aef24a538897a975c4e49523
lrwxrwxrwx.  1 root root                               52 Jun 24 22:43 qsjboss-qgong -> /var/lib/stickshift/6921073c20894e9dbebb5dcf344fc63e
lrwxrwxrwx.  1 root root                               52 Jun 25 01:44 qsperl-qgong -> /var/lib/stickshift/11816b28a7e644eca19fdad42ae0600f
drwxr-xr-x.  2 root root                             4096 Jun 24 22:30 .settings
drwxr-x---.  2 root root                             4096 Jun 25 02:15 .stickshift-proxy.d

[root@ip-10-120-206-229 stickshift]# ls -al .httpd.d/
total 48
drwxr-x---.  7 root root 4096 Jun 25 02:15 .
drwxr-x--x. 11 root root 4096 Jun 25 02:15 ..
drwxr-xr-x.  2 root root 4096 Jun 25 01:44 11816b28a7e644eca19fdad42ae0600f_qgong_qsperl
-rw-r--r--.  1 root root  695 Jun 25 01:44 11816b28a7e644eca19fdad42ae0600f_qgong_qsperl.conf
drwxr-xr-x.  2 root root 4096 Jun 24 22:43 6921073c20894e9dbebb5dcf344fc63e_qgong_qsjboss
-rw-r--r--.  1 root root  697 Jun 24 22:43 6921073c20894e9dbebb5dcf344fc63e_qgong_qsjboss.conf
drwxr-xr-x.  2 root root 4096 Jun 25 01:54 b29fee16aef24a538897a975c4e49523_qgong_myapp2
-rw-r--r--.  1 root root  695 Jun 25 01:54 b29fee16aef24a538897a975c4e49523_qgong_myapp2.conf
drwxr-xr-x.  2 root root 4096 Jun 25 01:12 d5ef78a368bb466d87afa6799b24753c_qgong_d5ef78a368
-rw-r--r--.  1 root root  703 Jun 25 01:12 d5ef78a368bb466d87afa6799b24753c_qgong_d5ef78a368.conf
drwxr-xr-x.  2 root root 4096 Jun 25 01:55 ecc2e556c2c2455ea495476c73074eb3_qgong_ecc2e556c2
-rw-r--r--.  1 root root  703 Jun 25 01:55 ecc2e556c2c2455ea495476c73074eb3_qgong_ecc2e556c2.conf