48 Commits

Author SHA1 Message Date
Fei Long Wang
aa0889a1c1 Fix zaqar-ui clone issue
Change-Id: Idbfbae3122bd919c3972408c92092ff0fb185bf1
2016-11-11 15:13:58 +13:00
Fei Long Wang
9d9147a189 Enanble Zaqar-UI in devstack
Change-Id: Ibc783bb6f0c86528ec49cb9abedc247b49580858
2016-10-11 17:07:57 +13:00
Jenkins
73ddab3cd6 Merge "Officially deprecate API v1.1" 2016-09-12 18:46:08 +00:00
Fei Long Wang
b745146df4 Officially deprecate API v1.1
Zaqar API v2 has been released for several cycles and it's integrated
as the default API version by most of the openstack services. So it
is time to deprecated v1.1 in favor of v2.

DocImpact
UpgradeImpact

Implements blueprint: deprecate-v1.1

Change-Id: I40c51df5a89e0a883ad14cf7e02b96ca78147294
2016-09-07 13:17:38 +12:00
tengqm
6767092295 Fix links in devstack/README.rst
The github.com contains a mirror of the git.opoenstack.org but it should
not be treated as the official site to get openstack projects.

Change-Id: I31270f013f70ce250f0b48f20d2454ee5079c252
2016-09-05 21:03:00 -04:00
Flavio Percoco
f38cecfdfc Disable DEPRECATED API versions by default
API v1.0 has been deprecated for a while and v1.1 will be deprecated
soon. We shouldn't be enabling deprecated API versions by default. This
patch adds a decorator to disable deprecated APIs by default unless they
have been explicitly enabled in the environment.

Co-Authored-By: Fei Long Wang <flwang@catalyst.net.nz>

Change-Id: I62fb4d18bc6c9f5455bff0d56e42269b4590b454
2016-09-04 11:55:24 +12:00
AvnishPal
28cc17109b This patch removes extra spaces from files.
Closes-Bug: #1603318

Change-Id: I55d47bfb0408d4a8bb59dcc70afd47a3c47ad9b1
2016-07-15 15:15:40 +05:30
Jenkins
2871900052 Merge "Add a trust notifier task" 2016-07-13 03:44:25 +00:00
rahulram
37cbe9070d Fixes: Typo in comments
Change-Id: Iee3e41d82061890034ba2fb72519c96934a0608a
2016-07-08 16:08:44 -07:00
Thomas Herve
51604b4954 Add a trust notifier task
This adds the ability to send keystone authentified notifications using
trusts. To do so, you specify the posted URL with the "trust+" prefix,
and Zaqar will create and store a trust when subscribing to a queue, if
the trust not provided in the subscription options

It also add a capability to the webhook task to be able to send more
structured data in the notification, allowing to include the Zaqar
message in the data.

blueprint mistral-notifications
DocImpact
Change-Id: I12b9c1b34cdd220fcf1bdc2720043d4a8f75dc85
2016-07-07 08:58:42 +02:00
Thomas Herve
349839d007 Remove tempest smoke tests run
It seems we're still running some useless tempest tests in the gate,
let's remove those.

Change-Id: I654d866841d818b59e8a1a3be00fff0a38828e00
2016-06-28 16:20:04 +02:00
Fei Long Wang
c5640b866b Support Tempest test as gate job
Now Zaqar isn't using Tempest for jenkins gate checking, which is
a missing. This patch fixes it by using Tempest's all-plugin to
run Zaqar's Tempest cases in tree.

Change-Id: I7e10a5b218b60eea47a96d36ebeb4029d33e7edd
2016-06-06 01:48:12 +00:00
ZhiQiang Fan
7e87adeecf remove verbose option in devstack plugin
This option is deprecated in Mitaka and has been removed in Newton,
and its default value is True already. Let's remove it.

Change-Id: I167713165bd96a4ccd423976f8fcad5ff8fc399c
ref: https://review.openstack.org/#/c/314573/
2016-05-23 22:00:07 +00:00
Ryan S. Brown
dd016c75c9 Use Client-ID in devstack ping request to Zaqar
With the recently merged patch https://review.openstack.org/274972,
Zaqar now requires "Client-ID" header for API v2.

Our devstack plugin checks if Zaqar has started by sending request to
Zaqar's ping endpoint. But devstack plugin is not using "Client-ID"
header for sending this request, so the request now always fails and
devstack thinks that Zaqar service hasn't started.

This patch adds "Client-ID" header to the ping request to Zaqar in the
devstack plugin.

