669 Commits

Author SHA1 Message Date
Hoang Trung Hieu
a85969877c Zuul: Remove project name
Zuul no longer requires the project-name for in-repo configuration.
Omitting it makes forking or renaming projects easier.

Change-Id: Ie0f8b8d18ebdb213b515d00f3b1390e176e4965a
2018-01-29 13:32:21 +07:00
e173ac10d1 Update reno for stable/queens
Change-Id: Id73fa795a6236ed349564a8ea823b8c63c1edd8c
2018-01-24 18:11:38 +00:00
Julien Danjou
62fd552e1e partitioner: do not use hash() to determine object identity
The `hash` method is random on Python 3, so it's not consistent between. Just
use the string representation of the object as a default.

Change-Id: I84e2b19b64dc1641f9758429248dc6b928122b18
Closes-Bug: #1743243
2018-01-18 12:05:41 +01:00
Dirk Mueller
78caecd878 msgpack-python has been renamed to msgpack
Change-Id: I92cb78b4e361023f04424b3c52ac8ec8e0c82d5f
Related-Bug: #1743445
2018-01-15 21:17:01 +01:00
Sean McGinnis
958e6ff4c2 Remove tox_install.sh
This script is not used anywhere and can be removed.

Change-Id: I8f0fdedae24167692c080e021db6ea17bfbac1eb
2017-12-29 12:11:06 -06:00
Andreas Jaeger
bbe3a4300a Use native Zuul v3 tox jobs
Convert all tox jobs to be Zuul v3 native. This uses the shared
openstack-tox as base.

Remove the now unused playbooks.

Change-Id: Ic89940a03e308fab051b8051ff281724e6488306
2017-12-20 15:16:20 +00:00
Andreas Jaeger
e7afb739bf Add doc/requirements.txt
Fix doc building with new PTI changes and job updates.

Add a doc/requirements.txt file with all needed dependencies.

Change-Id: Ic7963520aeb0b9c463c4f9b5675589308720d6f8
2017-12-20 12:14:08 +01:00
Andreas Jaeger
7c1bfe579f Remove setting of version/release from releasenotes
Release notes are version independent, so remove version/release
values. We've found that projects now require the service package
to be installed in order to build release notes, and this is entirely
due to the current convention of pulling in the version information.

Release notes should not need installation in order to build, so this
unnecessary version setting needs to be removed.

This is needed for new release notes publishing, see
I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting
at
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
.

Change-Id: I17194b0c5fabbed79cb2082d650b29857f92072c
2017-11-16 22:31:28 +01:00
James E. Blair
c69235b073 Zuul: add file extension to playbook path
Zuul now supports including the file extension on the playbook path
and omitting the extension is now deprecrated.  Update references
to include the extension.

Change-Id: I5f78f356123428fd9072d798d5cc81bd026b2424
2017-10-29 10:02:00 -07:00
Duong Ha-Quang
ac4ecfb0a7 Move legacy jobs to project
This patch implements first step in zuulv3 migration guide [1]:

Move jobs to tooz repo

[1] https://docs.openstack.org/infra/manual/zuulv3.html#legacy-job-migration-details

Change-Id: I5511846b9fa87ffde3259ca024f6f1e1f439d51c
Co-Authored-By: Tovin Seven <vinhnt@vn.fujitsu.com>
2017-10-19 14:38:34 +07:00
Jenkins
29ec8eb26a Merge "redis: always remove lock from acquired lock when release()ing" 2017-08-23 17:08:12 +00:00
Jenkins
47ed0b9a9e Merge "redis: log an error on release failure" 2017-08-23 17:08:07 +00:00
Jenkins
e970dd5138 Merge "Use the same default timeout for async result" 2017-08-23 16:52:16 +00:00
Jenkins
4a8f74700e Merge "Add etcd3 group support" 2017-08-23 16:52:10 +00:00
Imran Ansari
a333c79066 Acquire fails with "ToozError: Not found"
For Etcd3Lock, blocking call to acquire an already acquired lock fails
when the thread/process, that acquired the lock takes more than the
timeout specified for the lock.

Scenario
========
1. First thread acquires a lock "Lock1"
2. Second thread tries to acquire "Lock1" with blocking=True
3. First thread releases lock after few minutes
4. Second thread tries to acquire it and fails with exception:
ToozError: Not found

Cause
=====
Lease gets created when the lock is created and the default timeout is
30 secs. Since the first thread takes more than 30 seconds to complete,
the lease for the second thread gets expired leading to "Not found"
message.

