fix: error in capturing XFS error config in health report (#17176)

This commit is contained in:
Shireesh Anjal 2023-05-11 03:50:48 +05:30 committed by GitHub
parent 3cdbc2f414
commit a3d666356c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -136,6 +136,7 @@ func init() {
gob.Register(StorageErr(""))
gob.Register(madmin.TimeInfo{})
gob.Register(madmin.XFSErrorConfigs{})
gob.Register(map[string]interface{}{})
defaultAWSCredProvider = []credentials.Provider{

View File

@ -178,9 +178,7 @@ func (client *peerRESTClient) GetSysConfig(ctx context.Context) (info madmin.Sys
defer xhttp.DrainBody(respBody)
err = gob.NewDecoder(respBody).Decode(&info)
cfg := info.Config["time-info"]
if cfg != nil {
ti := cfg.(madmin.TimeInfo)
if ti, ok := info.Config["time-info"].(madmin.TimeInfo); ok {
ti.RoundtripDuration = roundtrip
info.Config["time-info"] = ti
}