mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-25 03:29:10 +08:00
s3: use static configuration by default
So that users can still use the previous configuration files. If leave it empty, s3 will try to use the version from filer
This commit is contained in:
parent
765b3ef1be
commit
26731694f8
@ -38,13 +38,14 @@ func NewIdentityAccessManagement(option *S3ApiServerOption) *IdentityAccessManag
|
||||
iam := &IdentityAccessManagement{
|
||||
domain: option.DomainName,
|
||||
}
|
||||
if err := iam.loadS3ApiConfigurationFromFiler(option); err != nil {
|
||||
glog.Warningf("fail to load config: %v", err)
|
||||
}
|
||||
if len(iam.identities) == 0 && option.Config != "" {
|
||||
if option.Config != "" {
|
||||
if err := iam.loadS3ApiConfigurationFromFile(option.Config); err != nil {
|
||||
glog.Fatalf("fail to load config file %s: %v", option.Config, err)
|
||||
}
|
||||
} else {
|
||||
if err := iam.loadS3ApiConfigurationFromFiler(option); err != nil {
|
||||
glog.Warningf("fail to load config: %v", err)
|
||||
}
|
||||
}
|
||||
return iam
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user