Merge ~marton-kiss/charm-openstack-service-checks:master into ~llama-charmers/charm-openstack-service-checks:master

Proposed by Márton Kiss
Status: Merged
Merged at revision: c1ea05b28321b85751c49eba2fb8dc5ec1b385bc
Proposed branch: ~marton-kiss/charm-openstack-service-checks:master
Merge into: ~llama-charmers/charm-openstack-service-checks:master
Diff against target: 30 lines (+8/-1)
2 files modified
config.yaml (+7/-0)
lib/lib_openstack_service_checks.py (+1/-1)
Reviewer Review Type Date Requested Status
Paul Goins Approve
Review via email: mp+384838@code.launchpad.net

Commit message

Add s3_check_params to resolve LP#1881310

To post a comment you must log in.
Revision history for this message
Paul Goins (vultaire) wrote :

Generally I'm +1 on this, but I'm uncertain regarding the default parameter here.

The swift_checks_param setting was added in at the same time of defining its entry in the health_check_params dict, thus it had no previous value to worry about.

On the other hand, the S3 check already uses /healthcheck, and changing to a default of / would possibly break existing deployments.

While not symmetrical with swift_check_params, I feel like the default here should be /healthcheck.

review: Needs Fixing
Revision history for this message
Márton Kiss (marton-kiss) wrote :

Paul, I fixed that, now it keeps the compatibility with former charms. However for deployments with ceph-radosgw for 20.05 charms +, the s3_check_params must be set to '/' in the config, otherwise the check will fail in nagios.

Revision history for this message
Paul Goins (vultaire) wrote :

Thanks. It's unfortunate regarding ceph-radosgw on 20.05+. Maybe this can be revisited later.

For the time being, I'm going to merge this since it should be backwards compatible and it at least gives the config options you need to set it either way.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/config.yaml b/config.yaml
2index edfda51..5d3302f 100644
3--- a/config.yaml
4+++ b/config.yaml
5@@ -128,6 +128,13 @@ options:
6 URL to use with check_http if there is a Swift endpoint. Default is '/', but it's possible to add extra params,
7 e.g. '/v3 -e Unauthorized -d x-openstack-request-id' or a different url, e.g. '/healthcheck'. Mitaka Swift
8 typically needs '/healthcheck'.
9+ s3_check_params:
10+ type: string
11+ default: "/healthcheck"
12+ description: |
13+ URL to use with check_http if there is an S3 endpoint. Default is '/healthcheck', but it's possible to add extra params,
14+ e.g. '/v3 -e Unauthorized -d x-openstack-request-id' or a different url, e.g. '/' (when the endpoint is used with
15+ ceph-radosgw for example).
16 contrail_analytics_vip:
17 type: string
18 default: ''
19diff --git a/lib/lib_openstack_service_checks.py b/lib/lib_openstack_service_checks.py
20index 25607d9..47a136b 100644
21--- a/lib/lib_openstack_service_checks.py
22+++ b/lib/lib_openstack_service_checks.py
23@@ -302,7 +302,7 @@ class OSCHelper():
24 'nova': '/healthcheck',
25 'octavia': '/v2 -e Unauthorized',
26 'placement': '/healthcheck -e Unauthorized -d x-openstack-request-id',
27- 's3': '/healthcheck',
28+ 's3': self.charm_config.get('s3_check_params', '/'),
29 'swift': self.charm_config.get('swift_check_params', '/'),
30 }
31

Subscribers

People subscribed via source and target branches