make server the default node for portmaps
This commit is contained in:
parent
2640fc13ce
commit
8512ac0c8a
@ -39,6 +39,10 @@ func mapNodesToPortSpecs(specs []string, createdNodes []string) (map[string][]st
|
||||
for _, spec := range specs {
|
||||
nodes, portSpec := extractNodes(spec)
|
||||
|
||||
if len(nodes) == 0 {
|
||||
nodes = append(nodes, defaultNodes)
|
||||
}
|
||||
|
||||
for _, node := range nodes {
|
||||
// check if node-specifier is valid (either a role or a name) and append to list if matches
|
||||
nodeFound := false
|
||||
|
||||
@ -49,7 +49,10 @@ func CheckClusterName(name string) error {
|
||||
if len(name) > clusterNameMaxSize {
|
||||
return fmt.Errorf("[ERROR] Cluster name is too long (%d > %d)", len(name), clusterNameMaxSize)
|
||||
}
|
||||
return fmt.Errorf("[ERROR] Invalid cluster name\n%+v", ValidateHostname(name))
|
||||
if err := ValidateHostname(name); err != nil {
|
||||
return fmt.Errorf("[ERROR] Invalid cluster name\n%+v", ValidateHostname(name))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ValidateHostname ensures that a cluster name is also a valid host name according to RFC 1123.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user