mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-16 14:28:35 +00:00
runtime: Support policy in remote hypervisor
Move the `sandbox.agent.setPolicy` call out of the remoteHypervisor if, block, so we can use the policy implementation on peer pods Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
@@ -766,7 +766,8 @@ func (k *kataAgent) startSandbox(ctx context.Context, sandbox *Sandbox) error {
|
|||||||
|
|
||||||
if sandbox.config.HypervisorType == RemoteHypervisor {
|
if sandbox.config.HypervisorType == RemoteHypervisor {
|
||||||
ctx = context.WithValue(ctx, customRequestTimeoutKey, remoteRequestTimeout)
|
ctx = context.WithValue(ctx, customRequestTimeoutKey, remoteRequestTimeout)
|
||||||
} else {
|
}
|
||||||
|
|
||||||
// Check grpc server is serving
|
// Check grpc server is serving
|
||||||
if err = k.check(ctx); err != nil {
|
if err = k.check(ctx); err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -779,6 +780,7 @@ func (k *kataAgent) startSandbox(ctx context.Context, sandbox *Sandbox) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if sandbox.config.HypervisorType != RemoteHypervisor {
|
||||||
// Setup network interfaces and routes
|
// Setup network interfaces and routes
|
||||||
interfaces, routes, neighs, err := generateVCNetworkStructures(ctx, sandbox.network)
|
interfaces, routes, neighs, err := generateVCNetworkStructures(ctx, sandbox.network)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user