fix: make single locks for both IAM and object-store (#9279)

Additionally add context support for IAM sub-system
This commit is contained in:
Harshavardhana
2020-04-07 14:26:39 -07:00
committed by GitHub
parent e375341c33
commit e7276b7b9b
9 changed files with 266 additions and 402 deletions

View File

@@ -163,8 +163,8 @@ func decryptData(edata []byte, creds ...auth.Credentials) ([]byte, error) {
return data, err
}
func migrateIAMConfigsEtcdToEncrypted(client *etcd.Client) error {
ctx, cancel := context.WithTimeout(context.Background(), defaultContextTimeout)
func migrateIAMConfigsEtcdToEncrypted(ctx context.Context, client *etcd.Client) error {
ctx, cancel := context.WithTimeout(ctx, defaultContextTimeout)
defer cancel()
encrypted, err := checkBackendEtcdEncrypted(ctx, client)