def start_monitor(self): utils.init_keystone_auth_opts() dc_role = utils.get_dc_role() while True: try: # init platformcert monitor self.init_platformcert_monitor() # init dc monitor only if running in DC role if (dc_role == constants.DISTRIBUTED_CLOUD_ROLE_SYSTEMCONTROLLER or dc_role == constants.DISTRIBUTED_CLOUD_ROLE_SUBCLOUD): self.init_dc_monitor() except Exception as e: LOG.exception(e) time.sleep(5) else: break # spawn threads (DC thread spawned only if running in DC role) self.platcert_mon_thread = greenthread.spawn( self.platcert_monitor_cert) if (dc_role == constants.DISTRIBUTED_CLOUD_ROLE_SYSTEMCONTROLLER or dc_role == constants.DISTRIBUTED_CLOUD_ROLE_SUBCLOUD): self.dc_mon_thread = greenthread.spawn(self.dc_monitor_cert)
def start_monitor(self): utils.init_keystone_auth_opts() while True: try: self.init_monitor() except Exception as e: LOG.exception(e) time.sleep(5) else: break self.mon_thread = greenthread.spawn(self.monitor_cert)
def start_audit(self): LOG.info('Auditing interval %s' % CONF.certmon.audit_interval) utils.init_keystone_auth_opts() self.audit_thread = greenthread.spawn(self.audit_cert) self.on_start_audit()