mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
server: Add more elaborate startup messages. (#2731)
These messages based on our prep stage during XL and prints more informative message regarding drive information. This change also does a much needed refactoring.
This commit is contained in:
@@ -17,13 +17,14 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/minio/minio/pkg/disk"
|
||||
"sync"
|
||||
|
||||
"github.com/minio/minio/pkg/disk"
|
||||
)
|
||||
|
||||
// naughtyDisk wraps a POSIX disk and returns programmed errors
|
||||
// specified by the developer. The purpose is to simulate errors
|
||||
// that are hard to simulate in practise like DiskNotFound.
|
||||
// that are hard to simulate in practice like DiskNotFound.
|
||||
// Programmed errors are stored in errors field.
|
||||
type naughtyDisk struct {
|
||||
// The real disk
|
||||
@@ -42,6 +43,10 @@ func newNaughtyDisk(d *posix, errs map[int]error, defaultErr error) *naughtyDisk
|
||||
return &naughtyDisk{disk: d, errors: errs, defaultErr: defaultErr}
|
||||
}
|
||||
|
||||
func (d *naughtyDisk) String() string {
|
||||
return d.String()
|
||||
}
|
||||
|
||||
func (d *naughtyDisk) calcError() (err error) {
|
||||
d.mu.Lock()
|
||||
defer d.mu.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user