mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-11 21:02:34 +00:00
runtime: Support privileged containers in peer pod VM
This patch fixes the issue of running containers with privileged as true. See the discussion at this URL for the details. https://github.com/confidential-containers/cloud-api-adaptor/issues/111 Author: Lei Li <cdlleili@cn.ibm.com> Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
This commit is contained in:
parent
f9278f22c3
commit
c3e6b66051
@ -1060,6 +1060,9 @@ func newRemoteHypervisorConfig(h hypervisor) (vc.HypervisorConfig, error) {
|
|||||||
return vc.HypervisorConfig{
|
return vc.HypervisorConfig{
|
||||||
RemoteHypervisorSocket: h.RemoteHypervisorSocket,
|
RemoteHypervisorSocket: h.RemoteHypervisorSocket,
|
||||||
RemoteHypervisorTimeout: h.RemoteHypervisorTimeout,
|
RemoteHypervisorTimeout: h.RemoteHypervisorTimeout,
|
||||||
|
|
||||||
|
// No valid value so avoid to append block device to list in kata_agent.appendDevices
|
||||||
|
BlockDeviceDriver: "dummy",
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1133,7 +1133,7 @@ func (k *kataAgent) appendDevices(deviceList []*grpc.Device, c *Container) []*gr
|
|||||||
kataDevice = k.appendVfioDevice(dev, device, c)
|
kataDevice = k.appendVfioDevice(dev, device, c)
|
||||||
}
|
}
|
||||||
|
|
||||||
if kataDevice == nil {
|
if kataDevice == nil || kataDevice.Type == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,11 +200,13 @@ func (rh *remoteHypervisor) AddDevice(ctx context.Context, devInfo interface{},
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (rh *remoteHypervisor) HotplugAddDevice(ctx context.Context, devInfo interface{}, devType DeviceType) (interface{}, error) {
|
func (rh *remoteHypervisor) HotplugAddDevice(ctx context.Context, devInfo interface{}, devType DeviceType) (interface{}, error) {
|
||||||
panic(notImplemented("HotplugAddDevice"))
|
logrus.Printf("HotplugAddDevice: devInfo=%#v", devInfo)
|
||||||
|
return "HotplugAddDevice is not implemented", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rh *remoteHypervisor) HotplugRemoveDevice(ctx context.Context, devInfo interface{}, devType DeviceType) (interface{}, error) {
|
func (rh *remoteHypervisor) HotplugRemoveDevice(ctx context.Context, devInfo interface{}, devType DeviceType) (interface{}, error) {
|
||||||
panic(notImplemented("HotplugRemoveDevice"))
|
logrus.Printf("HotplugRemoveDevice: devInfo=%#v", devInfo)
|
||||||
|
return "HotplugRemoveDevice is not implemented", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rh *remoteHypervisor) ResizeMemory(ctx context.Context, memMB uint32, memoryBlockSizeMB uint32, probe bool) (uint32, MemoryDevice, error) {
|
func (rh *remoteHypervisor) ResizeMemory(ctx context.Context, memMB uint32, memoryBlockSizeMB uint32, probe bool) (uint32, MemoryDevice, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user