~guoqiao/charm-openstack-service-checks:lp1924816-requests-ca-bundle

Last commit made on 2021-05-14
Get this branch:
git clone -b lp1924816-requests-ca-bundle https://git.launchpad.net/~guoqiao/charm-openstack-service-checks
Only Joe Guo can upload to this branch. If you are Joe Guo please log in for upload directions.

Branch merges

Branch information

Name:
lp1924816-requests-ca-bundle
Repository:
lp:~guoqiao/charm-openstack-service-checks

Recent commits

0be89e2... by Joe Guo

ensure requests to use system ca bundle for ssl verify

`keystoneclient` will use `requests` to access api endpoints.
When https/ssl is enabled, `requests` will rely on package `certifi` to find ca certs for ssl verify.

However, `certifi` has different behavior:

- in python package, it will return builtin `cacert.pem` which is Mozilla Root Certificates.
- in deb package, it's modified to return `/etc/ssl/certs/ca-certificates.crt` as expected.

When we use vault, keystone endpoints will be https and ssl verify is needed.
The ca cert configured via `trusted_ssl_ca` will be merged into `/etc/ssl/certs/ca-certificates.crt`.

This is ok if charm is running globally without venv (certifi deb package is used).
But when charm is running in venv(certifi python package is used),
above cert will be ignored by requests and cause [SSL: CERTIFICATE_VERIFY_FAILED] error.

This patch set envvar REQUESTS_CA_BUNDLE to system ca bundle, so
requests will use it as ca cert, instead of `.venv/.../certifi/cacert.pem`.

Related bugs:
LP: #1924816
LP: #1926670

Signed-off-by: Joe Guo <email address hidden>

e50f728... by Joe Guo

add email_from_addr config option and pass to port security check when set

Signed-off-by: Joe Guo <email address hidden>

ccdc2e1... by Joe Guo

add test_check_port_security.py

Signed-off-by: Joe Guo <email address hidden>

82ec814... by Joe Guo

add config option email-recipients and pass to cron job

Add it as a generic email list, so far only used for check_port_security.py

Signed-off-by: Joe Guo <email address hidden>

cccc982... by Joe Guo

add cron file to run port security auto remediation every minute

Signed-off-by: Joe Guo <email address hidden>

ba4cfc0... by Joe Guo

add port security nrpe check and config option

Signed-off-by: Joe Guo <email address hidden>

6c08b10... by Joe Guo

add script check_port_security.py

Signed-off-by: Joe Guo <email address hidden>

ffb5c77... by Giuseppe Petralia

Refactor LB operating status unit tests.

1ff1474... by Giuseppe Petralia

Add Octavia LB operating status unittests

c37a4d0... by Giuseppe Petralia

Improve Octavia lbs operating status check.
Also provide a workaround for LP#1678330

Closes-bug: 1920025