1773 Commits

Author SHA1 Message Date
Jenkins
9b2ea0719e Merge "Fix wrong claim error message" 2016-05-03 22:28:23 +00:00
Jenkins
4dad985c04 Merge "Default message ttl is needed to change correctly" 2016-04-28 01:14:17 +00:00
Fei Long Wang
cae19a2886 Fix wrong claim error message
Now when create a claim with a big number, the message is not
correct. It's showing the max TTL of message instead of claim.
This patch fixes it.

Closes-Bug: #1575870

Change-Id: Ia948cc521a48101fa17ec23f49b5b03164f02940
2016-04-28 10:34:57 +12:00
Jenkins
621393d113 Merge "Fix service_available opt registration and extra comma" 2016-04-18 13:19:31 +00:00
Jenkins
d31c96924e Merge "Merge tag '2.0.0'" 2016-04-18 13:19:16 +00:00
Jenkins
02572a4103 Merge "Make sure use IPv6 sockets for Zaqar in IPv6 environment" 2016-04-15 15:37:45 +00:00
Jenkins
c2cb6858f3 Merge "Fix auth issue when accessing root path "/"" 2016-04-15 15:36:13 +00:00
Jenkins
3a2ab7160c Merge "expires should be checked when using pre-signed url" 2016-04-13 18:52:13 +00:00
wanghao
fc612ceeaf Default message ttl is needed to change correctly
Currently, when querying queue, Zaqar will return
the _default_message_ttl and _max_messages_post_size,
for _default_message_ttl, it's value is 1209600
if user didn't set it, but it's not correct.
It should be 3600 by default.

APIImpact
Change value of _default message_ttl to 3600

Change-Id: I6b999e56806c6ddcf47190a1fb1953ae373d1ad3
Closes-Bug: #1569663
2016-04-13 11:42:13 +08:00
Fei Long Wang
b59c304f7c Fix auth issue when accessing root path "/"
Now when access the root path of Zaqar service, for example:
curl GET http://127.0.0.1:8888/, user will see 401 error. Which
will cause some front end proxy(like HAProxy) complain. This
patch fixes the issue.

Closes-Bug: #1569474

Change-Id: I92c98495bf26277cd4c8c1d019c54698cace4bbd
2016-04-13 07:01:51 +12:00
Fei Long Wang
8237744372 Make sure use IPv6 sockets for Zaqar in IPv6 environment
In IPv6 management network environment, starting Zaqar server will
run into 'Address family for hostname not support' when use WSGI
simple server. The root cause is python TCPServer implementation
is hard-coded to use IPv4, even in IPv6 environments. Fix stolen
from Ceilometer.

Closes-Bug: #1569133

Change-Id: I708bf40526c1ff1632c0034e5758c6725a517ca1
2016-04-13 07:00:23 +12:00
wanghao
e4a5fd4886 Show default attributes for queue
Currently Zaqar will support more built-in/reserved
attributes in queue.
We add two important attributes max_messages_post_size
and max_message_ttl.

So it's very useful for users that if they create a queue without
metadata, when they query queue, Zaqar add those two attributes from
config to queue metadata and then return.
That will not be stuck if config is changed and user also can
know what value it is.

APIImpact
DocImpact

Change-Id: Icf9af8e357b2e2df363cd28ef3ca7f7f97a77744
Implements: blueprint show-default-attributes-for-queue
2016-04-12 09:19:56 +08:00
OpenStack Proposal Bot
e78c257d07 Updated from global requirements
Change-Id: I72e50282eb0d8c491155fcf2c0c8a523ee5cf51c
2016-04-08 00:34:59 +00:00
Jenkins
70d75eaf48 Merge "Added samples in multiple languages" 2016-04-07 23:56:07 +00:00
OpenStack Proposal Bot
7f03a2fc8d zaqar 2.0.0 release
meta:version: 2.0.0
 meta:series: mitaka
 meta:release-type: release
 meta:announce: openstack-announce@lists.openstack.org
 meta:pypi: no
 meta:first: yes
 -----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - http://gpgtools.org
 
 iQEcBAABAgAGBQJXBg/3AAoJEDttBqDEKEN6RdcH/iuKxRjuJ3Hqffu0pjyFhwnn
 SHr17VAoEpGEP8m1ur7PC0TOVPry2PazWaJ71a86DpW29KJdntWd458IYYUdVqKO
 Q3tukakx8lCs6AMuSfuLMEtPKg1eFwcLOa8PvggWA3rAbl/9qGNcy2YzgPUIS+7M
 fiRUL+hkciVqF/vNBkyAfHV8gH3zdyPQfgwHXLCr+lrg+LVAypUkvKQVgbHTEGv4
 0+c3BHFGXniHlu5sWopMuc+z9aWIfAV66PUL5TJCxXZPm1p/VONX9F05FZ4JAThg
 SaPO9wrv1SSLTgoyIVfBRjeJP3j5tSOASiG95CcFMyu/vnlEcu1bXL+SIrg8A4M=
 =0yfm
 -----END PGP SIGNATURE-----

