Retry save and update IAM identity

https://github.com/chrislusf/seaweedfs/issues/2242
This commit is contained in:
Konstantin Lebedev 2021-08-11 19:29:04 +05:00
parent ec09966fd3
commit f0afd35eec

View file

@ -23,10 +23,7 @@ func (s3a *S3ApiServer) subscribeMetaEvents(clientName string, prefix string, la
dir = message.NewParentPath dir = message.NewParentPath
} }
if dir == filer.IamConfigDirecotry && message.NewEntry.Name == filer.IamIdentityFile { if dir == filer.IamConfigDirecotry && message.NewEntry.Name == filer.IamIdentityFile {
err := util.Retry("updateIamIdentity", func() error { if err := s3a.iam.loadS3ApiConfigurationFromBytes(message.NewEntry.Content); err != nil {
return s3a.iam.loadS3ApiConfigurationFromBytes(message.NewEntry.Content)
})
if err != nil {
return err return err
} }
glog.V(0).Infof("updated %s/%s", filer.IamConfigDirecotry, filer.IamIdentityFile) glog.V(0).Infof("updated %s/%s", filer.IamConfigDirecotry, filer.IamIdentityFile)