mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
plugins: SetConfig shouldn't panic on nil driver configs
This commit is contained in:
@@ -64,9 +64,11 @@ func (b *basePluginServer) SetConfig(ctx context.Context, req *proto.SetConfigRe
|
||||
cfg := nomadConfigFromProto(req.GetNomadConfig())
|
||||
filteredCfg := new(ClientAgentConfig)
|
||||
|
||||
switch info.Type {
|
||||
case PluginTypeDriver:
|
||||
filteredCfg.Driver = cfg.Driver
|
||||
if cfg != nil {
|
||||
switch info.Type {
|
||||
case PluginTypeDriver:
|
||||
filteredCfg.Driver = cfg.Driver
|
||||
}
|
||||
}
|
||||
|
||||
// Set the config
|
||||
|
||||
Reference in New Issue
Block a user