Reduce number of envs and options from command line. (#3230)

Ref #3229

After review with @abperiasamy we decided to remove all the unnecessary options

- MINIO_BROWSER (Implemented as a security feature but now deemed obsolete
  since even if blocking access to MINIO_BROWSER, s3 API port is open)
- MINIO_CACHE_EXPIRY (Defaults to 72h)
- MINIO_MAXCONN (No one used this option and we don't test this)
- MINIO_ENABLE_FSMETA (Enable FSMETA all the time)

Remove --ignore-disks option - this option was implemented when XL layer
 would initialize the backend disks and heal them automatically to disallow
 XL accidentally using the root partition itself this option was introduced.

This behavior has been changed XL no longer automatically initializes
`format.json`  a HEAL is controlled activity, so ignore-disks is not
useful anymore. This change also addresses the problems of our documentation
going forward and keeps things simple. This patch brings in reduction of
options and defaulting them to a valid known inputs.  This patch also
serves as a guideline of limiting many ways to do the same thing.
This commit is contained in:
Harshavardhana
2016-11-11 16:36:07 -08:00
parent 98e79b4b50
commit 716316f711
42 changed files with 165 additions and 1536 deletions

View File

@@ -18,8 +18,6 @@ package cmd
import (
"net/http"
"os"
"strings"
router "github.com/gorilla/mux"
)
@@ -109,17 +107,13 @@ func configureServerHandler(srvCmdConfig serverCmdConfig) (http.Handler, error)
return nil, err
}
// set environmental variable MINIO_BROWSER=off to disable minio web browser.
// By default minio web browser is enabled.
if !strings.EqualFold(os.Getenv("MINIO_BROWSER"), "off") {
// Register RPC router for web related calls.
if err = registerBrowserPeerRPCRouter(mux); err != nil {
return nil, err
}
// Register RPC router for web related calls.
if err = registerBrowserPeerRPCRouter(mux); err != nil {
return nil, err
}
if err = registerWebRouter(mux); err != nil {
return nil, err
}
if err = registerWebRouter(mux); err != nil {
return nil, err
}
// Add API router.
@@ -127,8 +121,6 @@ func configureServerHandler(srvCmdConfig serverCmdConfig) (http.Handler, error)
// List of some generic handlers which are applied for all incoming requests.
var handlerFns = []HandlerFunc{
// Limits the number of concurrent http requests.
setRateLimitHandler,
// Limits all requests size to a maximum fixed limit
setRequestSizeLimitHandler,
// Adds 'crossdomain.xml' policy handler to serve legacy flash clients.
@@ -139,6 +131,8 @@ func configureServerHandler(srvCmdConfig serverCmdConfig) (http.Handler, error)
setPrivateBucketHandler,
// Adds cache control for all browser requests.
setBrowserCacheControlHandler,
// Validates all incoming requests to have a valid date header.
setTimeValidityHandler,
// CORS setting for all browser API requests.
setCorsHandler,
// Validates all incoming URL resources, for invalid/unsupported