Disable cluster init with a reachable IP
authorIustin Pop <iustin@google.com>
Tue, 11 Mar 2008 07:44:49 +0000 (07:44 +0000)
committerIustin Pop <iustin@google.com>
Tue, 11 Mar 2008 07:44:49 +0000 (07:44 +0000)
commit411f8ad0a08f322069d1c9e9f035fbceb885c73f
tree3bada02d5779dab9a3d89abaa886e1bd531e6645
parentb15d625f6e259cf15ab6d02b907d8a0399b3ef05
Disable cluster init with a reachable IP

Make the cluster init fail if the IP to which the cluster name resolved
is already reachable by the master node. This is not a foolproof
solution, but it allows a cheap method of detecting simple mistakes.

It will also disallow using the master node name as cluster name (which
is something good).

The only drawbacks that I see are:
  - you are not allowed to do this, which might come in handy in cluster
    upgrades; but since we support rename, this is mitigated
  - cluster init takes longer now (+the timeout value, set to 5
    seconds), but since this is a one-off operation, it should be ok

Reviewed-by: ultrotter
lib/cmdlib.py