diff --git a/lib/backend.py b/lib/backend.py index 2adbc04bf66736e2cf3a42377876e135e2647d8f..c00d9649f1910204145233055bb9628902250b75 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -32,6 +32,7 @@ import re import subprocess import random import logging +import tempfile from ganeti import errors from ganeti import utils @@ -120,7 +121,7 @@ def StopMaster(stop_daemons): result = utils.RunCmd(["ip", "address", "del", "%s/32" % master_ip, "dev", master_netdev]) if result.failed: - logger.error("Can't remove the master IP, error: %s", result.output) + logging.error("Can't remove the master IP, error: %s", result.output) # but otherwise ignore the failure if stop_daemons: diff --git a/lib/bootstrap.py b/lib/bootstrap.py index d0e3090a75116672e76856fd9a938ad4da60f571..21553e5040a2872a4d69dfc2173e11c83264ca29 100644 --- a/lib/bootstrap.py +++ b/lib/bootstrap.py @@ -315,8 +315,8 @@ def MasterFailover(): if not rpc.call_upload_file(cfg.GetNodeList(), ss.KeyToFilename(ss.SS_MASTER_NODE)): - logger.Error("could not distribute the new simple store master file" - " to the other nodes, please check.") + logging.error("could not distribute the new simple store master file" + " to the other nodes, please check.") if not rpc.call_node_start_master(new_master, True): logging.error("could not start the master role on the new master" diff --git a/lib/hypervisor/hv_fake.py b/lib/hypervisor/hv_fake.py index 70cef2b7e263057436cb5096ef168dc6966178bc..214ade44448ba7423d95ecd18dd1f0ab4945bd8a 100644 --- a/lib/hypervisor/hv_fake.py +++ b/lib/hypervisor/hv_fake.py @@ -198,7 +198,7 @@ class FakeHypervisor(hv_base.BaseHypervisor): finally: fh.close() except EnvironmentError, err: - raise HypervisorError("Failed to list node info: %s" % err) + raise errors.HypervisorError("Failed to list node info: %s" % err) result['cpu_total'] = cpu_total return result