vm/isolated: fix hang when target_reboot is not set

* updated the contributor list

* Fixes #1750, syz-manager hangs with "target_reboot:" false in isolated VM mode

If in the isolated VM mode, "target_reboot": false option is set in the
syz-manager's configuration, it hangs forever. syz-manager essentially
keeps on waiting for the VM to reboot, while a reboot is never triggered
due to target_reboot option being set to false. The fix is to perform the
waitRebootAndSSH() check only when target_reboot is set to true.

File(s) changed:

    vm/isolated/isolated.go: Move the waitRebootAndSSH() check inside the correct block
This commit is contained in:
Dipanjan Das 2020-05-21 02:08:32 -05:00 committed by GitHub
parent c61086ab68
commit 203d1b0208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -57,3 +57,4 @@ Ethercflow
Christoph Paasch
Collabora
André Almeida
Dipanjan Das

View File

@ -274,11 +274,11 @@ func (inst *instance) repair() error {
} else {
log.Logf(2, "isolated: ssh succeeded, trying to reboot by ssh")
inst.ssh("reboot") // reboot will return an error, ignore it
if err := inst.waitRebootAndSSH(5*60, 30*time.Minute); err != nil {
return fmt.Errorf("waitRebootAndSSH failed: %v", err)
}
}
}
if err := inst.waitRebootAndSSH(5*60, 30*time.Minute); err != nil {
return fmt.Errorf("waitRebootAndSSH failed: %v", err)
}
if inst.cfg.StartupScript != "" {
log.Logf(2, "isolated: executing startup_script")
// Execute the contents of the StartupScript on the DUT.