Bug 1114477 - bottle quickstart app url can be accessed after app is stopped
Summary: bottle quickstart app url can be accessed after app is stopped
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1130362
TreeView+ depends on / blocked
 
Reported: 2014-06-30 07:39 UTC by Wenjing Zheng
Modified: 2015-05-15 00:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-15 10:31:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wenjing Zheng 2014-06-30 07:39:58 UTC
Description:
App created from https://github.com/openshift-quickstart/Bottle-Python3-quickstart can be accessed after app is stopped.

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

How reproducible:
always

steps to Reproduce:
1. Create app
rhc app create bottle33 python-3.3 mongodb-2.4 --from-code=https://github.com/openshift-quickstart/Bottle-Python3-quickstart
2. Stop the app
3. Access the app url

Actual results:
The app can be stopped and its status displays stopped, but the url is accessed.

Expected results:
The url should not be accessed.

Additional info:
1. Can reproduce with python-2.6, python-2.7 and python-3.3
2. Main process app.py exists after app is stopped:
[bottle33-w.dev.rhcloud.com 53b149590bb85fbd7800023c]\> ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
1000      4709  4127  0 07:32 ?        00:00:00 sshd: 53b149590bb85fbd7800023c@pts/6
1000      4850  4709  2 07:32 pts/6    00:00:00 /bin/bash --init-file /usr/bin/rhcsh -i
1000      5378  4850  0 07:32 pts/6    00:00:00 ps -ef
1000     24869     1  0 07:27 ?        00:00:00 /usr/bin/logshifter -tag python
1000     24870     1  0 07:27 ?        00:00:00 python -u app.py
[bottle33-w.dev.rhcloud.com 53b149590bb85fbd7800023c]\> ls app-root/runtime/.stop_lock 
app-root/runtime/.stop_lock

Comment 1 Jakub Hadvig 2014-06-30 11:29:01 UTC
Found out that the incorrect PID is written into the appserver.pid uppon the start action, so the stop action won't kill appropriate process.

Comment 2 openshift-github-bot 2014-07-02 19:14:15 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/4a567c49eb6a1fae6b11eee9b82fd477fddd1ca7
Bug 1114477: Incorrect pid written into appserver.pid upon python cartridge start action

Comment 3 Wenjing Zheng 2014-07-04 01:59:17 UTC
Verified on INT(devenv_4938)
1. 503 returns when access app url if stop it;
2. The process disappears after stop:
[bottle33-mig2.int.rhcloud.com 53b6085b6cec0ef56c0000c0]\> ps -ef
UID         PID   PPID  C STIME TTY          TIME CMD
1285     190717 190270  0 21:53 ?        00:00:00 sshd: 53b6085b6cec0ef56c0000c0@pts/0
1285     190806 190717  2 21:53 pts/0    00:00:00 /bin/bash --init-file /usr/bin/rhcsh -i
1285     192037 190806  0 21:53 pts/0    00:00:00 ps -ef


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