def get_service_features(): for service in FEATURES: for module in FEATURES[service]: module_features = {} cfg = os.path.join(constants.DATA_ROOT, CONFIG_FILES[service][module]) if not os.path.exists(cfg): continue for key in FEATURES[service][module]: for line in open(cfg).readlines(): ret = re.compile( r"^{}\s*=\s*(.+)\s*".format(key)).match(line) if ret: module_features[key] = helpers.bool_str(ret[1]) break if key not in module_features: if key in DEFAULTS.get(service, {}).get(module, {}): default = DEFAULTS[service][module][key] module_features[key] = default # TODO: only include modules for which there is an actual agent # installed since otherwise their config is irrelevant. if module_features: if service not in SERVICE_FEATURES: SERVICE_FEATURES[service] = {} SERVICE_FEATURES[service][module] = module_features
def get_debug_log_info(): debug_enabled = {} for proj in OST_PROJECTS: path = OST_ETC_OVERRIDES.get(proj) if path is None: path = os.path.join(constants.DATA_ROOT, "etc", proj, "{}.conf".format(proj)) if os.path.exists(path): for line in helpers.safe_readlines(path): ret = re.compile(r"^debug\s*=\s*([A-Za-z]+).*").match(line) if ret: debug_enabled[proj] = helpers.bool_str(ret[1]) if debug_enabled: OPENSTACK_INFO["debug-logging-enabled"] = debug_enabled
OST_DEP_PKGS = [ r"conntrack", r"dnsmasq", r"haproxy", r"keepalived", r"libc-bin", r"libvirt-daemon", r"libvirt-bin", r"python3?-oslo[.-]", r"openvswitch-switch", r"ovn", r"qemu-kvm", r"rabbitmq-server", ] CINDER_LOGS = "var/log/cinder" GLANCE_LOGS = "var/log/glance" HEAT_LOGS = "var/log/heat" KEYSTONE_LOGS = "var/log/keystone" NEUTRON_LOGS = "var/log/neutron" NOVA_LOGS = "var/log/nova" OCTAVIA_LOGS = "var/log/octavia" OPENSTACK_AGENT_ERROR_KEY_BY_TIME = \ helpers.bool_str(os.environ.get('OPENSTACK_AGENT_ERROR_KEY_BY_TIME', "False")) OPENSTACK_SHOW_CPU_PINNING_RESULTS = \ helpers.bool_str(os.environ.get('OPENSTACK_SHOW_CPU_PINNING_RESULTS', "False"))
import os from common import helpers # HOTSOS GLOBALS VERBOSITY_LEVEL = int(os.environ.get('VERBOSITY_LEVEL', 0)) DATA_ROOT = os.environ.get('DATA_ROOT', '/') MASTER_YAML_OUT = os.environ.get('MASTER_YAML_OUT') USE_ALL_LOGS = os.environ.get('USE_ALL_LOGS', "False") if helpers.bool_str(USE_ALL_LOGS): USE_ALL_LOGS = True else: USE_ALL_LOGS = False