Revision 96e0d5cc lib/cmdlib.py

b/lib/cmdlib.py
1355 1355
    """Destroys the cluster.
1356 1356

  
1357 1357
    """
1358
    master = self.cfg.GetMasterNode()
1358
    (master, ip, dev, netmask, _) = self.cfg.GetMasterNetworkParameters()
1359 1359

  
1360 1360
    # Run post hooks on master node before it's removed
1361 1361
    _RunPostHook(self, master)
1362 1362

  
1363
    result = self.rpc.call_node_deactivate_master_ip(master)
1363
    result = self.rpc.call_node_deactivate_master_ip(master, ip, netmask, dev)
1364 1364
    result.Raise("Could not disable the master role")
1365 1365

  
1366 1366
    return master
......
3326 3326
    new_ip = self.ip
3327 3327

  
3328 3328
    # shutdown the master IP
3329
    (master, _, dev, netmask, family) = self.cfg.GetMasterNetworkParameters()
3330
    result = self.rpc.call_node_deactivate_master_ip(master)
3329
    (master, ip, dev, netmask, family) = self.cfg.GetMasterNetworkParameters()
3330
    result = self.rpc.call_node_deactivate_master_ip(master, ip, netmask, dev)
3331 3331
    result.Raise("Could not disable the master role")
3332 3332

  
3333 3333
    try:
......
3700 3700
      helper_os("blacklisted_os", self.op.blacklisted_os, "blacklisted")
3701 3701

  
3702 3702
    if self.op.master_netdev:
3703
      master = self.cfg.GetMasterNode()
3703
      (master, ip, dev, netmask, _) = self.cfg.GetMasterNetworkParameters()
3704 3704
      feedback_fn("Shutting down master ip on the current netdev (%s)" %
3705 3705
                  self.cluster.master_netdev)
3706
      result = self.rpc.call_node_deactivate_master_ip(master)
3706
      result = self.rpc.call_node_deactivate_master_ip(master, ip, netmask, dev)
3707 3707
      result.Raise("Could not disable the master ip")
3708 3708
      feedback_fn("Changing master_netdev from %s to %s" %
3709
                  (self.cluster.master_netdev, self.op.master_netdev))
3709
                  (dev, self.op.master_netdev))
3710 3710
      self.cluster.master_netdev = self.op.master_netdev
3711 3711

  
3712 3712
    if self.op.master_netmask:
......
3902 3902
    """Deactivate the master IP.
3903 3903

  
3904 3904
    """
3905
    master = self.cfg.GetMasterNode()
3906
    self.rpc.call_node_deactivate_master_ip(master)
3905
    (master, ip, dev, netmask, _) = self.cfg.GetMasterNetworkParameters()
3906
    self.rpc.call_node_deactivate_master_ip(master, ip, netmask, dev)
3907 3907

  
3908 3908

  
3909 3909
def _WaitForSync(lu, instance, disks=None, oneshot=False):

Also available in: Unified diff