Bug 970006 - apachectl can't work correctly by running it after ssh to the zend app
Summary: apachectl can't work correctly by running it after ssh to the zend app
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Vojtech Vitek
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-03 10:04 UTC by joycezhang
Modified: 2015-05-14 23:20 UTC (History)
4 users (show)

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


Attachments (Terms of Use)

Description joycezhang 2013-06-03 10:04:43 UTC
Description of problem:
Trying to run apachectl command by ssh to the app from STG, 

On STG after migration:
[zendcarts-stgtest1.stg.rhcloud.com 51a8137ddbd93c1fce00010e]\> apachectl 
/var/lib/openshift/51a8137ddbd93c1fce00010e//.env/CARTRIDGE_VERSION_2: line 1: 2: command not found
[zendcarts-stgtest1.stg.rhcloud.com 51a8137ddbd93c1fce00010e]\> which  apachectl 
/usr/local/zend/bin/apachectl
[zendcarts-stgtest1.stg.rhcloud.com 51a8137ddbd93c1fce00010e]\> ls -lh /usr/local/zend/bin/apachectl 
lrwxrwxrwx. 1 root root 65 Jun  1 17:43 /usr/local/zend/bin/apachectl -> /usr/libexec/stickshift/cartridges/zend-5.6/info/bin/httpd_ctl.sh


If trying to access apachectl command by ssh to the app from an instance upgraded from devenv-stage_353 to devenv-stage_356

devenv-stage_356 migrated from devenv-stage_353:
[zendm3-dmtest12.dev.rhcloud.com 259200256249816428838912]\> /usr/local/zend/bin/apachectl
bash: /usr/local/zend/bin/apachectl: No such file or directory

[zendm3-dmtest12.dev.rhcloud.com 259200256249816428838912]\> ls -al /usr/local/zend/bin/apachectl
lrwxrwxrwx. 1 root root 65 Jun  3 03:37 /usr/local/zend/bin/apachectl -> /usr/libexec/stickshift/cartridges/zend-5.6/info/bin/httpd_ctl.sh



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

How reproducible:
always

Steps to Reproduce:
1.Create a zend-5.6 app on devenv-stage_353 and migrate to devenv-stage_356
2.Check /usr/local/zend/bin/apachectl 


Actual results:
On STG after migration:
[zendcarts-stgtest1.stg.rhcloud.com 51a8137ddbd93c1fce00010e]\> apachectl 
/var/lib/openshift/51a8137ddbd93c1fce00010e//.env/CARTRIDGE_VERSION_2: line 1: 2: command not found

[zendcarts-stgtest1.stg.rhcloud.com 51a8137ddbd93c1fce00010e]\> which  apachectl 
/usr/local/zend/bin/apachectl

[zendcarts-stgtest1.stg.rhcloud.com 51a8137ddbd93c1fce00010e]\> ls -lh /usr/local/zend/bin/apachectl 
lrwxrwxrwx. 1 root root 65 Jun  1 17:43 /usr/local/zend/bin/apachectl -> /usr/libexec/stickshift/cartridges/zend-5.6/info/bin/httpd_ctl.sh

On devenv-stage_356 migrated from devenv-stage_353:
[zendm3-dmtest12.dev.rhcloud.com 259200256249816428838912]\> which apachectl
/usr/sbin/apachectl

[zendm3-dmtest12.dev.rhcloud.com 259200256249816428838912]\> apachectl  status
ERROR at home.c:156: Unable to find or create ELinks config directory. Please check if you have $HOME variable set correctly and if you have write permission to your home directory.
ELinks: SSL error

[zendm3-dmtest12.dev.rhcloud.com 259200256249816428838912]\> /usr/local/zend/bin/apachectl
bash: /usr/local/zend/bin/apachectl: No such file or directory

[zendm3-dmtest12.dev.rhcloud.com 259200256249816428838912]\> ls -al /usr/local/zend/bin/apachectl
lrwxrwxrwx. 1 root root 65 Jun  3 03:37 /usr/local/zend/bin/apachectl -> /usr/libexec/stickshift/cartridges/zend-5.6/info/bin/httpd_ctl.sh


Expected results:
/usr/local/zend/bin/apachectl symlink should point to /sandbox/zend/bin/apachectl and apachectl can work well.

Additional info:
Open this bug for tracking wrong "apachectl" command from bug 968943

Comment 1 Vojtech Vitek 2013-06-03 12:06:13 UTC
Marking as Future Feature and Low Priority as per bug 968943 comment 7.

We can fix this after the v1->v2 migration on all stg/prod environments to prevent any regressions in v1 apps.

