From 9c8d0754da9aed1f36dba85ccfe7620953bfd1ba Mon Sep 17 00:00:00 2001 From: Dmitry Belov Date: Fri, 20 Sep 2024 13:54:30 +0300 Subject: [PATCH] chore: log file removed, glauth command simplified --- src/charm.py | 5 ----- src/configs.py | 6 +----- src/constants.py | 3 --- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/charm.py b/src/charm.py index 13574f96..7a9aa20e 100755 --- a/src/charm.py +++ b/src/charm.py @@ -49,7 +49,6 @@ GLAUTH_LDAP_PORT, GRAFANA_DASHBOARD_INTEGRATION_NAME, LDAP_CLIENT_INTEGRATION_NAME, - LOG_DIR, LOKI_API_PUSH_INTEGRATION_NAME, PROMETHEUS_SCRAPE_INTEGRATION_NAME, WORKLOAD_CONTAINER, @@ -247,10 +246,6 @@ def _on_pebble_ready(self, event: PebbleReadyEvent) -> None: @wait_when(container_not_connected) def __on_pebble_ready(self, event: PebbleReadyEvent) -> None: - if not self._container.isdir(LOG_DIR): - self._container.make_dir(path=LOG_DIR, make_parents=True) - logger.debug(f"Created logging directory {LOG_DIR}") - try: self._certs_integration.update_certificates() except CertificatesError: diff --git a/src/configs.py b/src/configs.py index 024e8bc8..e674e3fb 100644 --- a/src/configs.py +++ b/src/configs.py @@ -11,7 +11,6 @@ from constants import ( GLAUTH_COMMANDS, - LOG_FILE, POSTGRESQL_DSN_TEMPLATE, SERVER_CERT, SERVER_KEY, @@ -111,10 +110,7 @@ def render(self) -> str: "override": "replace", "summary": "GLAuth Operator layer", "startup": "disabled", - "command": '/bin/sh -c "{} 2>&1 | tee {}"'.format( - GLAUTH_COMMANDS, - LOG_FILE, - ), + "command": GLAUTH_COMMANDS, } }, }) diff --git a/src/constants.py b/src/constants.py index f9d864db..6d54f931 100644 --- a/src/constants.py +++ b/src/constants.py @@ -17,9 +17,6 @@ GLAUTH_COMMANDS = f"glauth -c {GLAUTH_CONFIG_FILE}" GLAUTH_LDAP_PORT = 3893 -LOG_DIR = PurePath("/var/log") -LOG_FILE = LOG_DIR / "glauth.log" - WORKLOAD_CONTAINER = "glauth" WORKLOAD_SERVICE = "glauth"