config/sysinv/sysinv/sysinv/sysinv/tests/cert_mon
Kyle MacLeod 7af9200325 Optimize cert-mon token cache sizing and re-use
During testing it was found that caching the DC endpoint keystone tokens
consumes an excessive amount of memory on systems with a large number of
subclouds. This is because the raw token data contains data across all
subclouds.

There are two related parts to this commit:

- Re-use the keystone Token across all DC subclouds. This single token
  is also cached.
    - Since the DC token is a "universal token" (project-scoped), we can
      re-use this token for all subclouds instead of getting a new token
      for each subcloud.
    - The subcloud catalog data also contains information for all
      subcloud endpoint URLs (required for the second point below)

- cert-mon utility functions which extract endpoint URLs from token data
  are updated to use an existing token rather than requesting a new
  token. This reduces system resource usage on large DC systems.

Test Plan:
- PASS: Verify token cache does not significantly impact memory
  consumption
- PASS: Verify token re-use in cert-mon utils maintains existing
  URL-extraction behaviour
- PASS: Verify cert-mon/keystone resource consumption during cert-mon
  daily audits

Failure Path:
- PASS: Verify token expiry is correctly handled

Story: 2008960
Task: 43504

Signed-off-by: Kyle MacLeod <kyle.macleod@windriver.com>
Change-Id: I0327eb50db1cb01a6f57c8675a2436389c0b7c94
2021-10-08 16:25:48 -04:00
..
data Unit test covering subcloud audit plus minor bug fix 2021-09-21 10:22:48 -04:00
__init__.py Backwards Compatibility for certificate management 2020-11-30 13:56:18 -05:00
test_cert_mon.py Optimize cert-mon token cache sizing and re-use 2021-10-08 16:25:48 -04:00
test_subcloud_audit_queue.py Add subcloud audit parallelization 2021-09-09 16:12:10 -04:00