Files
rust-discovery/docs/server-time-source-chrony-generation-bootstrap.md
T
2026-11-15 11:51:11 +01:00

162 lines
10 KiB
Markdown

# Proposed one-time Chrony generation change
Status: source-only preparation, not approved or executed. A separate explicit
user approval is required before the target restart. This is server bootstrap,
not an RMM job approval. No existing failed source acceptance becomes a PASS.
The named-client source remains the intended transport. The rejected abstract
candidate is retained only in its private freeze: Chrony 4.8/4.9 reconstructs
reply paths with strlen and loses an abstract sender's random name. The loaded
AppArmor policy is already byte-bound to the newly compiled policy; the apparent
file-query denial was libapparmor's last-byte truncation and disappears with the
corrected query length. Upstream Linux 7.0's datagram peer check instead uses the
command socket's stored label directly, with no newest-generation resolution.
A new daemon/socket generation is the proposed remedy for that remaining
source-supported stale-label cause. No additional capability or AppArmor rule
change is proposed.
The finite operation is:
1. Read and bind the original 5b source/build/public-pin records, actual complete
daemon PID/birth/image/cgroup/socket holder, boot, builder, application runtime,
AppArmor main/local bytes and currently enforcing policy. Hold all three old
Chrony pidfds. Require no broker unit/binary, time signer seed or public time
key, and retain those absence conditions throughout.
2. Bind the exact loaded service definition and every actually included Chrony
configuration file. Read only bounded public configuration projections and
hashes, never private key contents. Require a normal leap state and small
measured tracking offset before the restart. Existing makestep,
initstepslew, leap/clock-control and command-socket options must be reviewed
explicitly; this operation changes none of them. A pre-restart small offset
alone does not prove a restart cannot trigger an existing step policy.
3. Create a new private generation case and intent before effects. Save the exact
old root:root 0600 single-link public pin bytes and metadata and fsync the
backup. Save a separate restart intent and invoke only
`/usr/bin/systemctl restart -- chrony.service` once, with a bounded transport
and owned-process watchdog. Do not retry after an error or lost reply.
4. Read the new actual complete daemon/socket binding. All old processes must be
dead; the new invocation, births and command-socket kernel inode must differ.
Daemon/wrapper executable bytes, UID/GID, unit/configuration bytes, boot,
builder and application runtime must remain equal. Require the original
AppArmor rules and enforce mode on the new daemon. Run only bounded tracking
and modes=0 kernel queries for at most a 25-second reacquisition budget. Each
round rechecks the same new PID/birth/socket, boot, configuration, namespace
and unchanged old pin before and after reading. Fixed create-only
`readiness-01.json` through `readiness-25.json` retain negative observations;
only actual normal tracking at an absolute offset of at most 5 ms and the
original kernel bounds permit the pin CAS. Command timeouts use the remaining
budget. These observations never restart/resync Chrony or qualify a native
source sample. Deadline or transport/guard failure leaves the old pin and
requires original readback, with no repeat of effects.
5. Derive the new six-field public pin solely from that actual binding. Before
changing the pin, recheck all guards and compare both original pin bytes and
full metadata. Write a fixed own create-only temporary root:root 0600
single-link file, fsync it, then atomically replace the pin and fsync the held
protected directory. Save CAS intent before replace and read back the exact
new bytes/metadata. Old pin bytes remain in the new case. The old pin is
exactly 194 bytes, as verified by Root read receipt
`d1bf11677e5d85c411e25d4c37f9dd9f910177a111f19fb1329e5b28151a518e`;
the new canonical length can differ with PID/birth digit
counts and must be bounded rather than padded.
6. Preserve before/after evidence and a result explicitly stating no native
quality sample, signer, signature, broker or RMM job. Subsequent qualification
must use a new case and the new actual generation. Original 5b GROUP/DAC/peer
failures and their old pin remain unchanged historical records.
`host-read` must only read the new original case and bounded target metadata. It
must not repeat restart, pin CAS, tracking command, native probe or configuration
write. A failure after restart can leave a running new Chrony generation and the
old pin; this is a closed/unknown state, not authority to restore the old pin,
restart again, adopt a new case or bypass a quality gate. There is no automatic
rollback, OS update, reboot, resync, makestep command, service enablement, broker
installation or key generation.
The source binds Root's actual configuration/service proof
`7d5c7566a054ce353733155fbc2b98ef2a4d3f6d758bb85bd0e3ffd31bdeb22e`:
five exact public file hashes, the three closed include directories, loaded
service properties and a held protected starter script. Existing `makestep 1 3`
can step the clock during normal startup synchronization. It remains unchanged
and is explicitly part of the operation requiring user approval. There is no
approved or executed target restart from this source preparation alone.
Root's additional read-only include proof
`ee557a17e7188dcf2211cde5df575ad3c101a6412f564eb53dc385a77262c22d`
fixes the actual closed sets: `conf.d` contains exactly `README` and
`ubuntu-nts.conf`; `sources.d` contains exactly `README` and
`ubuntu-ntp-pools.sources`. Each README is an ignored package document checked
only for protected regular-file metadata. The five configuration hashes remain
mandatory. `/run/chrony-dhcp` is absent. A held protected `/run` parent and
nofollow leaf lookup prove its absence before/after and during readiness; this
operation creates or adopts no DHCP directory. Any extra entry, symlink README
or appearing DHCP object denies the operation.
Loaded command lists are read through five fixed native D-Bus properties,
using the ABI proven in Root receipt
`6ca943b071bb85c8c3f84ace00135e97acea48c6b0e0fcce3550b253aa67b092`.
All four `ExecStartPre`, `ExecStartPost`, `ExecStop` and `ExecStopPost` properties
must be typed `a(sasbttttuii)` with an actually empty array. The operation never
infers an empty list from omitted `systemctl show` output. `ExecStartEx` must
contain exactly the fixed starter path, `-n`, literal `$DAEMON_OPTS` and the
`no-setuid` flag corresponding to the existing unit's `!` prefix. Its typed
runtime timestamp/PID/status fields are validated and excluded from static
configuration equality; the actual process generation has its independent full
binding. The starter's SHA256 is fixed to
`48ae26b9a01b359ac6a743c074265e4b19a3ed99bbc4c46953850c75edde8e1c`.
The controller does not execute the starter or source `/etc/default/chrony`.
Only the unchanged systemd service definition executes that existing wrapper.
Own guard failures may expose a bounded fixed tag matching `[a-z0-9_]+`.
Unexpected exceptions expose only `unexpected_generation_exception`, without
free exception text, paths or configuration contents.
## Tatsächlich lesender finaler Preflight bestanden
Am2026-11-15 lief ausschließlich `host-preflight` des unabhängig geprüften
Controllersd5d56b38 auf dem permanenten Server erfolgreich. Rootcallb7c05714,
Receipt `f89876d7f61b8c195ed65c8b935f88dac9eb0a4b6fd4d742f1c65b4c6f723a74`.
Aktuelle ursprüngliche Generation, Konfiguration, typisierte Unitkommandos,
Namespace, Altpin194Bytes/203f und Brokerabwesenheit sind geprüft. Tracking
meldet Stratum3/LeapNormal und0.122816ms absoluten Offset; modes0-Kernelquery
meldet state0/status0/maxerror13.957ms. Das ist kein gemeinsamer
NativeTimeSource-Qualitätsnachweis und keine Freigabe des Restarts.
Frühere ausschließlich lesende Preflights verweigerten an zu enger
Include-Verzeichnisannahme bzw. ausgelassenen leeren systemctl-Kommandolisten.
Die tatsächlichen README-/DHCP-Abwesenheits- und D-Bus-Belege führten zu den
engen oben dokumentierten Quellenkorrekturen; kein früherer Misserfolg wird
umgeschrieben. Keine Restartphase angelegt, kein Service gestoppt oder
Publicpin ersetzt. `host-restart` wartet weiterhin auf ausdrückliche
Userfreigabe des konkreten Plans samt möglichem normalen Start-Sync-Effekt.
## Freigegebener Restart und öffentlicher Pinwechsel tatsächlich bestanden
Der User genehmigte ausdrücklich „Ja, einmaliger Zeitdienstneustart mit
Pinprüfung“. Danach genau ein `host-restart`, Originalfall
`c9a94f94-eecd-4c66-933d-c45c1a79c7a8`, tatsächlicher Exit0/abgeschlossen.
Rootreceipt
`1173ef78f9ca704afafbf4dbe92e8c654ec47d53f4e9f05fd99be2685991ce59`.
Vorhandene Konfiguration, tatsächliche Images, Boot und RMM-Runtime erhalten;
neue Chrony-Prozess-/Socketgeneration unabhängig geprüft und nach tatsächlicher
Readiness atomar gepinnt. Keine Konfiguration, Pakete oder RMM-Dienste geändert.
Neuer öffentlicher Pin:195Bytes, Root:Root0600/Singlelink, SHA256
`395f170aabf9fd01c24cd7d7939a313befdd147e98343ccd383bca861cbf2c4e`.
Alte194Bytes/203f und Metadaten bleiben im neuen Fall archiviert. Keine
Behauptung unveränderter Publicpin-Inode: dieser Wechsel ist ausdrücklich
genehmigt und als eigene CAS-Operation belegt. Die übrigen Identitäten bleiben
erhalten.
Separater ausschließlich lesender Rückabruf df1fe7b1, Receipt
`58970ef8e89af86b68fdbbf2cb5119210bcb37cec603feb23b4f6030b0b36623`,
bestätigt ursprüngliches Result
`d648daadc43de90cda977ce60615b8e47072b785aa9fbfaea37ef8b58be6c9d4`,
neuen Pin und Erhaltungsflags. Keine Wiederholung des Restarts.
`source_quality_qualified=false`: noch kein gemeinsamer NativeTimeSource-
Sample, Signer, Zeitkey, Broker oder Windows-Clockgate. Die historischen
5b-/GROUP-/DAC-/Peerfehler und ihre alte Generation bleiben erhalten. Ihr
altes `Original.fresh()` darf nach diesem absichtlichen Generationswechsel
nicht als aktuelle Authority verwendet oder durch erwartete-Werte-Tausch
„repariert“ werden. Neue reale Qualitätsprobe benötigt einen gesonderten
Originalbuild-/neue-Generationsnachweis.