Red Hat Bugzilla – Bug 995116
WebSocket request does not wake up idle cartridge
Last modified: 2015-05-14 19:25:55 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
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
HTTP 503, cartridge is still idle, you can repeat as many times as you want
HTTP 302, the same for :80 HTTP requests or directly HTTP 200
If I wake up gear with request to :80, it gives me back HTTP 302, subsequent requests return HTTP 200.
Is it possible, that the HTTP UPGRADE is not understood ?
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.
Using the default ports is not an option, using our Cartridge
I have added this card to add restorer functionality to websocket proxy
Track progress here https://trello.com/c/3qaFOcIE/232-5-implement-restorer-for-websocket-requests