Resolution
==========
Create lease within Etcd3Lock.acquire() rather than
Etcd3Lock.__init__() of Etcd3Lock

Change-Id: Ief75675ebde2d824a25aec6210e2a868cf3dbbe7
Closes-Bug: #1708836
2017-08-14 16:58:40 +00:00
Julien Danjou
3f25d41182 redis: always remove lock from acquired lock when release()ing
The failure scenarios where LockError is raised is either:
- Lock is not locked. Then it should not be in _acquired_locks, so discard
  should be a no-op.
- Token changed. That can happen if the lock timed-out (and somebody else
  grabbed it). Then the lock is not longer owned anyway so let's remove it.

If releasing the lock fails, there's no way heartbeat will work anyway. So just
remove the lock from acquired locks and let it die anyway.

Change-Id: I44db39e83db7e6c0f17079584e49c8de34b51ce1
2017-08-14 10:18:09 +02:00
Julien Danjou
a25815d9a8 redis: log an error on release failure
Change-Id: Id63beaea3a0bc972a7117526aee1ad3f1ac99d84
2017-08-14 10:17:20 +02:00
Julien Danjou
e43dcfd2e1 Use the same default timeout for async result
Some drivers are using 10 whereas the rest as a default of None.

Change-Id: I2008b08fa76cac74f49334f7174c6ad7161e097b
2017-08-14 10:08:02 +02:00
1b321bcfc1 Update reno for stable/pike
Change-Id: Ie2e38752b4955e21c6618d21c6cd8444c93368e2
2017-07-28 21:09:02 +00:00
ChangBo Guo(gcb)
c2167820c8 Update URLs in documents according to document migration
Change-Id: I579b62a46f484e0129f88b12d1e16018cc9c7684
2017-07-13 12:09:43 +08:00
Akihiro Motoki
ee6f82d9d5 doc: use list-table for driver support tables
list-table is easier to be maintained.

In addition, we avoid too long lines.
We no longer have too long lines which doc8 complains,
so doc8 ignore_path can be dropped.

Change-Id: I574391295288ef9e33744aa608c2f2930a6e46f8
2017-07-10 12:44:29 +00:00
Akihiro Motoki
2ca15fedbe rearrange existing documentation to fit the new standard layout
Change-Id: If03b33fc1393c3a04d7d155b31e8377dc9e09360
2017-07-10 12:41:52 +00:00
Akihiro Motoki
38bcf7bbdb Switch from oslosphinx to openstackdocstheme
Change-Id: Id5e2952676e89f768e13b4ffc2f238eb012ec324
2017-07-07 02:54:25 +00:00
Akihiro Motoki
cf12457896 Turn on warning-is-error in doc build
- Update sphinx so that warning-is-error option is available
- Fix sphinx warnings
- Install python modules required for automodule into docs env
- Fix docstring warning in tooz/coordination.py
- pbr warnerrors is no longer needed in favor of sphinx warning-is-error

Change-Id: I5d54c452522b6ee00884d7d17105af22b4c95189
2017-07-07 02:52:30 +00:00
Julien Danjou
e1af969a68 Add etcd3 group support
Sem-Ver: feature

Change-Id: I1ce3a61c8e28b874df3583e08aa6a70f9506dd11
2017-07-05 16:15:54 +02:00
Jenkins
f947d1f377 Merge "Simplify env list and test running" 2017-07-05 12:50:22 +00:00
Jenkins
03dbf70f70 Merge "Make sure Lock.heartbeat() returns True/False" 2017-07-05 12:50:16 +00:00
Jenkins
d88f0f4c84 Merge "etcd3: replace custom lock code by more recent etcd3 lock code" 2017-07-05 12:36:22 +00:00
Jenkins
e6274bdd5b Merge "test: leverage existing helper method in test_partitioner" 2017-06-29 11:35:07 +00:00
Julien Danjou
7987f4455a Make sure Lock.heartbeat() returns True/False
- add a test to be sure that no lock refresh is made on non-acquired locks
- add thread safety for etcd3 drivers on heartbeat() (like Redis)

Change-Id: I350ea10163d59a06712c22c4c5be4dfcb6885bf8
2017-06-28 10:56:13 +02:00
Jenkins
fd08ee972c Merge "coordination: remove double serialization of capabilities" 2017-06-27 10:37:43 +00:00
Jenkins
635f822da6 Merge "tests: fix missing .get() on some group operations" 2017-06-26 19:11:33 +00:00
Julien Danjou
965fb4dc4a etcd3: skip ProcessPool based test
The other test is already skipped, but this one should also be skipped for the
same sad reason.

