Revision 9e6014b9

b/lib/backend.py
428 428
  if old_netmask == netmask:
429 429
    return
430 430

  
431
  if not netutils.IPAddress.Own(master_ip):
432
    _Fail("The master IP address is not up, not attempting to change its"
433
          " netmask")
434

  
431 435
  result = utils.RunCmd([constants.IP_COMMAND_PATH, "address", "add",
432 436
                         "%s/%s" % (master_ip, netmask),
433 437
                         "dev", master_netdev, "label",
434 438
                         "%s:0" % master_netdev])
435 439
  if result.failed:
436
    _Fail("Could not change the master IP netmask")
440
    _Fail("Could not set the new netmask on the master IP address")
437 441

  
438 442
  result = utils.RunCmd([constants.IP_COMMAND_PATH, "address", "del",
439 443
                         "%s/%s" % (master_ip, old_netmask),
440 444
                         "dev", master_netdev, "label",
441 445
                         "%s:0" % master_netdev])
442 446
  if result.failed:
443
    _Fail("Could not change the master IP netmask")
447
    _Fail("Could not bring down the master IP address with the old netmask")
444 448

  
445 449

  
446 450
def EtcHostsModify(mode, host, ip):
b/lib/cmdlib.py
3727 3727
                                                        master_params.netdev)
3728 3728
      if result.fail_msg:
3729 3729
        msg = "Could not change the master IP netmask: %s" % result.fail_msg
3730
        self.LogWarning(msg)
3731 3730
        feedback_fn(msg)
3732
      else:
3733
        self.cluster.master_netmask = self.op.master_netmask
3731

  
3732
      self.cluster.master_netmask = self.op.master_netmask
3734 3733

  
3735 3734
    self.cfg.Update(self.cluster, feedback_fn)
3736 3735

  

Also available in: Unified diff