Change-Id: I441a5a9778d0676e0a380f5e20be40e1a029409f
2016-02-10 20:34:00 +00:00
Thomas Herve
4ba0225e1f Fix gate issues
Subscription options returned by the controller get methods was not
unserialized propertly, still containing msgpack data.

It also changes so that mongo doesn't connect before forking, and fix
uwsgi persistent connections (non) support.

Finally, it changes how keystone options are registered to use a more
robust and supported mechanism.

Change-Id: I917a893c0d7175e3a465cf08c5e0375d9944fd16
2016-01-14 18:30:29 +01:00
venkatamahesh
c9f5e1c041 Add the default repos into devstack/settings file
Change-Id: I2980f619fb24c278c81a5a072af8d5fa2ab4882c
2015-11-20 22:54:43 +05:30
Jenkins
1ef07f3b6e Merge "Correctly stop uwsgi process during unstack.sh" 2015-11-10 16:49:34 +00:00
Eva Balycheva
9ac47de9d6 Fix mongodb.conf corruption during stack.sh
MongoDB can't start, if mongodb.conf has duplicate parameters.

When using Zaqar as plugin in DevStack on debian-like system,
each run of stack.sh adds a new line to etc/mongodb.conf:
"smallfiles=true"
So eventually mongodb.conf will contain duplicate parameters.

It means that stack.sh will be able to execute successfully only once,
on subsequent executions it will fail,
because of Zaqar which will fail to start,
because of MongoDB which will fail to start,
because of corrupted mongodb.conf
which will be corrupted by zaqar/devstack/plugin.sh

This commit will make sure that "smallfiles=true" line will be added to
mongodb.conf only if mongodb.conf doesn't contain this line already.

Change-Id: Ieba5abb970ff7565f3a837778e402ea8d5c5c463
Closes-Bug: 1507391
2015-10-19 07:25:30 +03:00
Eva Balycheva
39918c82d3 Correctly stop uwsgi process during unstack.sh
When using Zaqar as plugin in DevStack, after executing unstack.sh,
there's still Zaqar uwsgi master process with it's workers running:
/usr/local/bin/uwsgi --ini /etc/zaqar/uwsgi.conf
This process must be stopped.
Also running uwsgi process will prevent Zaqar to start on the next
execution of stack.sh.

The problem occurs, because of the nature of uwsgi container.
It just can't be stopped like that:
https://github.com/openstack/zaqar/blob/master/devstack/plugin.sh#L253

It must be stopped as described in uwsgi documentation:
https://uwsgi-docs.readthedocs.org/en/latest/Management.html

This commit will make uwsgi container process stop correctly on
unstack.sh execution by using PID of the process as described in uwsgi
documentation.

Change-Id: I2f39ea5880c2153fa14a8308d8710969ef6a1a5e
Closes-Bug: 1504854
2015-10-19 02:02:04 +03:00
Jenkins
54ea0032af Merge "Fix few typos in headings" 2015-09-21 13:47:08 +00:00
Flavio Percoco
95317c0c13 Allow running zaqarclient for gate tests
This change allows running either tempest or zaqarclient as testsuite in
Zaqar's gate. Ideally, we should focus on bringing as much tests as
possible to zaqarclient. However, we can't just give up on maintaining
tempest tests update. If anything, we should work harder on bringing
these in-tree or just contribute to the project.

Related-to: I1ba10b18560f35f48a7258eaa2a57727617760bd
Depends-on: Ifcf54fa2d4a5bf49b6757b593bb70cdeda8edb2a
Related-to: Idbc2c9fbd5c63db01ce28e4a52d1a917e4360363
Depends-On: I0f1fd4374125d4b489f3804b79a672b39c714421
Change-Id: I36ac3833ad55123fba0ea71259be6d56353d53e1
2015-09-21 07:19:59 +00:00
venkatamahesh
62ebf7b222 Fix few typos in headings
1.) Corrected headings according to rules of migrations by
placing "=======" on headings in the files
2.) Some headings have extra "====", they are removed
3.) Launchpad url have '~' which makes error: page not found
,so it is removed

Change-Id: I99581025d579f18da9ebe57267fb002cbcba28dd
2015-09-19 16:37:56 +05:30
Fei Long Wang
d08f4913ca RBAC support based on oslo.policy
This commit adds support for RBAC using oslo.policy. This allows Zaqar
for having a fine-grained access control to the resources it exposes.
As of this patch, the implementation allows to have access control in
a per-operation basis rather than specific resources.

Co-Authored-by: Thomas Herve <therve@redhat.com>
Co-Authored-by: Flavio Percoco <flaper87@gmail.com>

blueprint: fine-grained-permissions

