Revision 7c4c22f5

b/lib/bootstrap.py
269 269
  if not ipcls.Own(hostname.ip):
270 270
    raise errors.OpPrereqError("Inconsistency: this host's name resolves"
271 271
                               " to %s,\nbut this ip address does not"
272
                               " belong to this host. Aborting." %
272
                               " belong to this host" %
273 273
                               hostname.ip, errors.ECODE_ENVIRON)
274 274

  
275 275
  clustername = netutils.GetHostname(name=cluster_name, family=ipcls.family)
276 276

  
277 277
  if netutils.TcpPing(clustername.ip, constants.DEFAULT_NODED_PORT, timeout=5):
278
    raise errors.OpPrereqError("Cluster IP already active. Aborting.",
278
    raise errors.OpPrereqError("Cluster IP already active",
279 279
                               errors.ECODE_NOTUNIQUE)
280 280

  
281 281
  if not secondary_ip:
282 282
    if primary_ip_version == constants.IP6_VERSION:
283 283
      raise errors.OpPrereqError("When using a IPv6 primary address, a valid"
284
                                 " IPv4 address must be given as secondary."
285
                                 " Aborting.", errors.ECODE_INVAL)
284
                                 " IPv4 address must be given as secondary",
285
                                 errors.ECODE_INVAL)
286 286
    secondary_ip = hostname.ip
287 287

  
288 288
  if not netutils.IP4Address.IsValid(secondary_ip):
b/lib/cmdlib.py
2535 2535
    if new_ip != old_ip:
2536 2536
      if netutils.TcpPing(new_ip, constants.DEFAULT_NODED_PORT):
2537 2537
        raise errors.OpPrereqError("The given cluster IP address (%s) is"
2538
                                   " reachable on the network. Aborting." %
2538
                                   " reachable on the network" %
2539 2539
                                   new_ip, errors.ECODE_NOTUNIQUE)
2540 2540

  
2541 2541
    self.op.name = new_name
......
3668 3668
    ]
3669 3669

  
3670 3670
  def CheckArguments(self):
3671
    self.primary_ip_family = self.cfg.GetPrimaryIPFamily()
3671 3672
    # validate/normalize the node name
3672 3673
    self.hostname = netutils.GetHostname(name=self.op.node_name,
3673
                                         family=self.cfg.GetPrimaryIPFamily())
3674
                                         family=self.primary_ip_family)
3674 3675
    self.op.node_name = self.hostname.name
3675 3676

  
3676 3677
  def BuildHooksEnv(self):
......
3705 3706
    node = hostname.name
3706 3707
    primary_ip = self.op.primary_ip = hostname.ip
3707 3708
    if self.op.secondary_ip is None:
3709
      if self.primary_ip_family == netutils.IP6Address.family:
3710
        raise errors.OpPrereqError("When using a IPv6 primary address, a valid"
3711
                                   " IPv4 address must be given as secondary",
3712
                                   errors.ECODE_INVAL)
3708 3713
      self.op.secondary_ip = primary_ip
3709 3714

  
3710 3715
    secondary_ip = self.op.secondary_ip
......
6994 6999
      elif ip.lower() == constants.VALUE_AUTO:
6995 7000
        if not self.op.name_check:
6996 7001
          raise errors.OpPrereqError("IP address set to auto but name checks"
6997
                                     " have been skipped. Aborting.",
7002
                                     " have been skipped",
6998 7003
                                     errors.ECODE_INVAL)
6999 7004
        nic_ip = self.hostname1.ip
7000 7005
      else:

Also available in: Unified diff