From 172e63dbb67aac6edd8d09944070f04cf3dce12a Mon Sep 17 00:00:00 2001 From: Poorna Date: Tue, 9 Aug 2022 15:17:43 -0700 Subject: [PATCH] fix: site replication group updates to set status correctly (#15507) Fixes: #15486 --- cmd/site-replication.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/site-replication.go b/cmd/site-replication.go index 042fa42e8..c27fe8ce6 100644 --- a/cmd/site-replication.go +++ b/cmd/site-replication.go @@ -1103,6 +1103,9 @@ func (c *SiteReplicationSys) PeerGroupInfoChangeHandler(ctx context.Context, cha _, err = globalIAMSys.SetGroupStatus(ctx, updReq.Group, updReq.Status == madmin.GroupEnabled) } else { _, 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 { @@ -4683,7 +4686,6 @@ func (c *SiteReplicationSys) healGroups(ctx context.Context, objAPI ObjectLayer, continue } peerName := info.Sites[dID].Name - if err := c.IAMChangeHook(ctx, madmin.SRIAMItem{ Type: madmin.SRIAMItemGroupInfo, GroupInfo: &madmin.SRGroupInfo{