Merge pull request #2273 from Pennyzct/cache_server

cache-factory: a few bug fix
This commit is contained in:
James O. D. Hunt 2019-12-13 09:08:21 +00:00 committed by GitHub
commit 76f9b34b59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 6 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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 {

View File

@ -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
}

View File

@ -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
}

View File

@ -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 {