Zuul no longer requires the project-name for in-repo configuration.
Omitting it makes forking or renaming projects easier.
Change-Id: Ie0f8b8d18ebdb213b515d00f3b1390e176e4965a
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
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
Fix doc building with new PTI changes and job updates.
Add a doc/requirements.txt file with all needed dependencies.
Change-Id: Ic7963520aeb0b9c463c4f9b5675589308720d6f8
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
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
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
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
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
- 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
- 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
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
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
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
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
This should make it easy to run any Python version test, e.g. Python 3.6,
without any further change.
Change-Id: I91a47b736371549e50b7c7fd60e46e0f87c357ae