mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Merge pull request #5297 from hashicorp/b-docker-logging
Docker: Fix logging config parsing
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
multierror "github.com/hashicorp/go-multierror"
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
version "github.com/hashicorp/go-version"
|
||||
hcl2 "github.com/hashicorp/hcl2/hcl"
|
||||
"github.com/hashicorp/nomad/helper/pluginutils/hclspecutils"
|
||||
"github.com/hashicorp/nomad/helper/pluginutils/hclutils"
|
||||
"github.com/hashicorp/nomad/nomad/structs/config"
|
||||
@@ -18,14 +17,6 @@ import (
|
||||
"github.com/zclconf/go-cty/cty/msgpack"
|
||||
)
|
||||
|
||||
var (
|
||||
// configParseCtx is the context used to parse a plugin's configuration
|
||||
// stanza
|
||||
configParseCtx = &hcl2.EvalContext{
|
||||
Functions: hclutils.GetStdlibFuncs(),
|
||||
}
|
||||
)
|
||||
|
||||
// validateConfig returns whether or not the configuration is valid
|
||||
func validateConfig(config *PluginLoaderConfig) error {
|
||||
var mErr multierror.Error
|
||||
@@ -466,7 +457,7 @@ func (l *PluginLoader) validatePluginConfig(id PluginID, info *pluginInfo) error
|
||||
}
|
||||
|
||||
// Parse the config using the spec
|
||||
val, diag := hclutils.ParseHclInterface(info.config, spec, configParseCtx)
|
||||
val, diag := hclutils.ParseHclInterface(info.config, spec, nil)
|
||||
if diag.HasErrors() {
|
||||
multierror.Append(&mErr, diag.Errs()...)
|
||||
return multierror.Prefix(&mErr, "failed parsing config:")
|
||||
|
||||
Reference in New Issue
Block a user