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
fix: confirm a release only once its boot has finished
running/1 asked only whether the version was the current or permanent
release, and that can be true of a node that is still booting. After a
restart_emulator reboot, release_handler's transform_release/3 makes the
target current while sasl starts, and distribution has been answering
since kernel came up - so a poll landing in that window was confirmed,
install exited 0, and an application started after sasl could still fail
the boot and take the system back to the release that was permanent.
Automation that commits after a successful install would then have made
a version that cannot boot the permanent one.
So the boot has to have finished as well. That is init:get_status/0's
*provided* status being :started, and only that element is usable: the
internal one stays :starting while the boot process lives, which is the
whole life of a release started by its boot script, so a booted node
reports {:starting, :started} and waiting for {:started, _} would wait
for ever. Checked against a running VM, and against init.erl:687-700,
where each {progress, Info} instruction sets the provided status.
:started is the last of those instructions in every boot script Mix
generates, after the one that starts the release's applications - and
systools_make:add_apply_upgrade/2 splices
release_handler:new_emulator_upgrade/2 in just before that same marker,
so on the hybrid boot of an emulator upgrade the status reaches
:started only once the continuation has run. One condition therefore
covers both restart transitions.
:init is reached through a module argument defaulting to it, as
:release_handler already is, so both sides are testable: a target that
is current but mid-boot is refused, and the same target once booted is
accepted.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C4oaMvbR1cbxrZBj8qwkqN
0 commit comments