You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
After a resume from hibernation spored carries its pre-hibernate state: no pre-stop hook on the next stop, no DNS name, and the idle timer already expired #987
Found while fixing #948/#952 (PRs #977, #969). Verified by reading pkg/agent/agent.go and the systemd units; not reproduced on an instance.
A stopped instance boots a fresh spored. A hibernated instance resumes the same process, with all its memory, and nothing in spored or its units handles the resume. There is no sleep.target or hibernate.target hook and no resume detection. So, after --hibernate-on-idle (or --on-complete hibernate) and a spawn start / spawn connect:
The DNS name is gone and comes back with the wrong IP.Cleanup deleted the record before hibernating. Nothing re-registers it until the hourly lease renewal, and that renewal uses a.identity.PublicIP cached from the first boot, but a resumed instance without an EIP has a new public IP.
Related: #945 (the compute clock counts the hibernated time).
Suggested fix: detect the resume, either with a systemd sleep.target / systemd-sleep post hook that signals spored, or by seeing a wall-clock jump much larger than the monotonic tick interval. On resume: reset preStopDone, taskFlushDone, lastActivityTime and idleWarned; re-read the identity from IMDS (the public IP); re-register DNS; and take fresh counter baselines. Restarting spored on resume (Restart from a sleep hook) would get all of that from the normal boot path.
Activity
Reset spored's per-boot state when the instance resumes from hibernat…
Read the pre-stop hook's log in either encoding, for the Windows runn…
Reset spored's per-boot state when the instance resumes from hibernat…
Read the pre-stop hook's log in either encoding, for the Windows runn…
Reset spored's per-boot state when the instance resumes from hibernat…
Read the pre-stop hook's log in either encoding, for the Windows runn…
Resume tests: a quiet machine has no active sessions on Windows either (
Reset spored's per-boot state when the instance resumes from hibernat…
Exclude hibernated time from compute: measure it on the kernel's mono…
Exclude hibernated time from compute: measure it on the kernel's mono…
Exclude hibernated time from compute: measure it on the kernel's mono…