| index f29ddfdb1..6cd51b0e2 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv |
| @@ -1,8 +1,9 @@ |
| # Census overlay member-backups-drill-nodb, written by census-propose (#369). census-ruling-member-backups-drill-nodb, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-member-backups-drill-nodb.md. |
| -# 1 body, 0 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 1 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| # 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| -@legacy 9e0ca25bb41e6d70bf22fcda828dce8e434878e957e866bafca02c22aff4745d internal/ops/ops.go hibernateRun.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill (carlos ops hibernate-verify, user carlos): the verb's body, moved out of runHibernateVerify so a test can run it whole. First of all it refuses root (Root, from os.Geteuid() == 0 in runHibernateVerify): one log line, exit 1, before any monitor file is read, the deployment store opened or the registry opened (census round 1 P1, ls284: self.json, which the carlos user writes, names the record a run replaces). Then, as before: boxself.ReadFresh of self.json (refuses to run without a fresh record), dbreads.ValidRegion(CARLOS_REGION), openDeployStore, registry.Open(RegPath) (its +file:Open, the same registry the old body opened, closed after HibernatingHosts), dbverify.Load of this box's own control/verify/<ref>.json, selectHosts (verify-assign.json on a group box), MkdirTemp under the unit's on-disk TMPDIR, the drill, and dbverify.Publish to control/verify/<ref>.json only. Final fix wave (still refusing root first): the self.json read is retried every 15 s for up to 5 minutes (SelfWait, the same boxself.ReadFresh), a fleet box's CARLOS_REGION fleet/<name> is accepted beside dbreads.ValidRegion, it calls clearCrashedScratch on its own TmpDir right after the root refusal and the hibernate-config check, before the self record and both empty-fleet returns (re-review item 9), and its publisher now writes through dbverify.PublishOver (the same Get-then-CAS Put of control/verify/<ref>.json, also parsing the record it reads to drop hosts a landing removed). No new read source.;rev3=census-ruling-member-backups-2a-landing;basis=R3 (#898): an empty CARLOS_REGION (a home-region box) is the home region and no longer refuses; the bracket matches records whose region is "" exactly. A malformed non-empty region still refuses (dbreads.ValidRegion, or a fleet/<name> placement). No read added or changed: the same refusals in the same order (root first, then self.json, then the region gate), the same stores. Package envelopes: internal/ops adds one read-only bounded ListPage (one key) of moves/<host>/ in the drill's own data bucket at each end of a host's bracket (R1), and the bracket compares the record's LastMove (R1b) and the record object's stamp (R1c: ETag, version id, last-modified) at open and close, all from the same record GET it already made (now provision.GetRecordStamped / GetSidecarRecordStamped); internal/provision adds those two read-only getters (decodeSidecarAt shared with GetSidecarRecord, no writer touched); internal/release adds GetStamped, S3Store.GetStamped and ObjectStamp; internal/lease adds VerifyReaderAt and a read-only litestream client (R2); internal/dbdoor adds PlanListed, the planner's listing as a list/open reader (R2). The drill runs as carlos and refuses root.;rev3=census-ruling-member-backups-drill-nodb;basis=the drill (user carlos). No read added or changed, same refusals in the same order (root first, then self.json, then the region gate). One new exit: when openDeployStore answers errNoDeployStore (neither CARLOS_DEPLOYMENT_BUCKET nor CARLOS_DEPLOYMENT_DIR set) and Fleet (CARLOS_FLEET trimmed, read once in runHibernateVerify) is non-empty, it prints one line and returns 0 before the registry is opened, publishing nothing. Any other store error, and a platform box with no store, still log NOT RUN and return 1. The publisher now takes RunResults and drops the hosts the run left out (no database) from the fleet before dbverify.Merge, so its writes to control/verify/<ref>.json and <data>/monitor/verify.json carry fewer hosts; the summary lines count them. file:Open@2885 03149210c2fbd9448d73d34bfb247726e7458696101a201937615264b6307f52 |
| -@legacy 78f8b28108a816547ade655f2f426c9247c902df1d8b847fcc25cd0a58bde573 internal/ops/hibernate_verify.go noDatabase legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-drill-nodb;basis=new, the drill (user carlos): os.Lstat of a hibernating route's DBPath from this box's own registry (the path HibernatingHosts already returns and freshness already reads through localFreshness), only its error is looked at, nothing is opened or followed (lstat does not follow a final symlink). Called once per host, only in drillOne's final restoreNothing case after the identity bracket and the move staging closed clean; not-exist leaves the host out of the record, anything else keeps unverified/nothing_replicated. file:Lstat@82 ec15b0796c9978e8d576d127593d64aa0fd757db39e8edc61732b25f6038b44d |
| -internal/ops/ops.go hibernateRun.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill (carlos ops hibernate-verify, user carlos): the verb's body, moved out of runHibernateVerify so a test can run it whole. First of all it refuses root (Root, from os.Geteuid() == 0 in runHibernateVerify): one log line, exit 1, before any monitor file is read, the deployment store opened or the registry opened (census round 1 P1, ls284: self.json, which the carlos user writes, names the record a run replaces). Then, as before: boxself.ReadFresh of self.json (refuses to run without a fresh record), dbreads.ValidRegion(CARLOS_REGION), openDeployStore, registry.Open(RegPath) (its +file:Open, the same registry the old body opened, closed after HibernatingHosts), dbverify.Load of this box's own control/verify/<ref>.json, selectHosts (verify-assign.json on a group box), MkdirTemp under the unit's on-disk TMPDIR, the drill, and dbverify.Publish to control/verify/<ref>.json only. Final fix wave (still refusing root first): the self.json read is retried every 15 s for up to 5 minutes (SelfWait, the same boxself.ReadFresh), a fleet box's CARLOS_REGION fleet/<name> is accepted beside dbreads.ValidRegion, it calls clearCrashedScratch on its own TmpDir right after the root refusal and the hibernate-config check, before the self record and both empty-fleet returns (re-review item 9), and its publisher now writes through dbverify.PublishOver (the same Get-then-CAS Put of control/verify/<ref>.json, also parsing the record it reads to drop hosts a landing removed). No new read source.;rev3=census-ruling-member-backups-2a-landing;basis=R3 (#898): an empty CARLOS_REGION (a home-region box) is the home region and no longer refuses; the bracket matches records whose region is "" exactly. A malformed non-empty region still refuses (dbreads.ValidRegion, or a fleet/<name> placement). No read added or changed: the same refusals in the same order (root first, then self.json, then the region gate), the same stores. Package envelopes: internal/ops adds one read-only bounded ListPage (one key) of moves/<host>/ in the drill's own data bucket at each end of a host's bracket (R1), and the bracket compares the record's LastMove (R1b) and the record object's stamp (R1c: ETag, version id, last-modified) at open and close, all from the same record GET it already made (now provision.GetRecordStamped / GetSidecarRecordStamped); internal/provision adds those two read-only getters (decodeSidecarAt shared with GetSidecarRecord, no writer touched); internal/release adds GetStamped, S3Store.GetStamped and ObjectStamp; internal/lease adds VerifyReaderAt and a read-only litestream client (R2); internal/dbdoor adds PlanListed, the planner's listing as a list/open reader (R2). The drill runs as carlos and refuses root.;rev3=census-ruling-member-backups-drill-nodb;basis=the drill (user carlos). No read added or changed, same refusals in the same order (root first, then self.json, then the region gate). One new exit: when openDeployStore answers errNoDeployStore (neither CARLOS_DEPLOYMENT_BUCKET nor CARLOS_DEPLOYMENT_DIR set) and Fleet (CARLOS_FLEET trimmed, read once in runHibernateVerify) is non-empty, it prints one line and returns 0 before the registry is opened, publishing nothing. Any other store error, and a platform box with no store, still log NOT RUN and return 1. The publisher now takes RunResults and drops the hosts the run left out (no database) from the fleet before dbverify.Merge, so its writes to control/verify/<ref>.json and <data>/monitor/verify.json carry fewer hosts; the summary lines count them. file:Open@2885 03149210c2fbd9448d73d34bfb247726e7458696101a201937615264b6307f52 |
| -internal/ops/hibernate_verify.go noDatabase legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-drill-nodb;basis=new, the drill (user carlos): os.Lstat of a hibernating route's DBPath from this box's own registry (the path HibernatingHosts already returns and freshness already reads through localFreshness), only its error is looked at, nothing is opened or followed (lstat does not follow a final symlink). Called once per host, only in drillOne's final restoreNothing case after the identity bracket and the move staging closed clean; not-exist leaves the host out of the record, anything else keeps unverified/nothing_replicated. file:Lstat@82 ec15b0796c9978e8d576d127593d64aa0fd757db39e8edc61732b25f6038b44d |
| -@coverage internal/ops d1844c5b266faef0de4e0aa453bedb00f2be91b40163da27688b1a4d1469cb1e |
| +@legacy 7563fb19b087f4171b5704e5f15e66e68df8c6f4e0459761cd2ba2ec4ce5c0ca internal/ops/ops.go hibernateRun.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill (carlos ops hibernate-verify, user carlos): the verb's body, moved out of runHibernateVerify so a test can run it whole. First of all it refuses root (Root, from os.Geteuid() == 0 in runHibernateVerify): one log line, exit 1, before any monitor file is read, the deployment store opened or the registry opened (census round 1 P1, ls284: self.json, which the carlos user writes, names the record a run replaces). Then, as before: boxself.ReadFresh of self.json (refuses to run without a fresh record), dbreads.ValidRegion(CARLOS_REGION), openDeployStore, registry.Open(RegPath) (its +file:Open, the same registry the old body opened, closed after HibernatingHosts), dbverify.Load of this box's own control/verify/<ref>.json, selectHosts (verify-assign.json on a group box), MkdirTemp under the unit's on-disk TMPDIR, the drill, and dbverify.Publish to control/verify/<ref>.json only. Final fix wave (still refusing root first): the self.json read is retried every 15 s for up to 5 minutes (SelfWait, the same boxself.ReadFresh), a fleet box's CARLOS_REGION fleet/<name> is accepted beside dbreads.ValidRegion, it calls clearCrashedScratch on its own TmpDir right after the root refusal and the hibernate-config check, before the self record and both empty-fleet returns (re-review item 9), and its publisher now writes through dbverify.PublishOver (the same Get-then-CAS Put of control/verify/<ref>.json, also parsing the record it reads to drop hosts a landing removed). No new read source.;rev3=census-ruling-member-backups-2a-landing;basis=R3 (#898): an empty CARLOS_REGION (a home-region box) is the home region and no longer refuses; the bracket matches records whose region is "" exactly. A malformed non-empty region still refuses (dbreads.ValidRegion, or a fleet/<name> placement). No read added or changed: the same refusals in the same order (root first, then self.json, then the region gate), the same stores. Package envelopes: internal/ops adds one read-only bounded ListPage (one key) of moves/<host>/ in the drill's own data bucket at each end of a host's bracket (R1), and the bracket compares the record's LastMove (R1b) and the record object's stamp (R1c: ETag, version id, last-modified) at open and close, all from the same record GET it already made (now provision.GetRecordStamped / GetSidecarRecordStamped); internal/provision adds those two read-only getters (decodeSidecarAt shared with GetSidecarRecord, no writer touched); internal/release adds GetStamped, S3Store.GetStamped and ObjectStamp; internal/lease adds VerifyReaderAt and a read-only litestream client (R2); internal/dbdoor adds PlanListed, the planner's listing as a list/open reader (R2). The drill runs as carlos and refuses root.;rev3=census-ruling-member-backups-drill-nodb;basis=the drill (user carlos). No read added or changed, same refusals in the same order (root first, then self.json, then the region gate). One new exit: when openDeployStore answers errNoDeployStore (neither CARLOS_DEPLOYMENT_BUCKET nor CARLOS_DEPLOYMENT_DIR set) and Fleet (CARLOS_FLEET trimmed, read once in runHibernateVerify) is non-empty, it prints one line and returns 0 before the registry is opened, publishing nothing. Any other store error, and a platform box with no store, still log NOT RUN and return 1. The record it already loaded (dbverify.Load of its own control/verify/<ref>.json) is also handed to the drill as Drill.Prior, read only to refuse a leave-out for an incarnation that once had data. The publisher now takes RunResults and merges with dbverify.MergeLeftOut: hosts the run left out (no database) go to the record's additive left_out field instead of hosts, written by the same PublishOver Put of control/verify/<ref>.json and the same local copy <data>/monitor/verify.json; the summary lines count them. file:Open@2885 b413ed7f541a1c39401d4479deb999e35ce1977051eaa06be6660d99adb7a688 |
| +@legacy eda29e15054dad56308472163a577413301cab4d12cf640768dc892458459f8a internal/ops/hibernate_verify.go noDatabase legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-drill-nodb;basis=new, the drill (user carlos): os.Lstat of a hibernating route's DBPath from this box's own registry (the path HibernatingHosts already returns and freshness already reads through localFreshness), only when the path is absolute (a relative or empty path answers false with no syscall); only its error is looked at, nothing is opened or followed (lstat does not follow a final symlink). Called once per host, only in drillOne's final restoreNothing case after the identity bracket and the move staging closed clean; not-exist leaves the host out of the record only if, for an HA route, this box holds the lease (the same lockState read freshness makes) and the prior record shows no data for the incarnation; anything else keeps unverified/nothing_replicated. file:Lstat@107 1a971e6818d7e0478444b0c2fc6904e7b772fa22cbe90c86a20d11f521ceeda1 |
| +internal/ops/ops.go hibernateRun.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill (carlos ops hibernate-verify, user carlos): the verb's body, moved out of runHibernateVerify so a test can run it whole. First of all it refuses root (Root, from os.Geteuid() == 0 in runHibernateVerify): one log line, exit 1, before any monitor file is read, the deployment store opened or the registry opened (census round 1 P1, ls284: self.json, which the carlos user writes, names the record a run replaces). Then, as before: boxself.ReadFresh of self.json (refuses to run without a fresh record), dbreads.ValidRegion(CARLOS_REGION), openDeployStore, registry.Open(RegPath) (its +file:Open, the same registry the old body opened, closed after HibernatingHosts), dbverify.Load of this box's own control/verify/<ref>.json, selectHosts (verify-assign.json on a group box), MkdirTemp under the unit's on-disk TMPDIR, the drill, and dbverify.Publish to control/verify/<ref>.json only. Final fix wave (still refusing root first): the self.json read is retried every 15 s for up to 5 minutes (SelfWait, the same boxself.ReadFresh), a fleet box's CARLOS_REGION fleet/<name> is accepted beside dbreads.ValidRegion, it calls clearCrashedScratch on its own TmpDir right after the root refusal and the hibernate-config check, before the self record and both empty-fleet returns (re-review item 9), and its publisher now writes through dbverify.PublishOver (the same Get-then-CAS Put of control/verify/<ref>.json, also parsing the record it reads to drop hosts a landing removed). No new read source.;rev3=census-ruling-member-backups-2a-landing;basis=R3 (#898): an empty CARLOS_REGION (a home-region box) is the home region and no longer refuses; the bracket matches records whose region is "" exactly. A malformed non-empty region still refuses (dbreads.ValidRegion, or a fleet/<name> placement). No read added or changed: the same refusals in the same order (root first, then self.json, then the region gate), the same stores. Package envelopes: internal/ops adds one read-only bounded ListPage (one key) of moves/<host>/ in the drill's own data bucket at each end of a host's bracket (R1), and the bracket compares the record's LastMove (R1b) and the record object's stamp (R1c: ETag, version id, last-modified) at open and close, all from the same record GET it already made (now provision.GetRecordStamped / GetSidecarRecordStamped); internal/provision adds those two read-only getters (decodeSidecarAt shared with GetSidecarRecord, no writer touched); internal/release adds GetStamped, S3Store.GetStamped and ObjectStamp; internal/lease adds VerifyReaderAt and a read-only litestream client (R2); internal/dbdoor adds PlanListed, the planner's listing as a list/open reader (R2). The drill runs as carlos and refuses root.;rev3=census-ruling-member-backups-drill-nodb;basis=the drill (user carlos). No read added or changed, same refusals in the same order (root first, then self.json, then the region gate). One new exit: when openDeployStore answers errNoDeployStore (neither CARLOS_DEPLOYMENT_BUCKET nor CARLOS_DEPLOYMENT_DIR set) and Fleet (CARLOS_FLEET trimmed, read once in runHibernateVerify) is non-empty, it prints one line and returns 0 before the registry is opened, publishing nothing. Any other store error, and a platform box with no store, still log NOT RUN and return 1. The record it already loaded (dbverify.Load of its own control/verify/<ref>.json) is also handed to the drill as Drill.Prior, read only to refuse a leave-out for an incarnation that once had data. The publisher now takes RunResults and merges with dbverify.MergeLeftOut: hosts the run left out (no database) go to the record's additive left_out field instead of hosts, written by the same PublishOver Put of control/verify/<ref>.json and the same local copy <data>/monitor/verify.json; the summary lines count them. file:Open@2885 b413ed7f541a1c39401d4479deb999e35ce1977051eaa06be6660d99adb7a688 |
| +internal/ops/hibernate_verify.go noDatabase legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-drill-nodb;basis=new, the drill (user carlos): os.Lstat of a hibernating route's DBPath from this box's own registry (the path HibernatingHosts already returns and freshness already reads through localFreshness), only when the path is absolute (a relative or empty path answers false with no syscall); only its error is looked at, nothing is opened or followed (lstat does not follow a final symlink). Called once per host, only in drillOne's final restoreNothing case after the identity bracket and the move staging closed clean; not-exist leaves the host out of the record only if, for an HA route, this box holds the lease (the same lockState read freshness makes) and the prior record shows no data for the incarnation; anything else keeps unverified/nothing_replicated. file:Lstat@107 1a971e6818d7e0478444b0c2fc6904e7b772fa22cbe90c86a20d11f521ceeda1 |
| +@coverage internal/dbverify 35634dfea8793484ea365d297ccfc4811c9dfe3db997603bcf6e37b0c1dd6c34 |
| +@coverage internal/ops 3e8cd3b2f4f713c2a4ae8ceba534e05df92bfd5ebcb9f1c6db27ebd085ebb80e |