Comment 2 Vojtech Vitek 2013-06-05 14:45:57 UTC
Waiting for v1->v2 migration to finish before I can commit a patch (that would not be backward-compatible with v1 apps).

Comment 3 Vojtech Vitek 2013-06-14 16:07:14 UTC
https://github.com/openshift/li/pull/1631

Comment 5 joycezhang 2013-06-19 09:33:27 UTC
This bug has been fixed on INT(devenv_3382) as below:

Steps:
1. Create a zend-5.6 app.
2. Check apachectl service and symlink
[zend1-intdmtest1.int.rhcloud.com 51c1792903ef645c20000250]\> which apachectl
/usr/local/zend/bin/apachectl

[zend1-intdmtest1.int.rhcloud.com 51c1792903ef645c20000250]\> apachectl status
Application is running
177 177 177 177 0 0 8449 0 --:--:-- --:--:-- --:--:-- 0 Total Accesses: 0 Total kBytes: 0 Uptime: 108 ReqPerSec: 0 BytesPerSec: 0 BusyWorkers: 1 IdleWorkers: 0 Scoreboard: W...........................................................

[zend1-intdmtest1.int.rhcloud.com 51c1792903ef645c20000250]\> apachectl restart
CLIENT_MESSAGE: Restarting Zend Server Deployment daemon
Stopping Deployment [OK]
Starting Deployment [OK]
CLIENT_MESSAGE: Restarting Zend Server Monitor node
Stopping Zend Server Monitor node [OK]
Starting Zend Server Monitor node [OK]
CLIENT_MESSAGE: Restarting Apache
CLIENT_MESSAGE: Restarting Zend Server JobQueue daemon
Stopping JobQueue [OK]
Starting JobQueue [OK]
CLIENT_MESSAGE: Restarting Zend Server Console
Stopping Zend Server GUI [Lighttpd] [OK]
spawn-fcgi: child spawned successfully: PID: 27650
Starting Zend Server GUI [Lighttpd] [OK]
CLIENT_RESULT: Zend Server 5.6 restarted successfully


[zend1-intdmtest1.int.rhcloud.com 51c1792903ef645c20000250]\> ls -al /usr/local/zend/bin/apachectl
lrwxrwxrwx. 1 root root 27 Jun 18 22:36 /usr/local/zend/bin/apachectl -> /sandbox/zend/bin/apachectl


It can work well, so this bug can be moved to "verified" once it's "on_qa". Thanks.

Comment 6 Xiaoli Tian 2013-07-09 05:53:48 UTC
Hi, Vojtech

Are there any more changes coming for this bug? if not, please help to move it to ON_QA since it has been in Modified status for a long time.

Thanks

Comment 7 Vojtech Vitek 2013-07-09 14:33:49 UTC
Moving to ON_QA. The issue should be fixed.

Comment 8 chunchen 2013-07-10 02:55:28 UTC
It's fixed, check again on devenv_3471, please refer to the following results:

[czd2-cdm.dev.rhcloud.com 140989058050804198408192]\> which apachectl
/usr/local/zend/bin/apachectl
[czd2-cdm.dev.rhcloud.com 140989058050804198408192]\> apachectl status
Application is running
177 177 177 177 0 0 22388 0 --:--:-- --:--:-- --:--:-- 0 Total Accesses: 0 Total kBytes: 0 Uptime: 116 ReqPerSec: 0 BytesPerSec: 0 BusyWorkers: 1 IdleWorkers: 0 Scoreboard: W...........................................................
[czd2-cdm.dev.rhcloud.com 140989058050804198408192]\> apachectl restart
CLIENT_MESSAGE: Restarting Zend Server Deployment daemon
Stopping Deployment [OK]
Starting Deployment [OK]
CLIENT_MESSAGE: Restarting Zend Server Monitor node
Stopping Zend Server Monitor node [OK]
Starting Zend Server Monitor node [OK]
CLIENT_MESSAGE: Restarting Apache
CLIENT_MESSAGE: Restarting Zend Server JobQueue daemon
Stopping JobQueue [OK]
Starting JobQueue [OK]
CLIENT_MESSAGE: Restarting Zend Server Console
Stopping Zend Server GUI [Lighttpd] [OK]
spawn-fcgi: child spawned successfully: PID: 21982
Starting Zend Server GUI [Lighttpd] [OK]
CLIENT_RESULT: Zend Server 5.6 restarted successfully
[czd2-cdm.dev.rhcloud.com 140989058050804198408192]\> ls -al /usr/local/zend/bin/apachectl
lrwxrwxrwx. 1 root root 27 Jul  9 20:53 /usr/local/zend/bin/apachectl -> /sandbox/zend/bin/apachectl


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