lp:~hloeung/ubuntu-repository-cache/only-reload-apache2-when-needed-4

Created by Haw Loeung and last modified
Get this branch:
bzr branch lp:~hloeung/ubuntu-repository-cache/only-reload-apache2-when-needed-4
Only Haw Loeung can upload to this branch. If you are Haw Loeung please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Haw Loeung
Project:
Ubuntu Repository Cache Charm
Status:
Merged

Recent revisions

312. By Haw Loeung

apache.render_configs() already calls apache.start() when needed so not needed in unpause()

311. By Haw Loeung

Only reload/graceful apache2 when required - LP:1916084

Reviewed-on: https://code.launchpad.net/~hloeung/ubuntu-repository-cache/only-reload-apache2-when-needed-3/+merge/398328
Reviewed-by: Joel Sing <email address hidden>

310. By Haw Loeung

Only reload/graceful apache2 when required - LP:1916084

Reviewed-on: https://code.launchpad.net/~hloeung/ubuntu-repository-cache/only-reload-apache2-when-needed-2/+merge/398326
Reviewed-by: Barry Price <email address hidden>

309. By Haw Loeung

Handle when newly provisioned unit

Newly provisioned units set the charm's failover feature. This sets up proxying of all requests to the last u-r-c unit. This means that the health-check will succeed as it's checking on the previous unit.

We want to fix this by not proxying the health-check endpoint URL (/_health-check/health-check.py). We also want to set the health-check's 'disabled for maintenance' flag when the charm's failover feature is activated.

Finally, update the health-check to ensure ubuntu_active is present. It's not present on initial metadata sync.

Reviewed-on: https://code.launchpad.net/~hloeung/ubuntu-repository-cache/health-check-handle-initial-sync/+merge/398100
Reviewed-by: Nick Moffitt <email address hidden>
Reviewed-by: Tom Haddon <email address hidden>
Reviewed-by: Laurent Sesques <email address hidden>

308. By Haw Loeung

Fix issue with initial metadata sync failing - LP:1803453

Initial sync fails with SSH Host key verification failed. This is due
to the copied host key from the leader unit not including
itself[1]. Instead, we generate a list of hosts from the relation and
gather keys using the same method, unison.write_known_hosts().

[1]https://github.com/juju/charm-helpers/blob/master/charmhelpers/contrib/unison/__init__.py#L204

Reviewed-on: https://code.launchpad.net/~hloeung/ubuntu-repository-cache/ssh-known-hosts-on-join/+merge/398095
Reviewed-by: Paul Collins <email address hidden>

307. By Haw Loeung

503, as in HTTP/503 for disabled units for maintenance

306. By Haw Loeung

Offset DISABLED (or units marked down for maintenance) metric from health check endpoint so it's clearly visible on grafana graphs

Reviewed-on: https://code.launchpad.net/~hloeung/ubuntu-repository-cache/health-check-endpoint-2/+merge/397885
Reviewed-by: Barry Price <email address hidden>

305. By Haw Loeung

Ensure logging directory exists before apache.render_configs() which relies on it

Reviewed-on: https://code.launchpad.net/~hloeung/ubuntu-repository-cache/ensure-logging-dir-present-before-render-configs/+merge/397879
Reviewed-by: Paul Collins <email address hidden>

304. By Haw Loeung

Enable health-check endpoint by default

303. By Haw Loeung

New health check endpoint for load balancers to use

Load balancers can either monitor metadata (e.g. ubuntu/dists/*) or
pool files, which are proxied to the real archive
servers. Unfortunately, most can only check one thing so if the other
is having issues, it is not taken offline and still being used.

The new health check endpoint checks a few things and reports back OK
if all are healthy and fine. This means load balancers can just hit
this one endpoint and will take it offline if any of the components
are experiencing issues.

Reviewed-on: https://code.launchpad.net/~hloeung/ubuntu-repository-cache/health-check-endpoint/+merge/397547
Reviewed-by: Barry Price <email address hidden>
Reviewed-by: Benjamin Allot <email address hidden>

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:ubuntu-repository-cache
This branch contains Public information 
Everyone can see this information.

Subscribers