hotfix: autoscaler main() setup_logging arg

setup_logging() takes a log LEVEL, not a logger name; passing
'cloud.autoscaler' raised ValueError at startup, so the scaler
crash-looped under systemd and started zero workers (the host
had no worker at all until this fix). The '/opt/.../-m'
FileNotFoundError in the same journal lines is only Ubuntu's
apport hook misfiring on 'python3 -m', not a second bug.
Regression test: main() with mocked run_loop/signal must reach
the loop (this would have caught the crash before deploy).
This commit is contained in:
host committed 2026-10-26 07:02:31 +08:00
1 parent 1f4463209b
commit 26daddf909
2 files changed
+17 -1

No files matched your search

+1 -1
View File
@@ -384,7 +384,7 @@ def main(argv=None):
print("autoscaler 需要 --db(或 worker 参数里的 --db)",
file=sys.stderr)
raise SystemExit(2)
setup_logging("cloud.autoscaler")
setup_logging()
scaler = Autoscaler(
db_path, worker_args, min_workers=args.min_workers,
max_workers=args.max_workers,