mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-27 07:48:55 +00:00
vc: Check error return from storeState
Fixes #2324 This achieves parity with the check on line 293. Signed-off-by: Ted Yu yuzhihong@gmail.com
This commit is contained in:
parent
00ff99bcb6
commit
9a15457064
@ -304,13 +304,17 @@ func (clh *cloudHypervisor) startSandbox(timeout int) error {
|
|||||||
}
|
}
|
||||||
if err := clh.waitVMM(clhTimeout); err != nil {
|
if err := clh.waitVMM(clhTimeout); err != nil {
|
||||||
clh.Logger().WithField("error", err).WithField("output", clh.cmdOutput.String()).Warn("cloud-hypervisor init failed")
|
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
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
clh.state.PID = pid
|
clh.state.PID = pid
|
||||||
clh.state.state = clhReady
|
clh.state.state = clhReady
|
||||||
clh.storeState()
|
if err = clh.storeState(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user