moat-link-error 0.0.2__tar.gz → 0.1.2__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.
- {moat_link_error-0.0.2/src/moat_link_error.egg-info → moat_link_error-0.1.2}/PKG-INFO +6 -4
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/README.md +5 -3
- moat_link_error-0.1.2/debian/changelog +29 -0
- moat_link_error-0.1.2/debian/rules +13 -0
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/pyproject.toml +1 -1
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/src/moat/link/error/_impl.py +14 -10
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/src/moat/link/error/_main.py +9 -5
- {moat_link_error-0.0.2 → moat_link_error-0.1.2/src/moat_link_error.egg-info}/PKG-INFO +6 -4
- moat_link_error-0.0.2/debian/changelog +0 -11
- moat_link_error-0.0.2/debian/rules +0 -8
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/LICENSE.txt +0 -0
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/Makefile +0 -0
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/debian/.gitignore +0 -0
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/debian/control +0 -0
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/setup.cfg +0 -0
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/src/moat/link/error/__init__.py +0 -0
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/src/moat/link/error/_cfg.yaml +0 -0
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/src/moat_link_error.egg-info/SOURCES.txt +0 -0
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/src/moat_link_error.egg-info/dependency_links.txt +0 -0
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/src/moat_link_error.egg-info/requires.txt +0 -0
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/src/moat_link_error.egg-info/top_level.txt +0 -0
- {moat_link_error-0.0.2 → moat_link_error-0.1.2}/systemd/moat-link-error-monitor.service +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: moat-link-error
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Error trace monitor for MoaT-Link
|
|
5
5
|
Author-email: Matthias Urlichs <matthias@urlichs.de>
|
|
6
6
|
Project-URL: homepage, https://m-o-a-t.org
|
|
@@ -45,9 +45,11 @@ errors that don't recur.
|
|
|
45
45
|
|
|
46
46
|
## Usage
|
|
47
47
|
|
|
48
|
-
Run `moat link error : cache`
|
|
49
|
-
does that
|
|
50
|
-
|
|
48
|
+
Run `moat link error : cache` on one host. The `moat-link-error-monitor`
|
|
49
|
+
systemd unit does that; enable it manually (`systemctl enable --now
|
|
50
|
+
moat-link-error-monitor`) — it is not started automatically on install.
|
|
51
|
+
Then `moat link error PATH get` adds the stored traces to the error's
|
|
52
|
+
record, as `trace.first` and `trace.last`.
|
|
51
53
|
|
|
52
54
|
How long traces are kept is configured with `link.error.monitor.max_age`.
|
|
53
55
|
See `docs/moat-link/errors.md` for details.
|
|
@@ -21,9 +21,11 @@ errors that don't recur.
|
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
24
|
-
Run `moat link error : cache`
|
|
25
|
-
does that
|
|
26
|
-
|
|
24
|
+
Run `moat link error : cache` on one host. The `moat-link-error-monitor`
|
|
25
|
+
systemd unit does that; enable it manually (`systemctl enable --now
|
|
26
|
+
moat-link-error-monitor`) — it is not started automatically on install.
|
|
27
|
+
Then `moat link error PATH get` adds the stored traces to the error's
|
|
28
|
+
record, as `trace.first` and `trace.last`.
|
|
27
29
|
|
|
28
30
|
How long traces are kept is configured with `link.error.monitor.max_age`.
|
|
29
31
|
See `docs/moat-link/errors.md` for details.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
moat-link-error (0.1.2-1) unstable; urgency=medium
|
|
2
|
+
|
|
3
|
+
* New release for 26.5.31
|
|
4
|
+
|
|
5
|
+
-- Matthias Urlichs <matthias@urlichs.de> Fri, 30 Oct 2026 23:35:34 +0100
|
|
6
|
+
|
|
7
|
+
moat-link-error (0.1.1-1) unstable; urgency=medium
|
|
8
|
+
|
|
9
|
+
* New release for 26.5.30
|
|
10
|
+
|
|
11
|
+
-- Matthias Urlichs <matthias@urlichs.de> Fri, 30 Oct 2026 21:04:07 +0100
|
|
12
|
+
|
|
13
|
+
moat-link-error (0.1.0-2) unstable; urgency=medium
|
|
14
|
+
|
|
15
|
+
* New release for 26.5.29
|
|
16
|
+
|
|
17
|
+
-- Matthias Urlichs <matthias@urlichs.de> Fri, 30 Oct 2026 20:31:53 +0100
|
|
18
|
+
|
|
19
|
+
moat-link-error (0.0.2-1) unstable; urgency=medium
|
|
20
|
+
|
|
21
|
+
* New release for 26.5.28
|
|
22
|
+
|
|
23
|
+
-- Matthias Urlichs <matthias@urlichs.de> Fri, 30 Oct 2026 20:26:45 +0100
|
|
24
|
+
|
|
25
|
+
moat-link-error (0.0.1-1) unstable; urgency=medium
|
|
26
|
+
|
|
27
|
+
* Initial release
|
|
28
|
+
|
|
29
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sun, 25 Oct 2026 12:00:00 +0200
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/make -f
|
|
2
|
+
|
|
3
|
+
export PYBUILD_NAME=moat-link-error
|
|
4
|
+
%:
|
|
5
|
+
dh $@ --with python3 --buildsystem=pybuild
|
|
6
|
+
|
|
7
|
+
execute_after_dh_install:
|
|
8
|
+
$(MAKE) installsystemd PREFIX=debian/moat-link-error
|
|
9
|
+
|
|
10
|
+
# The error trace monitor must be enabled by hand on the one host that
|
|
11
|
+
# runs it, not started automatically wherever the package is installed.
|
|
12
|
+
override_dh_installsystemd:
|
|
13
|
+
dh_installsystemd --no-enable --no-start
|
|
@@ -22,6 +22,8 @@ from collections.abc import Mapping
|
|
|
22
22
|
from typing import TYPE_CHECKING
|
|
23
23
|
|
|
24
24
|
if TYPE_CHECKING:
|
|
25
|
+
from anyio.abc import TaskStatus
|
|
26
|
+
|
|
25
27
|
from moat.link.backend import Message
|
|
26
28
|
from moat.link.client import Link
|
|
27
29
|
|
|
@@ -85,27 +87,29 @@ class ErrorMon(MsgHandler):
|
|
|
85
87
|
self._timers: TimerMap[Path | str] = TimerMap()
|
|
86
88
|
"Expiry of traces (keyed by error path) and of ended processes (by ident)."
|
|
87
89
|
|
|
88
|
-
async def run(
|
|
90
|
+
async def run(
|
|
91
|
+
self,
|
|
92
|
+
link: Link,
|
|
93
|
+
task_status: TaskStatus[None] = anyio.TASK_STATUS_IGNORED,
|
|
94
|
+
) -> None:
|
|
89
95
|
"""
|
|
90
96
|
Watch ``run.error.*`` and record transient data.
|
|
91
97
|
|
|
92
98
|
Args:
|
|
93
99
|
link: A connected link client.
|
|
94
|
-
evt: Set once the subscription is up.
|
|
95
100
|
"""
|
|
96
101
|
async with (
|
|
97
102
|
anyio.create_task_group() as tg,
|
|
98
103
|
link.monitor(_ID_PATH, subtree=True) as ids,
|
|
99
|
-
link.monitor(_ERR_PATH, subtree=True, retained=False) as mon,
|
|
100
104
|
):
|
|
101
|
-
tg.start_soon(self._expire)
|
|
102
105
|
tg.start_soon(self._watch_ids, ids)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
async with link.monitor(_ERR_PATH, subtree=True, retained=False) as mon:
|
|
107
|
+
tg.start_soon(self._expire)
|
|
108
|
+
task_status.started()
|
|
109
|
+
async for msg in mon:
|
|
110
|
+
self.record(
|
|
111
|
+
msg.topic[len(_ERR_PATH) :], msg.data, msg.meta.timestamp, msg.meta.origin
|
|
112
|
+
)
|
|
109
113
|
|
|
110
114
|
async def _watch_ids(self, mon: AsyncIterator[Message]) -> None:
|
|
111
115
|
"Track the processes' announcements."
|
|
@@ -6,7 +6,7 @@ from contextlib import nullcontext
|
|
|
6
6
|
|
|
7
7
|
import asyncclick as click
|
|
8
8
|
|
|
9
|
-
from moat.util import NotGiven, yprint
|
|
9
|
+
from moat.util import NotGiven, as_service, attrdict, yprint
|
|
10
10
|
from moat.util import time as mtime
|
|
11
11
|
from moat.lib.path import P, Path
|
|
12
12
|
from moat.lib.run import AliasedGroup, attr_args
|
|
@@ -53,10 +53,14 @@ async def cache(obj) -> None:
|
|
|
53
53
|
from ._impl import ErrorMon # noqa: PLC0415
|
|
54
54
|
|
|
55
55
|
mon = ErrorMon(obj.cfg.link.error.monitor)
|
|
56
|
-
async with
|
|
57
|
-
obj
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
async with (
|
|
57
|
+
as_service(attrdict(debug=getattr(obj, "debug", 0))) as srv,
|
|
58
|
+
announcing(obj.conn, host=False, name=P("error.monitor"), service=mon) as ann,
|
|
59
|
+
anyio.create_task_group() as tg,
|
|
60
|
+
):
|
|
61
|
+
await tg.start(mon.run, obj.conn)
|
|
62
|
+
ann.set()
|
|
63
|
+
srv.set()
|
|
60
64
|
|
|
61
65
|
|
|
62
66
|
async def _traces(link: Link, path: Path) -> dict[str, Any] | None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: moat-link-error
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Error trace monitor for MoaT-Link
|
|
5
5
|
Author-email: Matthias Urlichs <matthias@urlichs.de>
|
|
6
6
|
Project-URL: homepage, https://m-o-a-t.org
|
|
@@ -45,9 +45,11 @@ errors that don't recur.
|
|
|
45
45
|
|
|
46
46
|
## Usage
|
|
47
47
|
|
|
48
|
-
Run `moat link error : cache`
|
|
49
|
-
does that
|
|
50
|
-
|
|
48
|
+
Run `moat link error : cache` on one host. The `moat-link-error-monitor`
|
|
49
|
+
systemd unit does that; enable it manually (`systemctl enable --now
|
|
50
|
+
moat-link-error-monitor`) — it is not started automatically on install.
|
|
51
|
+
Then `moat link error PATH get` adds the stored traces to the error's
|
|
52
|
+
record, as `trace.first` and `trace.last`.
|
|
51
53
|
|
|
52
54
|
How long traces are kept is configured with `link.error.monitor.max_age`.
|
|
53
55
|
See `docs/moat-link/errors.md` for details.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
moat-link-error (0.0.2-1) unstable; urgency=medium
|
|
2
|
-
|
|
3
|
-
* New release for 26.5.28
|
|
4
|
-
|
|
5
|
-
-- Matthias Urlichs <matthias@urlichs.de> Fri, 30 Oct 2026 20:26:45 +0100
|
|
6
|
-
|
|
7
|
-
moat-link-error (0.0.1-1) unstable; urgency=medium
|
|
8
|
-
|
|
9
|
-
* Initial release
|
|
10
|
-
|
|
11
|
-
-- Matthias Urlichs <matthias@urlichs.de> Sun, 25 Oct 2026 12:00:00 +0200
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moat_link_error-0.0.2 → moat_link_error-0.1.2}/src/moat_link_error.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|