feat: replace bind-mount log pipeline with Docker log streaming
Services now print RFC 5424 to stdout; Docker captures via json-file driver. A new host-side collector (decnet.web.collector) streams docker logs from all running decky service containers and writes RFC 5424 + parsed JSON to the host log file. The existing ingester continues to tail the .json file unchanged. rsyslog can consume the .log file independently — no DECNET involvement needed. Removes: bind-mount volume injection, _LOG_NETWORK bridge, log_target config field and --log-target CLI flag, TCP syslog forwarding from service templates.
This commit is contained in:
@@ -62,41 +62,22 @@ class TestDecnetConfig:
|
||||
)
|
||||
assert cfg.mode == "unihost"
|
||||
|
||||
def test_valid_log_target(self):
|
||||
def test_log_file_field(self):
|
||||
cfg = DecnetConfig(
|
||||
mode="unihost", interface="eth0",
|
||||
subnet="10.0.0.0/24", gateway="10.0.0.1",
|
||||
deckies=[self._base_decky()],
|
||||
log_target="192.168.1.5:5140",
|
||||
log_file="/var/log/decnet/decnet.log",
|
||||
)
|
||||
assert cfg.log_target == "192.168.1.5:5140"
|
||||
assert cfg.log_file == "/var/log/decnet/decnet.log"
|
||||
|
||||
def test_none_log_target_ok(self):
|
||||
def test_log_file_defaults_to_none(self):
|
||||
cfg = DecnetConfig(
|
||||
mode="unihost", interface="eth0",
|
||||
subnet="10.0.0.0/24", gateway="10.0.0.1",
|
||||
deckies=[self._base_decky()],
|
||||
log_target=None,
|
||||
)
|
||||
assert cfg.log_target is None
|
||||
|
||||
def test_invalid_log_target_no_port(self):
|
||||
with pytest.raises(Exception):
|
||||
DecnetConfig(
|
||||
mode="unihost", interface="eth0",
|
||||
subnet="10.0.0.0/24", gateway="10.0.0.1",
|
||||
deckies=[self._base_decky()],
|
||||
log_target="192.168.1.5",
|
||||
)
|
||||
|
||||
def test_invalid_log_target_non_digit_port(self):
|
||||
with pytest.raises(Exception):
|
||||
DecnetConfig(
|
||||
mode="unihost", interface="eth0",
|
||||
subnet="10.0.0.0/24", gateway="10.0.0.1",
|
||||
deckies=[self._base_decky()],
|
||||
log_target="192.168.1.5:abc",
|
||||
)
|
||||
assert cfg.log_file is None
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -118,7 +99,6 @@ def _sample_config():
|
||||
distro="debian", base_image="debian", hostname="host-01",
|
||||
)
|
||||
],
|
||||
log_target="10.0.0.1:5140",
|
||||
)
|
||||
|
||||
|
||||
@@ -132,7 +112,6 @@ def test_save_and_load_state(tmp_path):
|
||||
loaded_cfg, loaded_compose = result
|
||||
assert loaded_cfg.mode == "unihost"
|
||||
assert loaded_cfg.deckies[0].name == "decky-01"
|
||||
assert loaded_cfg.log_target == "10.0.0.1:5140"
|
||||
assert loaded_compose == compose
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user