Merge pull request #2325 from tedyu/store-state-err

vc: Check error return from storeState
This commit is contained in:
Archana Shinde
2019-12-10 13:24:44 -08:00
committed by GitHub

View File

@@ -293,7 +293,9 @@ func (clh *cloudHypervisor) startSandbox(timeout int) error {
if err := clh.waitVMM(clhTimeout); err != nil {
clh.Logger().WithField("error", err).WithField("output", clh.cmdOutput.String()).Warn("cloud-hypervisor init failed")
clh.shutdownVirtiofsd()
if shutdownErr := clh.shutdownVirtiofsd(); shutdownErr != nil {
clh.Logger().WithField("error", shutdownErr).Warn("error shutting down Virtiofsd")
}
return err
}
@@ -302,7 +304,9 @@ func (clh *cloudHypervisor) startSandbox(timeout int) error {
}
clh.state.state = clhReady
clh.storeState()
if err = clh.storeState(); err != nil {
return err
}
return nil
}