Merge tag '2.0.0'

This is a null-merge of the 2.0.0 release tag back into the master
branch so that the 2.0.0 tag will appear in the git commit history of
the master branch. It contains no actual changes to the master branch,
regardless of how our code review system's UI represents it. Please
ask in #openstack-infra if you have any questions, and otherwise try
to merge this as quickly as possible to avoid later conflicts on the
master branch.

Change-Id: Iae0d9bc98a6dad492dd0c25ccb0fb9888063e817
2016-04-07 07:48:06 +00:00
Fernando Ribeiro
0810e1203e Added samples in multiple languages
This patch adds samples in Java, JavaScript and Python.

Change-Id: I70cd618d88bb905d6d71a08730b83015f6aaf009
Closes-Bug: #1559613
2016-04-05 14:46:34 -03:00
OpenStack Proposal Bot
791cc6f939 Updated from global requirements
Change-Id: Iaf31d6ce015284b4588f9ed305624f755acc8a2b
2016-04-04 23:23:28 +00:00
Jenkins
5882a5400c Merge "Fix tempest tests list" 2016-04-04 22:28:33 +00:00
Ethan Lynn
82e02a14bf Fix tempest tests list
Running command `testr list-tests zaqar` under tempest directory
get an empty list instead of the list of zaqar tempest list. This
patch set bath_path to the top directory of zaqar.

Change-Id: I8c91b83bfb5da37a95d6a797f1882221ccdc437a
Closes-Bug: #1563925
2016-03-31 20:55:44 +08:00
Serge Kovaleff
d5286f913c Fix service_available opt registration
and extra comma

Change-Id: Ia634cf9f69454d79f0ca133edeeefbe3afcd5aa7
2016-03-31 14:50:18 +03:00
wanghao
b645feb48a expires should be checked when using pre-signed url
When creating pre-signed url, if expire time is set
as some special string like "'expires'='3600'",
after creation is done, the expire time will be
"3600-01-01T00:00:00", that means this url will be
valid until the year 3600!

So we should check the data format of expire time,
if it's a string of integer value, zaqar should return error.

Change-Id: I61d2d977d45b5d33ff3355f2c854215ee1a52bb2
Closes-Bug: #1561311
2016-03-31 11:29:59 +08:00
Jenkins
d2e9140d86 Merge "Generate oslo.cache options via tox -e genconfig" 2016-03-31 01:36:55 +00:00
Jenkins
fa52496788 Merge "Validate PUT of reserved queue attributes metadata" into stable/mitaka 2016-03-25 11:34:37 +00:00
Eva Balycheva
da85355cf4 Validate PUT of reserved queue attributes metadata
We recently introduced reserved queue metadata feature in our API v2.
And because it's a feature of API v2, we decided not to change at all
our older APIs. But through our older APIs it's possible to PUT invalid
queue attributes, which can cause unstable work of API v2.

This patch makes API v1 restrict any metadata keys which names start
with "_", because they are probably reserved queue attributes.

This patch makes API v1.1 validate metadata like API v2 validates it now
to ensure that the reserved queue attributes have valid values, before
sending them to the database.

This patch also adds unit tests to APIs.

APIImpact
Closes-Bug: 1557247

Change-Id: Idcd063787c8d8da49a9c3d126441f9336c85e7cd
(cherry picked from commit 400fc6ec7de96f1119fd4d9dc4130374d6ca5895)
2016-03-25 06:51:28 +00:00
Jenkins
5bfbb47011 Merge "Validate PUT of reserved queue attributes metadata" 2016-03-25 04:41:46 +00:00
Eva Balycheva
400fc6ec7d Validate PUT of reserved queue attributes metadata
We recently introduced reserved queue metadata feature in our API v2.
And because it's a feature of API v2, we decided not to change at all
our older APIs. But through our older APIs it's possible to PUT invalid
queue attributes, which can cause unstable work of API v2.

This patch makes API v1 restrict any metadata keys which names start
with "_", because they are probably reserved queue attributes.

