Revert "Implement cert cache for vault units (v3)"
This reverts commit fd4f7dc95fdf9efb9ba9213a11d0aafc392f9371.
Reason for revert:
Reason for revert:
The bug in [1] caused all the yoga tests to fail in integration testing. Testing with a version of the charm without this commit allowed tests to complete. Thus reverting this until a more complete solution can be found to the original bug(s) [2..4]
This cache is used to store certificates and keys
issued by the leader unit. Non-leader units read
these certificates and keep data in their
"tls-certificates" relations up to date.
This ensures that charm units that receive certs
from vault can read from relation data of any
vault unit and receive correct data.
This patch is mostly the same as
f55055b8783ca6f3f569209b4f82285377f5ac64
but improved to avoid LP#1983269 by breaking
down the cert cache into separate key-value pairs
for each remote unit and avoiding a race-condition
caused by get-csr action. Instead of using
leader-settings, this patch is now using
application data bag provided by a new vault-ha
relation implementation.
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Note that https://github.com/openstack/charms.openstack is used during tests
and he need `mock`, unfortunatelly it doesn't declare `mock` in its
requirements so it retrieve mock from other charm project (cross dependency).
So we depend on charms.openstack first and when
Ib1ed5b598a52375e29e247db9ab4786df5b6d142 will be merged then CI
will pass without errors.
Depends-On: Ib1ed5b598a52375e29e247db9ab4786df5b6d142
Change-Id: I1d7de2bd4d704ffc331fdeacea725e903890f296
(cherry picked from commit 1de27bc18f8879c4782476a8daacbdf0a1cb7077)
(cherry picked from commit 946ae6b1d2fee6cfaa8f884e01f8e9795b654dd8)
Tox 4.0.0 was recently released and it has several breaking changes.
We pin to < 4.0.0 here. We are planning to move forward only on the
master charm branches.
Tox is also pinned to < 4.0.0 for stable branches in upstream
openstack-zuul-jobs as well as in zosci-config. However, the
requires= section in the charm's tox.ini file ends up installing
tox>4, wiping out the zuul-pinned tox<4 that was already installed
installed. This patch fixes that.
Additional changes included in this patch:
- Add bindep.txt to install standard binary dependencies.
- Switch charm-tools to 2.8.4 to remove ruamel requirement that
doesn't work on Python 3.10 (required for pep8/cover).
- Pin zaza and zaza-openstack-tests to stable/yoga branch as
stable/21.10 is no longer supported.
- Pin urllib3 in test-requirements.txt for py35 unit tests