Change-Id: I101ef55dd3e83c0a30cc9dba12b224743071db34
2017-06-26 14:28:07 +02:00
Jenkins
1c6b3506fd Merge "Mutualize executor code in a mixin class" 2017-06-24 06:40:36 +00:00
Julien Danjou
c94b2a39b3 etcd3: replace custom lock code by more recent etcd3 lock code
The code in python-etcd3 for locks has been adjusted to reflect how tooz wants
his lock to work. That's amazing because now we can use them directly and not
implement our own locking mechanism!

Change-Id: Ia5741bae83cddd90f9bb78fba9173dca8509e6d9
2017-06-23 17:41:26 +02:00
Jenkins
743603a07c Merge "pgsql: fix self._conn.close() being called without connection" 2017-06-23 00:10:05 +00:00
Julien Danjou
90a56b0ab6 pgsql: fix self._conn.close() being called without connection
If an error occurs on connection establishment, self._conn is None so it can't
be closed.

Change-Id: If6fce24cb27aa7090b5165ca4a895c846c40d2dd
2017-06-22 12:48:06 +02:00
Julien Danjou
361406e595 test: leverage existing helper method in test_partitioner
Change-Id: Ib90ee990618cec712d7082e3c0498d92fe31946b
2017-06-21 17:43:26 +02:00
Julien Danjou
15f6de65e0 coordination: remove double serialization of capabilities
The capabilities was meant to be a byte string only, but since now all drivers
have been enhanced to serialize the data in a way or another, it accepts
anything. There's no need to pass a byte string anymore.

Change-Id: Ib732dccd18d67edd9e39e990b8ca3a8da7ab5663
2017-06-21 17:43:26 +02:00
Julien Danjou
a0590a7f7b tests: fix missing .get() on some group operations
Change-Id: Iaf009d7640865a107f36008e59c4ed5c6ae1a63f
2017-06-21 17:43:26 +02:00
Julien Danjou
13e23e3087 Mutualize executor code in a mixin class
Change-Id: I364b0ca5a6361a818a084bbcb83c9e7855cb3583
2017-06-21 17:43:26 +02:00
Julien Danjou
cc09f3f6ec coordination: fix reversed fiels for __repr__ for events
Change-Id: I6bcadea3ee998db82853228818668ad98951dcab
2017-06-21 17:31:27 +02:00
Julien Danjou
413527c181 Fix docstring for group and member id
What is really expected is bytes with ascii inside.

Change-Id: I6f2c4c6841558a73a129f4e1a39e896957c35911
2017-06-20 16:34:45 +02:00
Julien Danjou
ee66b6e4e4 {my,pg}sql: close connections when out of retry
The connection is supposedly closed when blocking is False and the lock is not
acquired. Or when an exception happens in the locking code.

But if blocking is e.g. 5 seconds, then RetryError is raised but without
closing any connection at the end. This fixes that.

Change-Id: I7b40e466fe5fc01ee3f8c012f765aafca9ce716a
2017-06-16 11:40:42 +00:00
Jenkins
5625106703 Merge "Disable test_get_lock_serial_locking_two_lock_process for etcd3" 2017-06-16 09:45:41 +00:00
Julien Danjou
ebd405056f Disable test_get_lock_serial_locking_two_lock_process for etcd3
gRPC (used by python-etcd3) is not able to work correctly with fork. One can
only use it in the child or master process, but not both. Therefore this test
will fail or hang forever.

Change-Id: I32453d2d968faefeffcff1f5b70b46daec36c300
2017-06-12 17:00:35 +02:00
Jenkins
42d7e2b27b Merge "Factorize tox envlist for better readability" 2017-06-12 11:27:36 +00:00
Julien Danjou
6d1e1b55cb Simplify env list and test running
This should make it easy to run any Python version test, e.g. Python 3.6,
without any further change.

Change-Id: I91a47b736371549e50b7c7fd60e46e0f87c357ae
2017-06-09 18:09:31 +02:00
Julien Danjou
0fa14dd60e Factorize tox envlist for better readability
Also add missing etcd.

Change-Id: I99dc4d6d2a62459652904dceb1d5047d1eb20077
2017-06-08 09:27:38 +02:00
Julien Danjou
18fdfa9de7 consul: remove unused executor
Change-Id: I98d7790fdc74a86a067fdbc0665fbd1abd7de77c
2017-06-06 18:31:02 +02:00