mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 20:54:26 +00:00
runtime: do not hot-remove PMEM devices
PMEM devices cannot be hot-removed from a running VM. fixes #2018 Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
parent
1faaf5f35d
commit
ecdd137c6f
@ -1715,6 +1715,11 @@ func (s *Sandbox) HotplugRemoveDevice(ctx context.Context, device api.Device, de
|
|||||||
if !ok {
|
if !ok {
|
||||||
return fmt.Errorf("device type mismatch, expect device type to be %s", devType)
|
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)
|
_, err := s.hypervisor.hotplugRemoveDevice(ctx, blockDrive, blockDev)
|
||||||
return err
|
return err
|
||||||
case config.VhostUserBlk:
|
case config.VhostUserBlk:
|
||||||
|
Loading…
Reference in New Issue
Block a user