Fix console logger crash in gateway mode (#8525)

This PR also fixes config migration only
for credentials and region which are valid
and set.

Also fix implicit `state="on"` behavior
This commit is contained in:
Harshavardhana
2019-11-14 14:19:57 -08:00
committed by kannappanr
parent 1dd38750f7
commit 32c200fe12
5 changed files with 78 additions and 21 deletions

View File

@@ -55,16 +55,6 @@ func (adm *AdminClient) SetConfigKV(kv string) (err error) {
if err != nil {
return err
}
for subSys, targetKV := range targets {
for target := range targetKV {
_, ok := targets[subSys][target][stateKey]
if !ok {
// If client asked for state preserve.
// otherwise implicitly add state to "on"
targets[subSys][target][stateKey] = stateOn
}
}
}
econfigBytes, err := EncryptData(adm.secretAccessKey, []byte(targets.String()))
if err != nil {
return err