Merge pull request #2273 from hashicorp/config-merge
Merging GC related config values
This commit is contained in:
commit
10b999367a
|
@ -2,6 +2,7 @@
|
|||
|
||||
IMPROVEMENTS:
|
||||
* core: Update Serf and Memberlist for more reliable gossip [GH-2255]
|
||||
* client: Apply GC related configurations properly [GH-2273]
|
||||
* client: Reproducible Node ID on OSes that provide system-level UUID
|
||||
[GH-2277]
|
||||
* server/vault: Vault Client on Server handles SIGHUP to reload configs
|
||||
|
|
|
@ -901,6 +901,15 @@ func (a *ClientConfig) Merge(b *ClientConfig) *ClientConfig {
|
|||
if b.Reserved != nil {
|
||||
result.Reserved = result.Reserved.Merge(b.Reserved)
|
||||
}
|
||||
if b.GCInterval != 0 {
|
||||
result.GCInterval = b.GCInterval
|
||||
}
|
||||
if b.GCDiskUsageThreshold != 0 {
|
||||
result.GCDiskUsageThreshold = b.GCDiskUsageThreshold
|
||||
}
|
||||
if b.GCInodeUsageThreshold != 0 {
|
||||
result.GCInodeUsageThreshold = b.GCInodeUsageThreshold
|
||||
}
|
||||
|
||||
// Add the servers
|
||||
result.Servers = append(result.Servers, b.Servers...)
|
||||
|
|
|
@ -197,6 +197,9 @@ func TestConfig_Merge(t *testing.T) {
|
|||
ReservedPorts: "2,10-30,55",
|
||||
ParsedReservedPorts: []int{1, 2, 3},
|
||||
},
|
||||
GCInterval: 6 * time.Second,
|
||||
GCDiskUsageThreshold: 71,
|
||||
GCInodeUsageThreshold: 86,
|
||||
},
|
||||
Server: &ServerConfig{
|
||||
Enabled: true,
|
||||
|
|
Loading…
Reference in a new issue