command/agent: Lowercase DC. Fixes #761
This commit is contained in:
parent
cbc29d1cde
commit
0e9718247d
|
@ -4,6 +4,10 @@ FEATURES:
|
||||||
|
|
||||||
* Ability to configure minimum session TTL. [GH-821]
|
* Ability to configure minimum session TTL. [GH-821]
|
||||||
|
|
||||||
|
BUG FIXES:
|
||||||
|
|
||||||
|
* Datacenter is lowercased, fixes DNS lookups [GH-761]
|
||||||
|
|
||||||
IMPROVEMENTS:
|
IMPROVEMENTS:
|
||||||
|
|
||||||
* Raft uses BoltDB as the backend store. [GH-857]
|
* Raft uses BoltDB as the backend store. [GH-857]
|
||||||
|
|
|
@ -179,6 +179,10 @@ func (c *Command) readConfig() *Config {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ensure the datacenter is always lowercased. The DNS endpoints automatically
|
||||||
|
// lowercase all queries, and internally we expect DC1 and dc1 to be the same.
|
||||||
|
config.Datacenter = strings.ToLower(config.Datacenter)
|
||||||
|
|
||||||
// Verify datacenter is valid
|
// Verify datacenter is valid
|
||||||
if !validDatacenter.MatchString(config.Datacenter) {
|
if !validDatacenter.MatchString(config.Datacenter) {
|
||||||
c.Ui.Error("Datacenter must be alpha-numeric with underscores and hypens only")
|
c.Ui.Error("Datacenter must be alpha-numeric with underscores and hypens only")
|
||||||
|
|
Loading…
Reference in New Issue