From 029f52880b5dc5086e2e39a7e0c2d19f511c1571 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 28 Aug 2018 14:23:22 -0700 Subject: [PATCH] With no read quorum config should be treated as notFound (#6374) This will allow the config subsystem to initialize properly in situations where many servers are coming up in a rolling fashion. --- cmd/config.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/config.go b/cmd/config.go index e69c10d2b..f7805f0ac 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -136,7 +136,8 @@ func checkServerConfig(ctx context.Context, objAPI ObjectLayer) error { } if _, err := objAPI.GetObjectInfo(ctx, minioMetaBucket, configFile); err != nil { - if isErrObjectNotFound(err) { + // Convert ObjectNotFound, Quorum errors into errConfigNotFound + if isErrObjectNotFound(err) || isInsufficientReadQuorum(err) { return errConfigNotFound } logger.GetReqInfo(ctx).AppendTags("configFile", configFile) @@ -162,7 +163,7 @@ func readConfig(ctx context.Context, objAPI ObjectLayer, configFile string) (*by var buffer bytes.Buffer // Read entire content by setting size to -1 if err := objAPI.GetObject(ctx, minioMetaBucket, configFile, 0, -1, &buffer, ""); err != nil { - // Ignore if err is ObjectNotFound or IncompleteBody when bucket is not configured with notification + // Convert ObjectNotFound, IncompleteBody and Quorum errors into errConfigNotFound if isErrObjectNotFound(err) || isErrIncompleteBody(err) || isInsufficientReadQuorum(err) { return nil, errConfigNotFound }