def setup(self, options): self._log = logging.getLogger("%s.MgmtBridge" % __name__) self._log.addFilter(log_filter.IntermittentFilter()) self._bridge = options.get('bridge_name') if self._bridge is None: raise Exception("mgmt-bridge requires bridge name") self._log.debug("bridge=%s", self._bridge)
def setup(self, options): self._log = logging.getLogger("%s.EngineHealth" % __name__) self._log.addFilter(log_filter.IntermittentFilter()) self._vm_uuid = options.get('vm_uuid') if self._vm_uuid is None: raise Exception("engine-health requires vm_uuid") self._log.debug("vm_uuid=%s", self._vm_uuid) # Most recent VM state self._vm_state = engine.VMState.DOWN self._lock = threading.Lock() # Using two timestamps, because VDSM uses different method # to generate timestamp, with different arbitrary starting point self._stats_local_timestamp = None self._stats_vdsm_timestamp = None self._event_name = "virt|VM_status|%s" % str(self._vm_uuid) self._events_queue = queue.Queue() util.event_broadcaster().register_queue(self._events_queue) self._thread = threading.Thread(target=self._handle_events) self._thread.start()
def setup(self, options): self._log = logging.getLogger("%s.CpuLoadNoEngine" % __name__) self._log.addFilter(log_filter.IntermittentFilter()) self._vm_uuid = options.get('vm_uuid') if self._vm_uuid is None: raise Exception("cpu-load-no-engine requires vm_uuid") self._log.debug("vm_uuid=%s", self._vm_uuid) self.system = {'prev': None, 'cur': None} self.latest_report_ts = None self.load = 0.0
def setup(self, options): self._log = logging.getLogger("%s.Ping" % __name__) self._log.addFilter(log_filter.IntermittentFilter()) self._addr = options.get('addr') self._timeout = str(options.get('timeout', 2)) self._total = options.get('count', 5) self._delay = options.get('delay', 0.5) if self._addr is None: raise Exception("ping requires addr address") self._log.debug("addr=%s, timeout=%s", self._addr, self._timeout) # Set initial result to success instead of None self.update_result(1.0)
def __init__(self): from ovirt_hosted_engine_ha.env import config from ovirt_hosted_engine_ha.env import config_constants as const self._log = logging.getLogger("%s.OVFStore" % __name__) self._log.addFilter(log_filter.IntermittentFilter()) self._config = config.Config(logger=self._log) self._type = self._config.get(config.ENGINE, const.DOMAIN_TYPE) self._spUUID = self._config.get(config.ENGINE, const.SP_UUID) self._sdUUID = self._config.get(config.ENGINE, const.SD_UUID) self._conf_vol_uuid = self._config.get( config.ENGINE, const.CONF_VOLUME_UUID ) self._conf_img_uuid = self._config.get( config.ENGINE, const.CONF_IMAGE_UUID ) self._HEVMID = self._config.get(config.ENGINE, const.HEVMID)
def setup(self, options): self._log = logging.getLogger("%s.MemLoad" % __name__) self._log.addFilter(log_filter.IntermittentFilter())
def setup(self, options): self._log = logging.getLogger("%s.EngineHealth" % __name__) self._log.addFilter(log_filter.IntermittentFilter()) self.sd_uuid = options["sd_uuid"]