def __init__(self): # OS info self.OS_VERSION = OSCheck().get_os_major_version() self.OS_TYPE = OSCheck.get_os_type() self.OS_FAMILY = OSCheck.get_os_family()
import re import time import subprocess import threading import shlex import platform from PackagesAnalyzer import PackagesAnalyzer from HostCheckReportFileHandler import HostCheckReportFileHandler from Hardware import Hardware from ambari_commons import OSCheck, OSConst import socket logger = logging.getLogger() # OS info OS_VERSION = OSCheck().get_os_major_version() OS_TYPE = OSCheck.get_os_type() OS_FAMILY = OSCheck.get_os_family() # service cmd SERVICE_CMD = "/sbin/service" # on ubuntu iptables service is called ufw if OS_FAMILY == OSConst.DEBIAN_FAMILY: SERVICE_CMD = "/usr/sbin/service" class HostInfo: # List of project names to be used to find alternatives folders etc. DEFAULT_PROJECT_NAMES = [ "hadoop*", "hadoop", "hbase", "hcatalog", "hive", "ganglia", "nagios",