Bug 995116 - WebSocket request does not wake up idle cartridge
WebSocket request does not wake up idle cartridge
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Mrunal Patel
libra bugs
: UpcomingRelease
Depends On:
  Show dependency treegraph
Reported: 2013-08-08 10:54 EDT by Karel Piwko
Modified: 2015-05-14 19:25 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-27 12:29:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker AEROGEAR-1296 Critical Resolved Idle OpenShift Cartridge is not woken up if simplepush is touched 2014-07-24 12:33:24 EDT

  None (edit)
Description Karel Piwko 2013-08-08 10:54:39 EDT
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:


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

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 10:39:55 EDT
Is it possible, that the HTTP UPGRADE is not understood ?
Comment 2 Mrunal Patel 2013-08-12 11:41:39 EDT
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 04:26:39 EDT
Using the default ports is not an option, using our Cartridge
Comment 4 Mrunal Patel 2013-08-14 00:57:12 EDT
I have added this card to add restorer functionality to websocket proxy
Comment 5 Jhon Honce 2013-08-27 12:29:00 EDT
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.