ubershy's profile - activity

2016-01-15 22:18:19 -0600 commented answer Zaqar cli/curl Issue

Seems like you're experiencing a recently noticed bug in Zaqar: https://bugs.launchpad.net/zaqar/+bug....

Yes, there is a workaround. Open zaqar.conf and ensure that these options are set to False:

[DEFAULT]

pooling = False

[pooling:catalog]

enable_virtual_pool = False

2016-01-12 00:23:05 -0600 received badge  Teacher (source)
2016-01-10 20:16:28 -0600 answered a question Zaqar cli/curl Issue

It was a bug in Zaqar client and now it's fixed in master branch. See https://bugs.launchpad.net/python-zaqarclient/+bug/1517812 (https://bugs.launchpad.net/python-zaq...)

2016-01-10 20:16:28 -0600 answered a question Zaqar-Server Issue

Hello. It's impossible to use curl utility when Zaqar is configured to use websocket driver.

Basically you are trying to use HTTP RESTful API ("wsgi" transport driver in "zaqar.conf"), while your Zaqar is configured to provide Websocket API ("websocket" transport driver in "zaqar.conf") with default port 9000.

NOTE: DevStack during "stack.sh" starts two instances of Zaqar: first one configured to use Websocket driver and listen on port 9000 (strictly using config "/etc/zaqar/zaqar.conf"), second one configured to use WSGI driver and listen on port 8888 (using config "/etc/zaqar/zaqar.conf" with transport driver option changed to "wsgi". If "~/.zaqar/zaqar.conf" configuration file exists, it overrides "/etc/zaqar/zaqar.conf"). But seems like you run Zaqar manually. In this case it's the same: if "~/.zaqar/zaqar.conf" configuration file exists, it overrides "/etc/zaqar/zaqar.conf"

If you run Zaqar using "stack.sh" script, there must be Zaqar instance running on port 8888, so just send your curl requests to port 8888.

If you run Zaqar manually:

If you want to use curl utility, the only solution is to configure Zaqar to use wsgi back end:

1) Find [drivers] section in your "zaqar.conf" and ensure that transport option is set to wsgi:

transport = wsgi

2) If you haven't changed port option in [drivers:transport:wsgi] section in "zaqar.conf", Zaqar will listen on default wsgi port 8888.

Or If you still want to use Zaqar Websocket API:

You can keep the current Zaqar configuration, but have to write client application that can connect to Zaqar through Websocket protocol or use the existing one. I don't know any existing ones, except websocket client example written in javascript in Zaqar repository: "examples/websocket.html". You can edit it and open it in your web-browser.

Please note that if you want to use Zaqar with keystone authentication in this websocket client example, you have to either:

a) Bypass CORS checks in your web browser. Follow https://blog.nraboy.com/2014/08/bypass-cors-errors-testing-apis-locally/ (Bypass CORS Errors When Testing APIs Locally) instruction.

or

b) Turn on CORS in keystone. Follow https://ianunruh.com/2014/11/openstack-cors.html (Enabling CORS in OpenStack APIs) instruction. Also add open_expose_headers=X-Subject-Token to [filter:cors] section, so websocket client will be able to get authentication token from HTTP header "X-Subject-Token".

PS: I'm a newbie developer in Zaqar. Zaqar still has not it's Configuration Reference hosted anywhere, but it will be fixed very soon and you'll be able to read conveniently about Zaqar configuration options. ;)