Bug 995116 - WebSocket request does not wake up idle cartridge
Summary: WebSocket request does not wake up idle cartridge
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Mrunal Patel
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-08 14:54 UTC by Karel Piwko
Modified: 2015-05-14 23:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-27 16:29:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker AEROGEAR-1296 0 Critical Resolved Idle OpenShift Cartridge is not woken up if simplepush is touched 2014-07-24 16:33:24 UTC

Description Karel Piwko 2013-08-08 14:54:39 UTC
Description of problem:

If a gear is idle, request on WebSocket port don't wake it up.


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

OpenShift Online devenv, based on ami-de96d1b7 - devenv_3628

How reproducible:

Always.

Steps to Reproduce:
1. Create a devenv OpenShift Online instance
2. Create a new app using Aerogear cartridge

   rhc create-app pushserver https://raw.github.com/fjuma/origin-server/downloadable/cartridges/openshift-origin-cartridge-aerogear-push/metadata/manifest.yml mysql-5.1  

3. Put cartridge idle

   /usr/sbin/oo-admin-ctl-gears idlegear uuid   

4. Ensure cartridge is idle
 
   /usr/sbin/oo-idler-stats


5. Fire request to SimplePush (netty on :8000 -> :8676 port), for instance to an endpoint or directly to /simplepush

curl -i --header "Content-Type:application/x-www-form-urlencoded" -X PUT -d "version=2" http://pushserver-aerogear.dev.rhcloud.com:8000/endpoint/470dddc2-ce0b-4306-8be3-eaf995218


Actual results:

HTTP 503, cartridge is still idle, you can repeat as many times as you want

Expected results:

HTTP 302, the same for :80 HTTP requests or directly HTTP 200

Additional info:

If I wake up gear with request to :80, it gives me back HTTP 302, subsequent requests return HTTP 200.

Comment 1 matzew 2013-08-12 14:39:55 UTC
Is it possible, that the HTTP UPGRADE is not understood ?

Comment 2 Mrunal Patel 2013-08-12 15:41:39 UTC
This is something that hasn't been implemented. The code will detect that websocket request was made and not try to idle it however it won't wake up idled app when accessed through 8000/8443. The workaround to restore it is to access it through regular port.

Comment 3 matzew 2013-08-13 08:26:39 UTC
Using the default ports is not an option, using our Cartridge

Comment 4 Mrunal Patel 2013-08-14 04:57:12 UTC
I have added this card to add restorer functionality to websocket proxy
https://trello.com/c/3qaFOcIE/232-implement-restorer-for-websocket-requests

Comment 5 Jhon Honce 2013-08-27 16:29:00 UTC
Track progress here https://trello.com/c/3qaFOcIE/232-5-implement-restorer-for-websocket-requests


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