mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-19 01:39:48 +00:00
Merge pull request #2273 from Pennyzct/cache_server
cache-factory: a few bug fix
This commit is contained in:
commit
76f9b34b59
@ -88,7 +88,7 @@ func (s *cacheServer) Quit(ctx context.Context, empty *types.Empty) (*types.Empt
|
||||
time.Sleep(time.Second)
|
||||
s.quit()
|
||||
}()
|
||||
return nil, nil
|
||||
return &types.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *cacheServer) Status(ctx context.Context, empty *types.Empty) (*pb.GrpcStatus, error) {
|
||||
|
@ -222,7 +222,7 @@ type agent interface {
|
||||
configure(h hypervisor, id, sharePath string, builtin bool, config interface{}) error
|
||||
|
||||
// configureFromGrpc will update agent settings based on provided arguments which from Grpc
|
||||
configureFromGrpc(id string, builtin bool, config interface{}) error
|
||||
configureFromGrpc(h hypervisor, id string, builtin bool, config interface{}) error
|
||||
|
||||
// getVMPath will return the agent vm socket's directory path
|
||||
getVMPath(id string) string
|
||||
|
@ -416,8 +416,8 @@ func (k *kataAgent) configure(h hypervisor, id, sharePath string, builtin bool,
|
||||
return h.addDevice(sharedVolume, fsDev)
|
||||
}
|
||||
|
||||
func (k *kataAgent) configureFromGrpc(id string, builtin bool, config interface{}) error {
|
||||
return k.internalConfigure(nil, id, "", builtin, config)
|
||||
func (k *kataAgent) configureFromGrpc(h hypervisor, id string, builtin bool, config interface{}) error {
|
||||
return k.internalConfigure(h, id, "", builtin, config)
|
||||
}
|
||||
|
||||
func (k *kataAgent) createSandbox(sandbox *Sandbox) error {
|
||||
|
@ -181,7 +181,7 @@ func (n *noopAgent) configure(h hypervisor, id, sharePath string, builtin bool,
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *noopAgent) configureFromGrpc(id string, builtin bool, config interface{}) error {
|
||||
func (n *noopAgent) configureFromGrpc(h hypervisor, id string, builtin bool, config interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -1958,6 +1958,7 @@ func (q *qemu) fromGrpc(ctx context.Context, hypervisorConfig *HypervisorConfig,
|
||||
|
||||
q.qemuConfig.SMP = qp.QemuSMP
|
||||
|
||||
q.arch.setBridges(q.state.Bridges)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,7 @@ func NewVMFromGrpc(ctx context.Context, v *pb.GrpcVM, config VMConfig) (*VM, err
|
||||
}
|
||||
|
||||
agent := newAgent(config.AgentType)
|
||||
agent.configureFromGrpc(v.Id, isProxyBuiltIn(config.ProxyType), config.AgentConfig)
|
||||
agent.configureFromGrpc(hypervisor, v.Id, isProxyBuiltIn(config.ProxyType), config.AgentConfig)
|
||||
|
||||
proxy, err := newProxy(config.ProxyType)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user