Ejemplo n.º 1
0
    def check_dump_component_in_initrd(self):
        """Dump component in initial ramdisk"""

        status = True

        if not os.path.isfile(self.initial_ramdisk):
            self.log.error("Initial ramdisk not found %s",
                           self.initial_ramdisk)
            status = False

        elif get_file_size(self.initial_ramdisk) < 1:
            self.log.error("Initial ramdisk file is empty")
            status = False

        else:
            (return_code,
             stdout) = execute_command(["lsinitrd", self.initial_ramdisk])[:-1]

            if return_code is None:
                self.log.error(
                    "Failed to verify %s component in Initial ramdisk",
                    self.dump_comp_name)
                status = False

            elif self.dump_comp_name not in str(stdout):
                self.log.error("kdump component is missing in %s",
                               self.initial_ramdisk)
                status = False

            else:
                self.log.debug("%s component found in %s", self.dump_comp_name,
                               self.initial_ramdisk)

        return Check(self.check_dump_component_in_initrd.__doc__, status)
Ejemplo n.º 2
0
    def check_htx_installation_path(self):
        """HTX Installation path"""

        installation_path_exists = True

        if os.path.isfile(self.installation_path):
            htx_install_dir = get_file_content(self.installation_path)

            if (htx_install_dir is None) or \
               (not os.path.isdir(htx_install_dir)):
                self.log.error("Missing HTX installation directory %s",
                               htx_install_dir)
                installation_path_exists = False
        else:
            self.log.error("Unable to locate %s file", self.installation_path)
            installation_path_exists = False

        return Check(self.check_htx_installation_path.__doc__,
                     installation_path_exists)
Ejemplo n.º 3
0
    def check_dump_component_in_initrd(self):
        """Dump component in initial ramdisk"""

        # Do not have dump component in init ramdisk
        return Check(None)