Skip to content

Commit 9e061a5

Browse files
MDBF-973 Fix master-web http log location
We write the http master-web log file in the wrong path. Previously relative to the master directory and currently, in the root path of the buildbot deployment after the .tac update ``` $ find . -type f -name "http.log*" -exec realpath {} \; /srv/dev/master-web/http.log /srv/dev/http.log.2 /srv/dev/http.log.14 /srv/dev/http.log.16 ... ``` This patch will change the http log dir to the common Logs folder for all masters. Expected location after this patch ``` $ find . -type f -name "master-web-www.log*" -exec realpath {} \; /srv/dev/docker-compose/logs/master-web-www.log ```
1 parent e84cb1b commit 9e061a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

master-web/master.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import os
77
from buildbot.plugins import schedulers, util
88
from flask import Flask, render_template
99
from master_common import base_master_config
10+
from pathlib import Path
1011
from utils import upstream_branch_fn
1112

1213
cfg_dir = os.path.abspath(os.path.dirname(__file__))
@@ -19,6 +20,7 @@ cfg_dir = os.path.abspath(os.path.dirname(__file__))
1920
#
2021
# Non autogen masters load from <srcdir> for now.
2122
base_dir = os.path.abspath(f"{cfg_dir}/../")
23+
log_basedir_path = Path("/var/log/buildbot/")
2224

2325
# Load the slave, database passwords and 3rd-party tokens from an external private file, so
2426
# that the rest of the configuration can be public.
@@ -34,6 +36,7 @@ c = BuildmasterConfig = base_master_config(config)
3436
c["protocols"] = {}
3537
# minimalistic config to activate web UI
3638
c["www"] = {
39+
"logfileName": os.path.join(log_basedir_path, "master-web-www.log"),
3740
"port": int(os.environ["PORT"]),
3841
"plugins": {
3942
"waterfall_view": {},

0 commit comments

Comments
 (0)