Change-Id: I90374a11815ac2bd9d31768588719d2d4c4e7f5d
2015-09-14 23:28:27 +12:00
Flavio Percoco
ffff834edb Enable pooling for redis' job
Now that the sqlalchemy management backend is complete, make sure it's
enabled for the redis gate since redis doesn't have support for the
managment API.

Change-Id: I65d6c38ec13026251a8aeb346d5248cf81de39e5
2015-09-08 13:36:46 +02:00
Flavio Percoco
dd3481be97 Don't set keystone as auth if not enabled
We create keystone accounts conditionally depending on whether keystone
was enabled or not. Do the same when configuring the auth strategy in
Zaqar.

Change-Id: Ic3a99e24099dbe32a4435dbb092d09a7fae7dc2f
2015-09-08 09:05:19 +02:00
Flavio Percoco
1c237ea530 Let devstack redirect output
Instead of daemonizing processes ourselves, let devstack take care of
that so that logging goes to the right place and then it'll be exported
and shown in the gate logs.

Closes-bug: #1493036

Change-Id: I532ad70dbf20985b8f4d16ea19799d4b832902ae
2015-09-07 18:01:48 +02:00
Thomas Herve
69343f656b Set a secret key in devstack
This adds a secret key for created signed URLs in devstack by default.

Change-Id: I3b7ac2bad2e83f595758387e94f36c973aab1459
2015-08-19 14:53:14 +02:00
Thomas Herve
169f9da707 Fix WS endpoint registration
Fix a typo in devstack plugin preventing proper registration of the WS
endpoint.

Change-Id: Id685964ac10230f0c56a03d47c89250b208501bf
2015-08-13 17:43:44 +02:00
Jenkins
6d3be40c01 Merge "Add configuration to run service using uwsgi" 2015-08-06 09:57:32 +00:00
Jenkins
eb7edf4624 Merge "Set auth_strategy in devstack" 2015-08-06 09:50:56 +00:00
Thomas Herve
ec0b1c5150 Add configuration to run service using uwsgi
Add a sample configuration for running the wsgi transport using uwsgi,
and make devstack uses it, while running zaqar-server with websocket
transport.

This allows running both websockets and wsgi transports on devstack.

Change-Id: Ifac7461ec6b0501b1b9021030d9c173cf368a59b
2015-08-05 08:51:44 +02:00
Jenkins
345bdd5a45 Merge "Fix enabling of Zaqar in Devstack plugin" 2015-08-03 13:11:51 +00:00
Thomas Herve
582fa486fa Set auth_strategy in devstack
Enable authentication using keystone in the default devstack
configuration.

Change-Id: I9e6974dac26a23c6f93fc2a9936807c081b7a7c5
Closes-Bug: #1479273
2015-07-31 14:50:00 +02:00
Thomas Herve
fc31ee07c8 Enable message pipeline on devstack
This allows notifications to work by default.

Change-Id: I7209a0a684f64f5ddc53a76020ae87b85e3fa9bd
Closes-Bug: #1477017
2015-07-22 14:34:07 +02:00
Valeriy Ponomaryov
1a42098456 Fix enabling of Zaqar in Devstack plugin
Zaqar can be installed in two ways using devstack:
- using old approach called "hooks"
- using new approach called "devstack plugin"

So, if we try to install it using only devstack plugin enabling it as following:

"enable_plugin zaqar https://github.com/openstack/zaqar"

in localrc file, then we get nothing in a result. Because Devstack plugin tries
to enable zaqar using 'enable_service zaqar' [1].
But, then, devstack performs action verifying that 'zaqar-server' is
enabled. [2]
This leads to that zaqar is not installed at all.

For the moment, Zaqar installation works in CI because 'zaqar-server' is
enabled by other means using hooks.

[1]: https://github.com/openstack/zaqar/blob/bfcc60c1/devstack/settings#L4
[2]: https://github.com/openstack/zaqar/blob/bfcc60c1/devstack/plugin.sh#L246

Change-Id: I3c55756171e772d5c9e69066e0434ace5da0f852
Closes-Bug: #1476583
2015-07-21 12:46:28 +03:00
Flavio Percoco
bfcc60c170 Try to use a default pool when creating a queue
We recently enabled default pools creation, which will use the default
`message_storage` if present. This patch extends that to queue's
creation where we try to register a queue in the catalogue but we fail
if no pools were found.

With this patch, the failure will happen after checking if there's a
default pool that can be used.

In addition to the above, this commit adds a new option
`enable_virtual_pool` that makes default pools registration optional.
This is to avoid breaking backwards compatibility on the deployments
already running Zaqar.

DocImpact

