You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The top level params within a scaling policy are opaque to Nomad and therefore does not go through validation during job registration. It is the responsibility of the Autoscaler to parse the top level params safely without panics.
Currently the autoscaler assumes the source and query params are key/value string parameters. This is fine if the policy is correctly forms, but results in a panic if the operator has made a configuration error.
Example:
source = {
name = "prometheus"
}
Panic:
panic: interface conversion: interface {} is []interface {}, not string
goroutine 66 [running]:
github.com/hashicorp/nomad-autoscaler/policystorage.(*Nomad).Get(0xc0004e6008, 0xc000017410, 0x24, 0x10000000194b020, 0x1000000000001, 0x0)
/Users/jrasell/go/src/github.com/hashicorp/nomad-autoscaler/policystorage/nomad.go:50 +0x552
github.com/hashicorp/nomad-autoscaler/agent.(*Agent).Run.func1(0xc00088a050, 0x195b800, 0xc000092580, 0xc0004e6008, 0x1965c20, 0xc0007a0180, 0xc000031920, 0xc000017410, 0x24)
/Users/jrasell/go/src/github.com/hashicorp/nomad-autoscaler/agent/agent.go:84 +0xa6
created by github.com/hashicorp/nomad-autoscaler/agent.(*Agent).Run
/Users/jrasell/go/src/github.com/hashicorp/nomad-autoscaler/agent/agent.go:78 +0x60f
The text was updated successfully, but these errors were encountered:
The top level params within a scaling policy are opaque to Nomad and therefore does not go through validation during job registration. It is the responsibility of the Autoscaler to parse the top level params safely without panics.
Currently the autoscaler assumes the
source
andquery
params are key/value string parameters. This is fine if the policy is correctly forms, but results in a panic if the operator has made a configuration error.Example:
Panic:
The text was updated successfully, but these errors were encountered: