def is_out_of_space(job): """ Did the disk run out of space? :param job: job object. :return: Boolean. (note: True means the error was found) """ stderr = os.path.join(job.workdir, config.Payload.payloadstderr) error_messages = ["No space left on device"] return scan_file(stderr, error_messages, warning_message="identified a \'%s\' message in %s" % (error_messages[0], os.path.basename(stderr)))
def is_nfssqlite_locking_problem(job): """ Were there any NFS SQLite locking problems? :param job: job object. :return: Boolean. (note: True means the error was found) """ stdout = os.path.join(job.workdir, config.Payload.payloadstdout) error_messages = ["prepare 5 database is locked", "Error SQLiteStatement"] return scan_file(stdout, error_messages, warning_message="identified an NFS/Sqlite locking problem in %s" % os.path.basename(stdout))
def is_user_code_missing(job): """ Is the user code (tarball) missing on the server? :param job: job object. :return: Boolean. (note: True means the error was found) """ stdout = os.path.join(job.workdir, config.Payload.payloadstdout) error_messages = ["ERROR: unable to fetch source tarball from web"] return scan_file(stdout, error_messages, warning_message="identified an \'%s\' message in %s" % (error_messages[0], os.path.basename(stdout)))