katalon-cli 0.5.0__tar.gz → 0.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/PKG-INFO +1 -1
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/pyproject.toml +1 -1
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/pyproject.toml.orig +1 -1
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/core/checks.py +16 -20
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/README.md +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/__init__.py +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/core/__init__.py +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/core/backup.py +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/core/compose_gen.py +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/core/docker.py +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/core/images.py +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/core/paths.py +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/core/permissions.py +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/core/reindex.py +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/core/release.py +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/core/selfupdate.py +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/core/state.py +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/main.py +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/py.typed +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/templates/Caddyfile.j2 +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/templates/compose.yaml.j2 +0 -0
- {katalon_cli-0.5.0 → katalon_cli-0.5.1}/src/katalon_cli/templates/nginx.conf.j2 +0 -0
|
@@ -8,10 +8,11 @@ import subprocess
|
|
|
8
8
|
from dataclasses import dataclass
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
|
|
11
|
+
from . import docker
|
|
12
|
+
|
|
11
13
|
MIN_FREE_DISK_GB = 5
|
|
12
14
|
# Elasticsearch verweigert Shard-Allokation ab 90 % (high watermark).
|
|
13
15
|
MAX_USED_PERCENT = 90
|
|
14
|
-
REAL_FS = {"ext2", "ext3", "ext4", "xfs", "btrfs", "zfs", "f2fs"}
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
@dataclass
|
|
@@ -52,30 +53,25 @@ def check_disk_space(path: Path, min_gb: int = MIN_FREE_DISK_GB) -> CheckResult:
|
|
|
52
53
|
"Diskspace", ok, f"{free_gb:.1f} GB frei (min. {min_gb} GB) in {path}"
|
|
53
54
|
)
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
"""Alle echten Dateisysteme des Hosts; ohne /proc/mounts Instanzverzeichnis und `/`."""
|
|
57
|
-
try:
|
|
58
|
-
lines = Path("/proc/mounts").read_text().splitlines()
|
|
59
|
-
except OSError:
|
|
60
|
-
return [instance_dir, Path("/")]
|
|
61
|
-
return [Path(f[1].replace("\\040", " ")) for f in map(str.split, lines) if f[2] in REAL_FS]
|
|
56
|
+
ES_DATA_PATH = "/usr/share/elasticsearch/data"
|
|
62
57
|
|
|
63
58
|
|
|
64
59
|
def check_server_disk(instance_dir: Path, max_used: int = MAX_USED_PERCENT) -> CheckResult:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
60
|
+
"""Belegung des Dateisystems mit dem Elasticsearch-Datenpfad, gemessen im Container (auch Docker Desktop)."""
|
|
61
|
+
if not docker.is_running(instance_dir, "elasticsearch"):
|
|
62
|
+
return CheckResult("Server-Disk", True, "Elasticsearch läuft nicht — Prüfung übersprungen")
|
|
63
|
+
result = docker.compose(
|
|
64
|
+
instance_dir, "exec", "-T", "elasticsearch", "df", "-Pk", ES_DATA_PATH, check=False, capture=True
|
|
65
|
+
)
|
|
66
|
+
try:
|
|
67
|
+
used = int(result.stdout.splitlines()[-1].split()[4].rstrip("%"))
|
|
68
|
+
except (IndexError, ValueError):
|
|
69
|
+
return CheckResult("Server-Disk", True, "Belegung nicht lesbar — Prüfung übersprungen")
|
|
70
|
+
if used >= max_used:
|
|
75
71
|
return CheckResult(
|
|
76
|
-
"Server-Disk", False, f"
|
|
72
|
+
"Server-Disk", False, f"Elasticsearch-Daten {used} % belegt (≥ {max_used} %) — Elasticsearch blockiert ab 90 %"
|
|
77
73
|
)
|
|
78
|
-
return CheckResult("Server-Disk", True, f"
|
|
74
|
+
return CheckResult("Server-Disk", True, f"Elasticsearch-Daten {used} % belegt (< {max_used} %)")
|
|
79
75
|
|
|
80
76
|
|
|
81
77
|
def check_openssl() -> CheckResult:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|