launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #30132
[Merge] ~cjwatson/launchpad:charm-appserver-simplify-status-check into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:charm-appserver-simplify-status-check into launchpad:master.
Commit message:
charm/launchpad-appserver: Use /_status/check as health check
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/444939
This is more lightweight than checking the front page, but it still checks that the appserver has a database connection.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:charm-appserver-simplify-status-check into launchpad:master.
diff --git a/charm/launchpad-appserver/reactive/launchpad-appserver.py b/charm/launchpad-appserver/reactive/launchpad-appserver.py
index ad4b439..6ba559f 100644
--- a/charm/launchpad-appserver/reactive/launchpad-appserver.py
+++ b/charm/launchpad-appserver/reactive/launchpad-appserver.py
@@ -1,7 +1,6 @@
# Copyright 2022 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-import shlex
import subprocess
from multiprocessing import cpu_count
@@ -182,9 +181,6 @@ def memcache_relation_changed(memcache):
def nrpe_available():
nrpe = endpoint_from_flag("nrpe-external-master.available")
config = hookenv.config()
- healthy_regex = (
- r"(\/\+icing\/rev[0-9a-f]+\/).*(Is your project registered yet\?)"
- )
nrpe.add_check(
[
"/usr/lib/nagios/plugins/check_http",
@@ -192,8 +188,8 @@ def nrpe_available():
"localhost",
"-p",
str(config["port_main"]),
- "-l",
- "--regex=%s" % shlex.quote(healthy_regex),
+ "-u",
+ "/_status/check",
],
name="check_launchpad_appserver",
description="Launchpad appserver",