Revision caad16e2 lib/bootstrap.py

b/lib/bootstrap.py
128 128
                               " range (%s). Please fix DNS or %s." %
129 129
                               (hostname.ip, constants.ETC_HOSTS))
130 130

  
131
  if not utils.TcpPing(hostname.ip, constants.DEFAULT_NODED_PORT,
132
                       source=constants.LOCALHOST_IP_ADDRESS):
131
  if not utils.OwnIpAddress(hostname.ip):
133 132
    raise errors.OpPrereqError("Inconsistency: this host's name resolves"
134 133
                               " to %s,\nbut this ip address does not"
135 134
                               " belong to this host."
......
145 144
    if not utils.IsValidIP(secondary_ip):
146 145
      raise errors.OpPrereqError("Invalid secondary ip given")
147 146
    if (secondary_ip != hostname.ip and
148
        (not utils.TcpPing(secondary_ip, constants.DEFAULT_NODED_PORT,
149
                           source=constants.LOCALHOST_IP_ADDRESS))):
147
        not utils.OwnIpAddress(secondary_ip)):
150 148
      raise errors.OpPrereqError("You gave %s as secondary IP,"
151 149
                                 " but it does not belong to this host." %
152 150
                                 secondary_ip)

Also available in: Unified diff