prevent int64 overflow for default_lease_ttl and max_lease_ttl (#14206)
* prevent int64 overflow for default_lease_ttl and max_lease_ttl * add changelog entry * wording change in changelog entry
This commit is contained in:
parent
1877fc16d7
commit
45875c7e71
|
@ -0,0 +1,4 @@
|
|||
```release-note:change
|
||||
core: Changes the unit of `default_lease_ttl` and `max_lease_ttl` values returned by
|
||||
the `/sys/config/state/sanitized` endpoint from nanoseconds to seconds.
|
||||
```
|
|
@ -831,8 +831,8 @@ func (c *Config) Sanitized() map[string]interface{} {
|
|||
|
||||
"enable_ui": c.EnableUI,
|
||||
|
||||
"max_lease_ttl": c.MaxLeaseTTL,
|
||||
"default_lease_ttl": c.DefaultLeaseTTL,
|
||||
"max_lease_ttl": c.MaxLeaseTTL / time.Second,
|
||||
"default_lease_ttl": c.DefaultLeaseTTL / time.Second,
|
||||
|
||||
"cluster_cipher_suites": c.ClusterCipherSuites,
|
||||
|
||||
|
|
|
@ -687,7 +687,7 @@ func testConfig_Sanitized(t *testing.T) {
|
|||
"cluster_addr": "top_level_cluster_addr",
|
||||
"cluster_cipher_suites": "",
|
||||
"cluster_name": "testcluster",
|
||||
"default_lease_ttl": 10 * time.Hour,
|
||||
"default_lease_ttl": (365 * 24 * time.Hour) / time.Second,
|
||||
"default_max_request_duration": 0 * time.Second,
|
||||
"disable_cache": true,
|
||||
"disable_clustering": false,
|
||||
|
@ -718,7 +718,7 @@ func testConfig_Sanitized(t *testing.T) {
|
|||
},
|
||||
"log_format": "",
|
||||
"log_level": "",
|
||||
"max_lease_ttl": 10 * time.Hour,
|
||||
"max_lease_ttl": (30 * 24 * time.Hour) / time.Second,
|
||||
"pid_file": "./pidfile",
|
||||
"plugin_directory": "",
|
||||
"seals": []interface{}{
|
||||
|
|
|
@ -45,8 +45,8 @@ seal "awskms" {
|
|||
secret_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
|
||||
}
|
||||
|
||||
max_lease_ttl = "10h"
|
||||
default_lease_ttl = "10h"
|
||||
max_lease_ttl = "30d"
|
||||
default_lease_ttl = "365d"
|
||||
cluster_name = "testcluster"
|
||||
pid_file = "./pidfile"
|
||||
raw_storage_endpoint = true
|
||||
|
|
Loading…
Reference in New Issue