mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-19 15:24:26 +01:00
Merge pull request #3028 from egernst/hypervisor-hacking
Hypervisor cleanup, refactoring
This commit is contained in:
@@ -525,12 +525,9 @@ func newSandbox(ctx context.Context, sandboxConfig SandboxConfig, factory Factor
|
||||
swapDevices: []*config.BlockDrive{},
|
||||
}
|
||||
|
||||
hypervisor.setSandbox(s)
|
||||
|
||||
if s.store, err = persist.GetDriver(); err != nil || s.store == nil {
|
||||
return nil, fmt.Errorf("failed to get fs persist driver: %v", err)
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if retErr != nil {
|
||||
s.Logger().WithError(retErr).Error("Create new sandbox failed")
|
||||
@@ -538,6 +535,9 @@ func newSandbox(ctx context.Context, sandboxConfig SandboxConfig, factory Factor
|
||||
}
|
||||
}()
|
||||
|
||||
sandboxConfig.HypervisorConfig.VMStorePath = s.store.RunVMStoragePath()
|
||||
sandboxConfig.HypervisorConfig.RunStorePath = s.store.RunStoragePath()
|
||||
|
||||
spec := s.GetPatchedOCISpec()
|
||||
if spec != nil && spec.Process.SelinuxLabel != "" {
|
||||
sandboxConfig.HypervisorConfig.SELinuxProcessLabel = spec.Process.SelinuxLabel
|
||||
|
||||
Reference in New Issue
Block a user