mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-30 23:37:45 +00:00
Merge pull request #2212 from lifupan/fix_virtiofsd
qemu: stop the virtiofsd specifically
This commit is contained in:
@@ -665,7 +665,8 @@ func (q *qemu) setupVirtiofsd(ctx context.Context) (err error) {
|
||||
|
||||
func (q *qemu) stopVirtiofsd(ctx context.Context) (err error) {
|
||||
if q.state.VirtiofsdPid == 0 {
|
||||
return errors.New("invalid virtiofsd PID(0)")
|
||||
q.Logger().Warn("The virtiofsd had stopped")
|
||||
return nil
|
||||
}
|
||||
|
||||
err = q.virtiofsd.Stop(ctx)
|
||||
@@ -972,6 +973,10 @@ func (q *qemu) stopSandbox(ctx context.Context, waitOnly bool) error {
|
||||
}
|
||||
}
|
||||
|
||||
if err := q.stopVirtiofsd(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user