From 0f88cdc80e4171c3969f56e6b6e4795381e73abc Mon Sep 17 00:00:00 2001 From: Poorna Date: Fri, 28 Jan 2022 21:19:38 -0800 Subject: [PATCH] Return all stats in SiteReplicationStatus API if options unset (#14207) --- cmd/admin-handlers-site-replication.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/admin-handlers-site-replication.go b/cmd/admin-handlers-site-replication.go index 371c0b0d0..5a3fbc5a6 100644 --- a/cmd/admin-handlers-site-replication.go +++ b/cmd/admin-handlers-site-replication.go @@ -339,7 +339,14 @@ func (a adminAPIHandlers) SiteReplicationStatus(w http.ResponseWriter, r *http.R return } opts := getSRStatusOptions(r) - + // default options to all if status options are unset for backward compatibility + var dfltOpts madmin.SRStatusOptions + if opts == dfltOpts { + opts.Buckets = true + opts.Users = true + opts.Policies = true + opts.Groups = true + } info, err := globalSiteReplicationSys.SiteReplicationStatus(ctx, objectAPI, opts) if err != nil { writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)