Z4 zfs-manifest-bus: the events stream, states and ledger by template, the keeper as the module's one process bus account

The three root processes declare no bus and reach the keeper's socket; the module invokes the service manager's start. The judge refuses the keeper's bus emits and state until the validator accepts what the module asks for in requires (A-38).

Builds: design 42 zfs-owns-zfs §25, §26, §27, §28, A-6, A-19, A-36, A-37, A-38
This commit is contained in:
2026-11-13 01:05:19 +01:00
parent ec27f12524
commit 8927d68900
2 changed files with 247 additions and 7 deletions
+164 -5
View File
@@ -5,9 +5,103 @@
"package-manager",
"service-manager"
],
"emits": [
"snapshot.taken",
"scrub.requested"
"invokes": [
"seat:node-service-manager.start"
],
"own-secrets": {
"broker-keeper": {
"path": "${dir:keeper-state}/broker-keeper.secret",
"owner": "zfs-keeper"
}
},
"requires": [
{
"name": "events",
"storage": "stream",
"template": "events",
"options": {
"events": [
"config.applied",
"config.refused",
"config.waiting",
"snapshot.taken.person",
"snapshot.taken.schedule",
"snapshot.removed.person",
"snapshot.removed.schedule",
"snapshot.skipped.person",
"snapshot.skipped.schedule",
"run.skipped",
"scrub.requested"
],
"max-age-days": 30,
"max-mib": 16
}
},
{
"name": "applied",
"storage": "key-value",
"template": "state"
},
{
"name": "schedule",
"storage": "key-value",
"template": "state"
},
{
"name": "findings",
"storage": "key-value",
"template": "state"
},
{
"name": "snapshots",
"storage": "ledger",
"template": "ledger",
"options": {
"max-mib": 64
},
"types": [
{
"name": "snapshot",
"schema": {
"dataset": {
"type": "string"
},
"name": {
"type": "string"
},
"kind": {
"type": "string"
},
"at": {
"type": "string"
},
"taken": {
"type": "object"
}
},
"operations": [
{
"name": "taken",
"effect": "set-entry",
"into": "taken",
"key": "name",
"fields": [
"dataset",
"name",
"kind",
"at"
]
},
{
"name": "removed",
"effect": "remove",
"into": "taken",
"key": "name"
}
]
}
]
}
],
"config": {
"pool": {
@@ -260,6 +354,20 @@
"mode": "0755",
"unknown": "program"
},
{
"id": "keeper-account",
"type": "user",
"name": "zfs-keeper",
"shell": "/usr/bin/nologin"
},
{
"id": "keeper-state",
"type": "directory",
"mode": "0711",
"owner": "zfs-keeper",
"place": "mesh",
"unknown": "program"
},
{
"id": "config-dir",
"type": "directory",
@@ -432,6 +540,48 @@
"zed=off"
]
},
{
"id": "keeper",
"type": "process",
"name": "zfs-keeper",
"artifact": "tools",
"run": [
"./zfs-tools",
"keeper"
],
"user": "zfs-keeper",
"env": {
"MESH_BROKER_FILE": "${dir:keeper-state}/broker-keeper.secret",
"ZFS_KEEPER_SOCKET": "${dir:keeper-state}/keeper.sock"
},
"bus": {
"state": [
"applied",
"schedule",
"findings"
],
"emits": [
"config.applied",
"config.refused",
"config.waiting",
"snapshot.taken.person",
"snapshot.taken.schedule",
"snapshot.removed.person",
"snapshot.removed.schedule",
"snapshot.skipped.person",
"snapshot.skipped.schedule",
"run.skipped"
],
"invokes": [
"zfs.zfs_snapshots_record",
"zfs.zfs_snapshots_schedule",
"seat:node-service-manager.start"
]
},
"health": {
"kind": "unit"
}
},
{
"id": "apply",
"type": "process",
@@ -444,7 +594,10 @@
"run-once": true,
"restart-on": [
"config"
]
],
"env": {
"ZFS_KEEPER_SOCKET": "${dir:keeper-state}/keeper.sock"
}
},
{
"id": "watch",
@@ -476,6 +629,9 @@
],
"health": {
"kind": "unit"
},
"env": {
"ZFS_KEEPER_SOCKET": "${dir:keeper-state}/keeper.sock"
}
},
{
@@ -487,7 +643,10 @@
"./zfs-tools",
"run"
],
"schedule": "0,15,30,45 * * * *"
"schedule": "0,15,30,45 * * * *",
"env": {
"ZFS_KEEPER_SOCKET": "${dir:keeper-state}/keeper.sock"
}
},
{
"id": "distribution-weekly",