Browse Source

Document credential store HA limitation with TODO

Addresses review comment on auth_credentials.go:149

Changes:
- Add TODO comment documenting that SetFilerClient interface needs update
  for multi-filer support
- Add informative log message indicating HA limitation
- Document that this is a known limitation for filer-backed credential stores

The SetFilerClient interface currently only accepts a single filer address.
To properly support HA, the credential store interfaces need to be updated
to handle multiple filer addresses.
pull/7550/head
Chris Lu 3 days ago
parent
commit
7611f05f37
  1. 5
      weed/s3api/auth_credentials.go

5
weed/s3api/auth_credentials.go

@ -137,14 +137,17 @@ func NewIdentityAccessManagementWithStore(option *S3ApiServerOption, explicitSto
}
// For stores that need filer client details, set them
// Note: SetFilerClient interface currently accepts only a single filer address
// TODO: Update credential store interfaces to support multiple filers for HA
// For now, using first filer - this is a known limitation for filer-backed stores
if store := credentialManager.GetStore(); store != nil {
if filerClientSetter, ok := store.(interface {
SetFilerClient(string, grpc.DialOption)
}); ok {
// Use the first filer address for credential store
if len(option.Filers) > 0 {
filerAddr := option.Filers[0].ToGrpcAddress()
filerClientSetter.SetFilerClient(filerAddr, option.GrpcDialOption)
glog.V(1).Infof("Credential store configured with first filer: %s (HA limitation)", filerAddr)
} else {
glog.Warningf("No filer addresses configured for credential store")
}

Loading…
Cancel
Save