Closes-bug: #1462008
Closes-bug: #1463110
Change-Id: Ieb8d2671066fc909f422bd74fd20070bc0f9cf11
2015-06-12 06:16:10 +00:00
Flavio Percoco
de1b3307fa Split storage into (message|management)_storage
We split both, data and control, planes and we were diligent in
splitting the configuration sections. However, we forgot to split the
`storage` option in the `drivers` section.

This patch does that and marks the old option as deprecated.

Closes-bug: #1462025
Change-Id: I692c35dcf217bede557ac463b2388f9a60d96c79
2015-06-10 16:53:54 +02:00
Flavio Percoco
d87c97d01b Deprecate v1
This patch marks v1 as deprecated. It'll be removed in the next cycle
and we won't  be fixing things for it anymore. This change should be
reflected in the client library as well.

In this patch, devstack has been switched to use v2 directly, which is
the current developed/maintained version.

APIImpact

Change-Id: I2f32828835b3329b37bf7bac04024c46c161054a
2015-06-04 20:37:39 +02:00
Flavio Percoco
9352bb600f Enable pooling in devstack
This patch enables pooling by default. Pooling has become a central
piece for Zaqar, therefore, we ought to test on it always.

The patch also changes the behavior for pools in Zaqar. That is,
whenever a default pool is not found and a `message_store` section has
been configured, such section will be used as the default store. No
pools will be created out of this configurations so that users can still
configure their default store using zaqarclient.

Change-Id: I820ac017ee44b806dead9bc484664228d4022f81
Depends-On: If5c91ebe136017cea2eeecf62a580d050e49617d
2015-05-27 14:25:19 +02:00
Flavio Percoco
c09f24ee5d Set unreliable True
We won't likely have a reliable cluster set up in devstack in the short
term. Set unreliable=True as the default for now.

Change-Id: Ifc8f9d49edc09b736699fc14e06481d1552a6e9b
2015-05-07 19:50:29 +02:00
Flavio Percoco
9e0735444c Fix gate_hook and post_test_hook perms
Files weren't executable, hence the gate failures we've been seeing.

Change-Id: I34b6c3eeb253f2bf0f317b2533734c40f5e3aa6a
2015-05-07 19:50:25 +02:00
Flavio Percoco
2988f738b1 Add gate hooks to enhance Zaqar's job
Add gate hooks to be able to control the gate workflow easily. This adds
a hook that runs before the test and one that runs after the test.

Change-Id: I1c45a76b2bc0bdec83e5d21aa9657848f069d958
2015-05-06 08:48:22 +02:00
Flavio Percoco
172dd3824a Add function dispatchers
Add devstack function dispatchers so that these functions will be
actually called when stack.sh is executed.

Change-Id: Ia9a6ecef8dfff93e39c507bbbb25fbc544dfaf48
2015-05-06 08:48:16 +02:00
Flavio Percoco
e70fad4191 Update dataplane section name
We recently split the data plane from the control plane. This patch
updates those sections in devstack.

Change-Id: Idfa1325cf5732b408cb717e8b6162b18e1618985
Depends-On: If5c91ebe136017cea2eeecf62a580d050e49617d
2015-04-30 09:26:54 +02:00
Flavio Percoco
634455d0a2 Remove support for sqlalchemy in devstack
Zaqar doesn't support sqlalchemy for the dataplane anymore. This patch
removes it. Future patches will bring it back to support the management
plane.

Change-Id: If464f1b6ba5bda84654ff70f19ea891c99ba92e3
Depends-On: If5c91ebe136017cea2eeecf62a580d050e49617d
2015-04-30 09:26:54 +02:00
Flavio Percoco
f81cd02882 Rename service to zaqar
Instead of using `zaqar-server` as the service name in devstack, use
zaqar. This will allow for future services to be added.

Change-Id: I65667da3783130876ed781b2659000b82fa15e37
Depends-On: If5c91ebe136017cea2eeecf62a580d050e49617d
2015-04-30 09:26:54 +02:00
Flavio Percoco
a432f030ed Install packages from plugin.sh
The plugin installs redis packages when needed but it doesn't do the
same for mongodb. This patch makes sure the required mongodb packages
are installed.

Change-Id: Ifef3d043cc05323a964ac3f3eac2f3505b267b82
Depends-On: 9643dcbf073d187d1ec32253c039ede6ba8b4d59
2015-04-30 09:26:53 +02:00
Flavio Percoco
5b7181e66e Move devstack's Zaqar code into the codebase
This, besides making devstack slimner, will give us more control on
what's in the plugin and it'll allow us to experiment with different
configurations.

Change-Id: I38c6cf71e2ae73f60e4494d853fee5796aa1f0f8
2015-04-21 16:36:01 +02:00