Commit adc523ab authored by Iustin Pop's avatar Iustin Pop
Browse files

mlock: fail gracefully if cannot be loaded

This allows noded to continue instead of blowing up if the libc major
number changes.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 87001920
......@@ -51,7 +51,11 @@ def Mlockall(_ctypes=ctypes):
if _ctypes is None:
raise errors.NoCtypesError()
libc = _ctypes.cdll.LoadLibrary("")
libc = _ctypes.cdll.LoadLibrary("")
except EnvironmentError, err:
logging.error("Failure trying to load libc: %s", err)
libc = None
if libc is None:
logging.error("Cannot set memory lock, ctypes cannot load libc")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment