Revision 6c00d19a lib/cmdlib.py

b/lib/cmdlib.py
656 656
    """
657 657
    master = self.cfg.GetMasterNode()
658 658
    result = self.rpc.call_node_stop_master(master, False)
659
    result.Raise()
660
    if not result.data:
661
      raise errors.OpExecError("Could not disable the master role")
659
    msg = result.RemoteFailMsg()
660
    if msg:
661
      raise errors.OpExecError("Could not disable the master role: %s" % msg)
662 662
    priv_key, pub_key, _ = ssh.GetUserFiles(constants.GANETI_RUNAS)
663 663
    utils.CreateBackup(priv_key)
664 664
    utils.CreateBackup(pub_key)
......
1398 1398
    # shutdown the master IP
1399 1399
    master = self.cfg.GetMasterNode()
1400 1400
    result = self.rpc.call_node_stop_master(master, False)
1401
    if result.failed or not result.data:
1402
      raise errors.OpExecError("Could not disable the master role")
1401
    msg = result.RemoteFailMsg()
1402
    if msg:
1403
      raise errors.OpExecError("Could not disable the master role: %s" % msg)
1403 1404

  
1404 1405
    try:
1405 1406
      cluster = self.cfg.GetClusterInfo()

Also available in: Unified diff