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

Created by Haw Loeung and last modified
Get this branch:
bzr branch lp:~hloeung/ubuntu-repository-cache/only-reload-apache2-when-needed-2
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

314. By Haw Loeung

Log apache is already running

313. By Haw Loeung

Add missing unit tests

312. By Haw Loeung

Comment to explain why

311. By Haw Loeung

Fixed

310. By Haw Loeung

Only reload/graceful apache2 when required - LP:1916084

This is to prevent the issue with multiple SIGUSR1's causing:

| [Thu Feb 18 13:09:19.381403 2021] [cgid:error] [pid 611358:tid 139732453542976] (98)Address already in use: AH01243: Couldn't bind unix domain socket /var/run/apache2/cgisock.3630124
| [Thu Feb 18 13:09:20.382773 2021] [cgid:crit] [pid 3630124:tid 139732453542976] AH01238: cgid daemon failed to initialize

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>

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