Files
mesh-contracts/provisioning/seats/node-nfs-server/seat.json
T

100 lines
3.3 KiB
JSON

{
"format": 1,
"seat": "node-nfs-server",
"scope": "node",
"grain": "seat-list",
"decision": "novox/hq ADR 0263",
"verbs": [
{
"name": "exports",
"description": "Every share this machine exports: its name, its path, read-write or read-only, the owner every client is mapped to (uid and gid), each node it is exported to with that node's private address and access (only the nodes the server grants it to and that ask for it), what is granted and not asked for or asked for and not granted, and whether the kernel holds it now. Also the exports found that are not the mesh's: a dataset's sharenfs property, a line in /etc/exports.",
"replaces": [
"exportfs -v",
"cat /etc/exports",
"zfs get sharenfs"
],
"input": {
"properties": {},
"type": "object"
}
},
{
"name": "clients",
"description": "Which machines have mounted which share now, as the NFS server knows its clients.",
"replaces": [
"ss -tn sport = :2049",
"cat /proc/fs/nfsd/clients/*/info"
],
"input": {
"properties": {},
"type": "object"
}
},
{
"name": "test",
"description": "Whether this machine exports one share for the mesh now, and whether its NFS service is up; with an address, also whether the share is exported to that address: a node's own private address, when the server grants it the share and the node asks for it. What a machine mounting the share asks before it mounts.",
"replaces": [
"showmount -e"
],
"input": {
"properties": {
"address": {
"description": "a node's private address, to ask whether the share is exported to it (optional)",
"type": "string"
},
"share": {
"description": "the share, by its name",
"type": "string"
}
},
"required": [
"share"
],
"type": "object"
}
},
{
"name": "reload",
"description": "Have the kernel read this machine's export files again now (exportfs -ra) and answer the shares as it then holds them. The module's own process writes its export file; this is for after a change made outside it. Changes no shared path.",
"replaces": [
"exportfs -ra"
],
"input": {
"properties": {},
"type": "object"
}
},
{
"name": "adopt",
"description": "Take over an export a person made by hand: clear a dataset's sharenfs property for a path the mesh's own export now serves — only when that export is live. Without confirm, says what it would do and changes nothing.",
"replaces": [
"zfs set sharenfs=off"
],
"input": {
"properties": {
"confirm": {
"description": "\"true\": change it (needs why); anything else is a dry run",
"enum": [
"true",
"false"
],
"type": "string"
},
"path": {
"description": "the shared path whose hand-made export is taken over",
"type": "string"
},
"why": {
"description": "why, for the record",
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
}
}
]
}