manta-node 0.6b5.dev768__py3-none-any.whl → 0.6b5.dev771__py3-none-any.whl
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.
- manta_node/cli/_version_generated.py +2 -2
- manta_node/infrastructure/mqtt/command_handler.py +11 -9
- manta_node/update_path.py +24 -12
- {manta_node-0.6b5.dev768.dist-info → manta_node-0.6b5.dev771.dist-info}/METADATA +2 -2
- {manta_node-0.6b5.dev768.dist-info → manta_node-0.6b5.dev771.dist-info}/RECORD +9 -9
- {manta_node-0.6b5.dev768.dist-info → manta_node-0.6b5.dev771.dist-info}/WHEEL +0 -0
- {manta_node-0.6b5.dev768.dist-info → manta_node-0.6b5.dev771.dist-info}/entry_points.txt +0 -0
- {manta_node-0.6b5.dev768.dist-info → manta_node-0.6b5.dev771.dist-info}/licenses/LICENSE +0 -0
- {manta_node-0.6b5.dev768.dist-info → manta_node-0.6b5.dev771.dist-info}/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ This file is auto-generated at build time by scripts/generate_version.py.
|
|
|
4
4
|
Do not edit manually.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
__version__ = "2026.10.07.
|
|
7
|
+
__version__ = "2026.10.07.a0655f05"
|
|
8
8
|
__build_date__ = "2026.10.07"
|
|
9
|
-
__commit_id__ = "
|
|
9
|
+
__commit_id__ = "a0655f05"
|
|
10
10
|
__package_version__ = "0.6b5" # release-series base, moved by scripts/bump_version.py
|
|
@@ -42,7 +42,7 @@ from ...seam import (
|
|
|
42
42
|
)
|
|
43
43
|
from ...task_manager import LOG_FLUSH_INTERVAL, LogStream, TaskManager
|
|
44
44
|
from ...tasks import TaskProgression
|
|
45
|
-
from ...update_path import
|
|
45
|
+
from ...update_path import is_platform, refusal_reason
|
|
46
46
|
from ..filesystem.dataset_manager import DatasetManager
|
|
47
47
|
from ..grpc.client import NodeClient
|
|
48
48
|
from ..metrics.collector import Collector
|
|
@@ -755,20 +755,22 @@ class CommandHandler(Collector, MqttBase):
|
|
|
755
755
|
equality and staleness. With no supervisor the relay is inert, and the
|
|
756
756
|
node reports that rather than applying anything itself.
|
|
757
757
|
|
|
758
|
-
A
|
|
759
|
-
reports the refusal, so the platform's
|
|
760
|
-
command reaches
|
|
758
|
+
A node whose own update path is not ``platform`` refuses the command
|
|
759
|
+
before relaying (ADR-0042 D5) and reports the refusal, so the platform's
|
|
760
|
+
one-path rule holds even if a command reaches a host- or fleet-updated
|
|
761
|
+
node, or one whose path is unknown.
|
|
761
762
|
"""
|
|
762
763
|
request = self._parse_update(payload)
|
|
763
|
-
# One update path per node (ADR-0042 D5).
|
|
764
|
-
#
|
|
765
|
-
# anyway, refuse it here and report the refusal rather
|
|
766
|
-
|
|
764
|
+
# One update path per node (ADR-0042 D5). Only a platform-path node takes
|
|
765
|
+
# a platform command; the platform fails closed on every other path, and
|
|
766
|
+
# if one arrives anyway, refuse it here and report the refusal rather
|
|
767
|
+
# than applying it.
|
|
768
|
+
if not is_platform():
|
|
767
769
|
await self.publish_update_status(
|
|
768
770
|
SwitchOutcome(
|
|
769
771
|
request_id=request.request_id,
|
|
770
772
|
state=SeamState.REFUSED,
|
|
771
|
-
reason=
|
|
773
|
+
reason=refusal_reason(),
|
|
772
774
|
)
|
|
773
775
|
)
|
|
774
776
|
return
|
manta_node/update_path.py
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
"""Which mechanism updates this node — platform or
|
|
1
|
+
"""Which mechanism updates this node — platform, host, or fleet (§6.5, #113 Q4.4).
|
|
2
2
|
|
|
3
3
|
A node is updated by exactly one path (ADR-0042 D5). The path is **set at
|
|
4
4
|
install** by provisioning (manta-deploy#1220) as the environment variable
|
|
5
5
|
``MANTA_NODE_UPDATE_PATH``; the node reports it at registration so the platform
|
|
6
|
-
can apply the one-path rule, and refuses a platform command
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
can apply the one-path rule, and refuses a platform command unless its own path
|
|
7
|
+
is ``platform``.
|
|
8
|
+
|
|
9
|
+
- ``platform`` — boundary B: the Manager updates it.
|
|
10
|
+
- ``host`` — boundary D: the host owns the code.
|
|
11
|
+
- ``fleet`` — the ADR-0035 fleet path (CI over SSH); retires with it.
|
|
12
|
+
- unknown (unset, empty, or unrecognised) — UNSPECIFIED. The platform fails
|
|
13
|
+
closed and never sends an update, and the node refuses one that arrives.
|
|
12
14
|
"""
|
|
13
15
|
|
|
14
16
|
from __future__ import annotations
|
|
@@ -19,14 +21,24 @@ UPDATE_PATH_ENV = "MANTA_NODE_UPDATE_PATH"
|
|
|
19
21
|
|
|
20
22
|
PLATFORM = "platform"
|
|
21
23
|
HOST = "host"
|
|
24
|
+
FLEET = "fleet"
|
|
22
25
|
|
|
23
26
|
|
|
24
27
|
def update_path() -> str:
|
|
25
|
-
"""The node's update path
|
|
28
|
+
"""The node's update path, or ``""`` when it is unknown."""
|
|
26
29
|
value = os.environ.get(UPDATE_PATH_ENV, "").strip().lower()
|
|
27
|
-
return value if value in (PLATFORM, HOST) else ""
|
|
30
|
+
return value if value in (PLATFORM, HOST, FLEET) else ""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def is_platform() -> bool:
|
|
34
|
+
"""True when the platform updates this node — the only path that accepts a
|
|
35
|
+
platform command (mechanism §6.5 answer 4a)."""
|
|
36
|
+
return update_path() == PLATFORM
|
|
28
37
|
|
|
29
38
|
|
|
30
|
-
def
|
|
31
|
-
"""
|
|
32
|
-
|
|
39
|
+
def refusal_reason() -> str:
|
|
40
|
+
"""Why the platform must not update this node, given its path."""
|
|
41
|
+
label = {HOST: "host-updated", FLEET: "fleet-updated"}.get(update_path())
|
|
42
|
+
if label is not None:
|
|
43
|
+
return f"this node is {label}; the platform does not update it"
|
|
44
|
+
return "this node's update path is unknown; the platform does not update it"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: manta_node
|
|
3
|
-
Version: 0.6b5.
|
|
3
|
+
Version: 0.6b5.dev771
|
|
4
4
|
Summary: Node side software of the Manta platform. It is responsible for the communication with the Manta Core and the execution of the tasks.
|
|
5
5
|
Author-email: Hugo Miralles <hugo.miralles@manta-tech.io>, Matthew Thompson <matthew.thompson@manta-tech.io>
|
|
6
6
|
License-Expression: AGPL-3.0-or-later
|
|
@@ -28,7 +28,7 @@ Requires-Dist: pyyaml
|
|
|
28
28
|
Requires-Dist: psutil
|
|
29
29
|
Requires-Dist: msgpack
|
|
30
30
|
Requires-Dist: aiomqtt<3.0,>=2.5.1
|
|
31
|
-
Requires-Dist: manta-common-core==0.6b5.
|
|
31
|
+
Requires-Dist: manta-common-core==0.6b5.dev769
|
|
32
32
|
Requires-Dist: toml
|
|
33
33
|
Requires-Dist: tomli; python_version < "3.11"
|
|
34
34
|
Requires-Dist: tomli-w
|
|
@@ -4,10 +4,10 @@ manta_node/node_orchestrator.py,sha256=HHwVYQq6gtHd-Cr1Kl_DZEiYQOtgmLwJfh6psYujm
|
|
|
4
4
|
manta_node/seam.py,sha256=nGLjNVlSrnRJPdrp7L8piyJai1bQveiqT5JDBWeFeGI,6501
|
|
5
5
|
manta_node/task_manager.py,sha256=xRE-yKdUW0FFR8vtX1jDwl1AxTbqVD_JS7QVR62GA00,38002
|
|
6
6
|
manta_node/tasks.py,sha256=o837Hi-KFVJg9LF5iOtE8oD6UuTOfrEPWR-JOdhRGeY,6983
|
|
7
|
-
manta_node/update_path.py,sha256=
|
|
7
|
+
manta_node/update_path.py,sha256=6N_bN9z8MqnyWWfGTe1-aJFijf2tSy_IvO6VHvNSQVU,1667
|
|
8
8
|
manta_node/utils.py,sha256=Hw4Iw2jYQYsfVLVJuBMt-_rMFBeml3nCDE2jiiXc8YM,1155
|
|
9
9
|
manta_node/cli/__init__.py,sha256=arzO3mXDJ-E2yeeytbZfN7mCswwxdQ43_QjyeL2E5yE,134
|
|
10
|
-
manta_node/cli/_version_generated.py,sha256=
|
|
10
|
+
manta_node/cli/_version_generated.py,sha256=1L59ew2XMf-hqwylvtzea9LrjNYqKfYDJGvZ9J3haAk,332
|
|
11
11
|
manta_node/cli/config_manager.py,sha256=BCju9zqzraviL3KrzRnB-vZQUY__Q5kuEqb7EdB8YdI,4409
|
|
12
12
|
manta_node/cli/main.py,sha256=dZa6zrypWBvpN8hd4qpxevvlyNFhxKINCg1537NJ36w,4318
|
|
13
13
|
manta_node/cli/version.py,sha256=L4lNTz-Uw_ejumy1tXJcJhcjhb-5FRcRQ6ogZM5N1Xo,5136
|
|
@@ -42,7 +42,7 @@ manta_node/infrastructure/metrics/__init__.py,sha256=ODGAj9s63F5jba2c3dQRMfNK6I4
|
|
|
42
42
|
manta_node/infrastructure/metrics/collector.py,sha256=9ESw__Pc2tV6ldG5yhos2IS7T5Td59KxTIwDRZc_G4w,3067
|
|
43
43
|
manta_node/infrastructure/metrics/metrics_collector.py,sha256=osIYrNzU3g9WCAxVQ14isM9YEQ3eJ7F3QgKBbpgeMJs,13077
|
|
44
44
|
manta_node/infrastructure/mqtt/__init__.py,sha256=riXo1sXgO4YV6DHCmWRqK61BAmuGLdHiVdQFunAJadA,140
|
|
45
|
-
manta_node/infrastructure/mqtt/command_handler.py,sha256=
|
|
45
|
+
manta_node/infrastructure/mqtt/command_handler.py,sha256=GDKlQGq9IL7HKkQTWCML7K2i75W5b7wdo5pEDYUYuzQ,35862
|
|
46
46
|
manta_node/infrastructure/network/__init__.py,sha256=On3XLgycFQoc-fBCa5hFuFDfEJjmFy7Wl2CK3D2LkdI,478
|
|
47
47
|
manta_node/infrastructure/network/event_registry.py,sha256=iWEfUJRzDnWjOrDinpYqVyIUpGKJjp7RZkjMDPfpplM,1661
|
|
48
48
|
manta_node/infrastructure/network/factory.py,sha256=-LvHbBp5nBpQ7fyQT1T0pvK3aczZqWc9QNDW37brBeU,3897
|
|
@@ -63,9 +63,9 @@ manta_node/supervisor/records.py,sha256=fUlL1SfmWpGnCbJ9956cuy0H3a7-aEF-B-naqbJi
|
|
|
63
63
|
manta_node/supervisor/seam.py,sha256=4kczRku5Ctn4xRvXS-pyzaDFau7LnX5bYOn6IRNKRyE,9665
|
|
64
64
|
manta_node/supervisor/sequence.py,sha256=eYu7rrk1ecc4Y2jQhhJ7CopPz3m0lOsFLJj5lT2PwBw,1685
|
|
65
65
|
manta_node/supervisor/switch.py,sha256=Mxr2XcZVOMN6g-M4lUBRlE7d8Z8JEtt6k7nEaS3zHpE,21958
|
|
66
|
-
manta_node-0.6b5.
|
|
67
|
-
manta_node-0.6b5.
|
|
68
|
-
manta_node-0.6b5.
|
|
69
|
-
manta_node-0.6b5.
|
|
70
|
-
manta_node-0.6b5.
|
|
71
|
-
manta_node-0.6b5.
|
|
66
|
+
manta_node-0.6b5.dev771.dist-info/licenses/LICENSE,sha256=9mBgLhiB9goQPQjg9XQJ6FjgVxYw9Q8lyOZYkPGwF_c,34484
|
|
67
|
+
manta_node-0.6b5.dev771.dist-info/METADATA,sha256=-y1vYhJTIXSPBVHTOdK9xfcZW1vWwntTc9RXixYvcZk,4937
|
|
68
|
+
manta_node-0.6b5.dev771.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
69
|
+
manta_node-0.6b5.dev771.dist-info/entry_points.txt,sha256=uCwggRApalLEsYs1YxwTBN0-e9oMJAkMoBp01HaSdoY,110
|
|
70
|
+
manta_node-0.6b5.dev771.dist-info/top_level.txt,sha256=nbT5J5WETuXM9UPoQckl29uUOq8wMYdRb9QDx5kAFeo,11
|
|
71
|
+
manta_node-0.6b5.dev771.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|