mirror of
https://github.com/minio/minio.git
synced 2025-11-25 12:06:10 -05:00
Handle localhost distributed setups properly (#8577)
Fixes an issue reported by @klauspost and @vadmeste This PR also allows users to expand their clusters from single node XL deployment to distributed mode.
This commit is contained in:
@@ -81,9 +81,12 @@ func (host *Host) UnmarshalJSON(data []byte) (err error) {
|
||||
|
||||
// ParseHost - parses string into Host
|
||||
func ParseHost(s string) (*Host, error) {
|
||||
if s == "" {
|
||||
return nil, errors.New("invalid argument")
|
||||
}
|
||||
isValidHost := func(host string) bool {
|
||||
if host == "" {
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
if ip := net.ParseIP(host); ip != nil {
|
||||
|
||||
Reference in New Issue
Block a user