diff --git a/cmd/config-common.go b/cmd/config-common.go index df1d74582..666c072c5 100644 --- a/cmd/config-common.go +++ b/cmd/config-common.go @@ -107,7 +107,7 @@ func readConfigEtcd(ctx context.Context, client *etcd.Client, configFile string) // watchConfigEtcd - watches for changes on `configFile` on etcd and loads them. func watchConfigEtcd(objAPI ObjectLayer, configFile string, loadCfgFn func(ObjectLayer) error) { for { - watchCh := globalEtcdClient.Watch(context.Background(), iamConfigPrefix) + watchCh := globalEtcdClient.Watch(context.Background(), configFile) select { case <-GlobalServiceDoneCh: return diff --git a/cmd/iam.go b/cmd/iam.go index 062446d4f..6400a9394 100644 --- a/cmd/iam.go +++ b/cmd/iam.go @@ -79,7 +79,8 @@ func (sys *IAMSys) Init(objAPI ObjectLayer) error { go func() { // Refresh IAMSys with etcd watch. for { - watchCh := globalEtcdClient.Watch(context.Background(), iamConfigPrefix) + watchCh := globalEtcdClient.Watch(context.Background(), + iamConfigPrefix, etcd.WithPrefix()) select { case <-GlobalServiceDoneCh: return