~superalpaca/ols-charm-deps:SN1460-add-prometheus-multiproc-dir-config

Last commit made on 2023-03-23
Get this branch:
git clone -b SN1460-add-prometheus-multiproc-dir-config https://git.launchpad.net/~superalpaca/ols-charm-deps
Only Deep Fowdar can upload to this branch. If you are Deep Fowdar please log in for upload directions.

Branch merges

Branch information

Name:
SN1460-add-prometheus-multiproc-dir-config
Repository:
lp:~superalpaca/ols-charm-deps

Recent commits

4b199e0... by Deep Fowdar

Update and simplify prometheus multiproc option.

* 'wsgi_use_prometheus_multiproc' now sets the appropriate env vars via
  'env_extra', which in turn gets written to the environment_variables
  file.
* Removed now redundant gunicorn restart for this option (will restart
  on env var file change)
* Simplified gunicorn config file

3d8a8f5... by Deep Fowdar

Fix error from config reload when changing 'wsgi_use_prometheus_multiproc' and other misc changes.

Additional changes:
* Added link to the required python prometheus client on GitHub
* Multiproc metrics now always apply when the option is set, ignoring
  the worker count

a90fc33... by Deep Fowdar

Fix gunicorn crashing on charm startup.

The gunicorn service was failing on startup due to a partially
initialised module (prometheus_client). However, moving this import from
child_exit() to the top of the file results in an empty metrics endpoint
for the workers. The solution to this is to re-initialise the
prometheus_client.values.ValueClass so it can fetch the new multiprocess
environment variables.

50e75c5... by Deep Fowdar

Update config option description for prometheus_multiproc.

da3debd... by Deep Fowdar

Remove 'wsgi_prometheus_multiproc_dir' in favour of boolean 'wsgi_use_prometheus_multiproc'.

If 'wsgi_use_prometheus_multiproc' is true, this will override the
'PROMETHEUS_MULTIPROC_DIR' env vars in gunicorn.

fc7c26c... by Deep Fowdar

Add prometheus multi-process support.

948c32b... by Colin Watson

Bump interface-pgsql to 70d2da5

Merged from https://code.launchpad.net/~cjwatson/ols-charm-deps/+git/ols-layers/+merge/439047

beee020... by Colin Watson

Bump interface-pgsql to 70d2da5

This pulls in the fix from
https://code.launchpad.net/~cjwatson/interface-pgsql/+git/interface-pgsql/+merge/438333.

9bf2934... by Guillermo Gonzalez

Update ols-pg/reactive code to work with newer interface-pgsql

replace RelationBase with Endpoint

Merged from https://code.launchpad.net/~verterok/ols-charm-deps/+git/ols-layers/+merge/438243

6e53138... by Guillermo Gonzalez

update ols-pg/reactive code to work with newer interface-pgsql