Merge pull request #1047 from balena-io/1037-restart-on-no-network-preload

fix: Always reboot when applying boot config
This commit is contained in:
CameronDiver 2019-07-22 08:30:43 -07:00 committed by GitHub
commit 4922b7154d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -489,7 +489,13 @@ export class DeviceConfig {
});
}
if (_.isEmpty(steps) && this.rebootRequired) {
// Check if there is either no steps, or they are all
// noops, and we need to reboot. We want to do this
// because in a preloaded setting with no internet
// connection, the device will try to start containers
// before any boot config has been applied, which can
// cause problems
if (_.every(steps, { action: 'noop' }) && this.rebootRequired) {
steps.push({
action: 'reboot',
});