This patch makes API v1.1 validate metadata like API v2 validates it now
to ensure that the reserved queue attributes have valid values, before
sending them to the database.

This patch also adds unit tests to APIs.

APIImpact
Closes-Bug: 1557247

Change-Id: Idcd063787c8d8da49a9c3d126441f9336c85e7cd
2016-03-25 06:02:12 +03:00
Flavio Percoco
89c20fbabb Warn on upcoming deprecations for v1.0 and v1.1
v1.0 has been deprecated for a while now but it's still on by default.
V1.1, on the other hand, is still supported but on its way to being
deprecated. Warn users that both APIs will be turned off by default
during the Newton cycle.

Change-Id: Ibd6e12bd9a8ba414bb9ea26136a5acc1ca092142
(cherry picked from commit eb3dcee2389394eb62ff0f5a12acad7c6057a361)
2016-03-25 02:09:14 +00:00
Jenkins
0e1f4aed28 Merge "Warn on upcoming deprecations for v1.0 and v1.1" 2016-03-23 22:43:48 +00:00
Eva Balycheva
96717386a5 Generate oslo.cache options via tox -e genconfig
Currently generated zaqar.conf.sample is missing oslo.cache library
options, but they are used by Zaqar and are important in production
install.

This patch makes the command 'tox -e gencofig' generate also oslo.cache
options.

Change-Id: Ia8f78fd5a106888882f882aed8d8355e7e1e459e
Closes-Bug: 1560707
2016-03-23 01:38:24 +03:00
Flavio Percoco
eb3dcee238 Warn on upcoming deprecations for v1.0 and v1.1
v1.0 has been deprecated for a while now but it's still on by default.
V1.1, on the other hand, is still supported but on its way to being
deprecated. Warn users that both APIs will be turned off by default
during the Newton cycle.

Change-Id: Ibd6e12bd9a8ba414bb9ea26136a5acc1ca092142
2016-03-21 09:46:05 -04:00
Doug Hellmann
0a191c26c5 Update reno for stable/mitaka
Change-Id: I9e1a8cceb38ff73e7931796c5a03ca3047334c6b
2016-03-18 08:20:20 -04:00
Doug Hellmann
05efac8453 Update .gitreview for stable/mitaka
Change-Id: I4b358bcb17ae251c1b86150eb35484768b3865fe
2016-03-18 08:19:27 -04:00
Jenkins
98a0ac3cb3 Merge "Fix cleanup in metadata putting test" 2016-03-18 11:36:24 +00:00
Jenkins
3e996f7d91 Merge "Fix PATCH queue's metadata" 2016-03-18 10:51:33 +00:00
Fei Long Wang
3ba349e11d Fix PATCH queue's metadata
Currently, the way queue's PATCH HTTP method is implemented in API v2 is
not correct.

This patch makes PATCH HTTP method to work as RFC6902 recommends:
http://tools.ietf.org/html/rfc6902
This patch adds tests.
This patch makes Zaqar return 404 response in the case when the user
tries to perform PATCH on non-existing queue.

APIImpact
DocImpact

Closes-Bug: #1553002
Co-Authored-By: Fei Long Wang <flwang@catalyst.net.nz>
Co-Authored-By: Eva Balycheva <ubershy@gmail.com>
Change-Id: Id1f02c63e8f078ddb657d3e9bc83ac0668672748
2016-03-18 07:05:44 +03:00
Jenkins
5ff8b20a9a Merge "Add missing /ping for v1.1 homedoc" 2016-03-18 01:28:30 +00:00
Fei Long Wang
a61bd70404 Remove unnecessary assert
Change-Id: I18e78e7f0101dc67d1527480b2aec9e4af46ce6c
2016-03-17 21:20:13 +00:00
Eva Balycheva
6e2b9e444d Don't pass debug option to websocket constructor
Now, if you try to run Zaqar on Websocket driver with fresh 'autobahn'
library, Zaqar will fail:
TypeError: __init__() got an unexpected keyword argument 'debug'

Websocket-related tests now fail too.

The 'debug' option for instantiating websocket WebSocketServerFactory
was deprecated and recently it was finally removed from 'autobahn'
library.

This patch makes Zaqar not pass 'debug' option to WebSocketServerFactory
constructor. The change will not affect logging and will just fix the
problem.

Change-Id: Ifebf849b278f95438ed87ca50ff8cc48ad159104
Closes-Bug: 1558062
2016-03-16 16:12:52 +03:00
Eva Balycheva
f3a4132684 Fix cleanup in metadata putting test
Now, if you will try to run two times this command:
tox -e py27 wsgi.v2_0.test_validation.TestValidation.test_queue_metadata
_putting
You will see: MismatchError: '201 Created' != '204 No Content'

