diff --git a/NEWS b/NEWS index 73928ad5aa3542aefae7c5ea5dfab30138dfab9f..09b18a1f502867105f4c5cf2e090cca5f994c4d5 100644 --- a/NEWS +++ b/NEWS @@ -69,6 +69,9 @@ Many bug-fixes and a few new small features: - Changed the instance memory modifications to only check out-of-memory conditions on memory increases, and turned the secondary node warnings into errors (they can still be overridden via ``--force``) +- Fixed the handling of a corner case when the Python installation gets + corrupted (e.g. a bad disk) while ganeti-noded is running and we try + to execute a command that doesn't exist And as usual, various improvements to the error messages, documentation and man pages. diff --git a/lib/server/noded.py b/lib/server/noded.py index decc874494f02d8e5850b7b4dbe4b3943b104946..c6bba7262250d19ded40a2ed7db9b9af3917994a 100644 --- a/lib/server/noded.py +++ b/lib/server/noded.py @@ -33,6 +33,7 @@ import os import sys import logging import signal +import codecs from optparse import OptionParser @@ -964,6 +965,13 @@ def CheckNoded(_, args): print >> sys.stderr, ("Usage: %s [-f] [-d] [-p port] [-b ADDRESS]" % sys.argv[0]) sys.exit(constants.EXIT_FAILURE) + try: + codecs.lookup("string-escape") + except LookupError: + print >> sys.stderr, ("Can't load the string-escape code which is part" + " of the Python installation. Is your installation" + " complete/correct? Aborting.") + sys.exit(constants.EXIT_FAILURE) def PrepNoded(options, _):