Andrey Smirnov 565c747582 fix: install sequence stuck on event bus
machined's main.go waits for boot sequence to finish, while metal
platform initializer tries to send a message to the event bus without
any listeners, so this is pure deadlock.

Resolve that by panicking from initializer, this aborts phase and
sequence, and leads to reboot on panic. Not really clean as it leaves
scary stacktraces in the dmesg, but it works. Cleanup might be done by
introducing error value for reboot, and ignoring it when printing the
errors.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-01-21 16:28:00 -06:00

11 lines
342 B
Go

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package runtime
import "errors"
// ErrReboot is raised to initiate early reboot sequence via panic.
var ErrReboot = errors.New("reboot")