This is because cleanUp() is not written good in this test case.
self.simulate_delete function has missing argument: project id, so the
default project id is used instead during cleanUp().

The problem went unnoticed, because we usually run all tests. And when
all tests run the database is somehow cleaned in the place we need to
clean.

Change-Id: Id0241aeb76aabcb5e57098b0f02d26e62aead42e
2016-03-15 06:44:55 +03:00
Jenkins
114c9dee6b Merge "Updated from global requirements" 2016-03-13 20:48:39 +00:00
OpenStack Proposal Bot
f92f550741 Updated from global requirements
Change-Id: I0b87e0874f7fd33de07e7d7af719afea6d3730c1
2016-03-12 00:17:01 +00:00
wangxiyuan
3308af985b Renew subscription on update with TTL
Now when we update subscription and specify TTL, subscription is not
renewed. It's life is not extended, and it's expiration date is still
old.

Because of that, it's impossible to extend life of subscription without
recreating it. But during subscription recreation some messages may not
be sent to subscriber, because there will be a moment when subscription
does not exist, which is bad.

This patch makes subscriptions renewable by PATCH method, when TTL is
specified in the body. In such case PATCH method sets subscription TTL
to a new value and sets expiration date to a recalculated value: current
time + TTL.

This patch also adds two functional tests for testing TTL-related things
in subscriptions. This increases functional testing time by ~2-4
minutes.

APIimpact
Closes-Bug: #1552866
Co-Authored-By: wangxiyuan <wangxiyuan@huawei.com>
Co-Authored-By: Eva Balycheva <ubershy@gmail.com>
Change-Id: I048c37d6485ff27cf18ed27988874e470301fb57
2016-03-11 07:07:44 +03:00
Fei Long Wang
53f6a67e06 Add missing /ping for v1.1 homedoc
Change-Id: I0e77ca41a059fb74d4c9613d6ae03a020555607a
2016-03-10 13:33:48 +13:00
wangxiyuan
f94a9ee4ce Forbid update subscription to duplicate
Now if users update a subscription in a queue, it doesn't check the
legality of the new subscriber. We should forbid update subscription to
duplicate and return 409 response in such case.

This patch modifies Redis and MongoDB storage controllers and API v2.
It also adds unit tests for them.

The functional test will be updated in zaqar client.

APIimpact
Closes-Bug: #1545548
Closes-Bug: #1547131
Co-Authored-By: wangxiyuan <wangxiyuan@huawei.com>
Co-Authored-By: Eva Balycheva <ubershy@gmail.com>
Change-Id: I28fe7a114860488c503642417690bf5bfbd99678
2016-03-09 07:44:16 +03:00
Eva Balycheva
146e37c70f Fix updating subscription options in Redis driver
Now, if you try to update subscription in Redis and specify new options,
these options will be written to database in plain text format instead
of MessagePack format.
Then, if you try to get this subscription, Zaqar will return response
with code 503. Internally Zaqar will experience a problem while trying
to unpack subscription's options.

This patch makes Redis driver on HTTP PATCH method pack subscription
options in MessagePack format, before sending changes to database.

Change-Id: Ic3940b5093021c0d0cc5c345acabe29804d5a291
Closes-Bug: 1554683
2016-03-09 07:43:16 +03:00
Jenkins
11247caec4 Merge "Remove unused pngmath Sphinx extension" 2016-03-07 21:31:38 +00:00
OpenStack Proposal Bot
5a70f02cd3 Updated from global requirements
Change-Id: I04b72580f726dbb084a26403cfdf3ca2e92756b5
2016-03-05 03:12:32 +00:00
Fei Long Wang
5afb85a175 Support metadata update issue for v2
Now there is no way to update metadata after queue create.
That because we were trying to remove metadata but finally we
decided to keep it. As a result, we missed a way to update queue's
metadata. This patch fixes it buy supporting PATCH for queue. And
a test case is added.

APIImpact
DocImpact

Closes-Bug: #1543900

Change-Id: Iba6d7a0ca5cf7a755c20d9af69d5c52687142dff
2016-03-03 22:52:42 +00:00
Jenkins
0525130a73 Merge "Add _max_messages_post_size and _default_message_ttl for queue" 2016-03-03 20:02:59 +00:00
Jenkins
883bade05a Merge "Fix the TTL issue of subscriptions for MongoDB" 2016-03-03 17:42:16 +00:00