Warn if etcd key for the new cluster already exist
This commit is contained in:
parent
a5f0ef10d0
commit
d4bb72989a
|
|
@ -147,10 +147,10 @@ func (c *Cluster) etcdKeyExists(keyName string) (bool, error) {
|
|||
func (c *Cluster) Create() error {
|
||||
keyExist, err := c.etcdKeyExists(fmt.Sprintf("/%s/%s", c.OpConfig.EtcdScope, c.Metadata.Name))
|
||||
if err != nil {
|
||||
return fmt.Errorf("Can't check etcd key: %s", err)
|
||||
return fmt.Warnln("Can't check etcd key: %s", err)
|
||||
}
|
||||
if keyExist {
|
||||
return fmt.Errorf("Etcd key for the cluster already exists")
|
||||
return fmt.Warnln("Etcd key for the cluster already exists")
|
||||
}
|
||||
//TODO: service will create endpoint implicitly
|
||||
ep, err := c.createEndpoint()
|
||||
|
|
|
|||
Loading…
Reference in New Issue