mirror of
https://github.com/minio/minio.git
synced 2025-04-05 12:20:34 -04:00
fix: site replication group updates to set status correctly (#15507)
Fixes: #15486
This commit is contained in:
parent
21bf5b4db7
commit
172e63dbb6
@ -1103,6 +1103,9 @@ func (c *SiteReplicationSys) PeerGroupInfoChangeHandler(ctx context.Context, cha
|
|||||||
_, err = globalIAMSys.SetGroupStatus(ctx, updReq.Group, updReq.Status == madmin.GroupEnabled)
|
_, err = globalIAMSys.SetGroupStatus(ctx, updReq.Group, updReq.Status == madmin.GroupEnabled)
|
||||||
} else {
|
} else {
|
||||||
_, err = globalIAMSys.AddUsersToGroup(ctx, updReq.Group, updReq.Members)
|
_, err = globalIAMSys.AddUsersToGroup(ctx, updReq.Group, updReq.Members)
|
||||||
|
if err == nil && updReq.Status != madmin.GroupEnabled {
|
||||||
|
_, err = globalIAMSys.SetGroupStatus(ctx, updReq.Group, updReq.Status == madmin.GroupEnabled)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -4683,7 +4686,6 @@ func (c *SiteReplicationSys) healGroups(ctx context.Context, objAPI ObjectLayer,
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
peerName := info.Sites[dID].Name
|
peerName := info.Sites[dID].Name
|
||||||
|
|
||||||
if err := c.IAMChangeHook(ctx, madmin.SRIAMItem{
|
if err := c.IAMChangeHook(ctx, madmin.SRIAMItem{
|
||||||
Type: madmin.SRIAMItemGroupInfo,
|
Type: madmin.SRIAMItemGroupInfo,
|
||||||
GroupInfo: &madmin.SRGroupInfo{
|
GroupInfo: &madmin.SRGroupInfo{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user