@astrofoundry/pi-astro 0.40.19 → 0.40.20
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.
package/package.json
CHANGED
package/skills/dns/SKILL.md
CHANGED
|
@@ -28,6 +28,7 @@ The internal resolvers form one Technitium cluster, `dns.home.arpa`: the Primary
|
|
|
28
28
|
| `cluster-delete` (primary) | remove the cluster from the primary; refused while Secondary nodes exist |
|
|
29
29
|
| `cluster-remove <secondaryNodeId>` (primary) | ask a Secondary node (id from `cluster-state`) to leave |
|
|
30
30
|
| `server-domain <name>` (primary or node) | set that node's DNS Server Domain |
|
|
31
|
+
| `zone-resync <zone>` (primary or node) | re-fetch a Secondary or catalog zone; on a node's cluster catalog it recreates missing member zones |
|
|
31
32
|
| `stale-zone-delete <zone>` (node only) | delete a Secondary zone no catalog manages (checked first), so the cluster catalog recreates it |
|
|
32
33
|
|
|
33
34
|
Record parameters by type (the API's names): `A`/`AAAA` `ipAddress` (update: `newIpAddress`); `CNAME` `cname`; `TXT` `text`; `MX` `exchange`, `preference`; `SRV` `priority`, `weight`, `port`, `target`; `NS` `nameServer`; `PTR` `ptrName`. `ttl=<seconds>` and `comments=<text>` apply to all; `overwrite=true` replaces the record set on add.
|
package/specialists/dns/run.ts
CHANGED
|
@@ -58,6 +58,7 @@ export const TECHNITIUM_WRITES: Readonly<Record<string, { args: [number, number]
|
|
|
58
58
|
"cluster-delete": { args: [0, 0], help: "cluster-delete remove the cluster from the primary (only without Secondary nodes)" },
|
|
59
59
|
"cluster-remove": { args: [1, 1], help: "cluster-remove <secondaryNodeId> ask a Secondary node to leave the cluster" },
|
|
60
60
|
"server-domain": { args: [1, 1], help: "server-domain <name> DNS Server Domain of the target node (also with node)" },
|
|
61
|
+
"zone-resync": { args: [1, 1], help: "zone-resync <zone> re-fetch a Secondary or catalog zone from its primary (also with node)" },
|
|
61
62
|
"stale-zone-delete": { args: [1, 1], help: "stale-zone-delete <zone> (node only) delete a Secondary zone that no catalog manages, so the cluster catalog recreates it" },
|
|
62
63
|
};
|
|
63
64
|
|
|
@@ -169,6 +170,8 @@ export function technitiumRequest(catalog: string, args: string[]): TechnitiumRe
|
|
|
169
170
|
case "cluster-remove":
|
|
170
171
|
if (!NODE_ID.test(rest[0])) throw new UsageError("cluster-remove needs the numeric Secondary node id from cluster-state");
|
|
171
172
|
return { path: "/api/admin/cluster/primary/removeSecondary", params: { secondaryNodeId: rest[0] }, primaryOnly: true };
|
|
173
|
+
case "zone-resync":
|
|
174
|
+
return { path: "/api/zones/resync", params: { zone: assertName(rest[0], "zone") }, primaryOnly: false };
|
|
172
175
|
case "stale-zone-delete":
|
|
173
176
|
return { path: "/api/zones/delete", params: { zone: assertName(rest[0], "zone") }, primaryOnly: false };
|
|
174
177
|
case "server-domain":
|
|
@@ -195,6 +195,7 @@ describe("dns wrapper", () => {
|
|
|
195
195
|
primaryOnly: true,
|
|
196
196
|
});
|
|
197
197
|
expect(technitiumRequest("c", ["cluster-delete"]).params).toEqual({ forceDelete: "false" });
|
|
198
|
+
expect(technitiumRequest("c", ["zone-resync", "cluster-catalog.dns.home.arpa"]).path).toBe("/api/zones/resync");
|
|
198
199
|
expect(technitiumRequest("c", ["stale-zone-delete", "pdf.37pla.net"])).toEqual({ path: "/api/zones/delete", params: { zone: "pdf.37pla.net" }, primaryOnly: false });
|
|
199
200
|
expect(technitiumRequest("cluster-catalog.dns.home.arpa", ["zone-catalog", "pdf.37pla.net"])).toEqual({
|
|
200
201
|
path: "/api/zones/options/set",
|