mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-27 07:48:55 +00:00
Merge pull request #2066 from devimc/2021-06-17/fixTeardownPmem
runtime: do not hot-remove PMEM devices
This commit is contained in:
commit
b9e611e363
@ -1715,6 +1715,11 @@ func (s *Sandbox) HotplugRemoveDevice(ctx context.Context, device api.Device, de
|
||||
if !ok {
|
||||
return fmt.Errorf("device type mismatch, expect device type to be %s", devType)
|
||||
}
|
||||
// PMEM devices cannot be hot removed
|
||||
if blockDrive.Pmem {
|
||||
s.Logger().WithField("path", blockDrive.File).Infof("Skip device: cannot hot remove PMEM devices")
|
||||
return nil
|
||||
}
|
||||
_, err := s.hypervisor.hotplugRemoveDevice(ctx, blockDrive, blockDev)
|
||||
return err
|
||||
case config.VhostUserBlk:
|
||||
|
Loading…
Reference in New Issue
Block a user