Exemple #1
0
 def startup(self):
     self.is_leader = True
     self.log.info("This node is elected as leader {}".format(
         socket.getfqdn()))
     self.metrics = get_metrics_interface('paasta.deployd')
     leader_counter = self.metrics.create_counter(
         "leader_elections", paasta_cluster=self.config.get_cluster())
     leader_counter.count()
     QueueMetrics(
         self.inbox,
         self.instances_that_need_to_be_bounced_asap,
         self.config.get_cluster(),
         self.metrics,
     ).start()
     self.inbox.start()
     self.log.info("Starting all watcher threads")
     self.start_watchers()
     self.log.info(
         "All watchers started, now adding all services for initial bounce")
     self.add_all_services()
     self.log.info("Prioritising services that we know need a bounce...")
     if self.config.get_deployd_startup_oracle_enabled():
         self.prioritise_bouncing_services()
     self.log.info("Starting worker threads")
     self.start_workers()
     self.started = True
     self.log.info("Startup finished!")
     self.main_loop()
Exemple #2
0
 def startup(self):
     self.is_leader = True
     self.log.info("This node is elected as leader {}".format(socket.getfqdn()))
     self.metrics = get_metrics_interface(self.config.get_deployd_metrics_provider())
     QueueMetrics(self.inbox, self.bounce_q, self.config.get_cluster(), self.metrics).start()
     self.inbox.start()
     self.log.info("Starting all watcher threads")
     self.start_watchers()
     self.log.info("All watchers started, now adding all services for initial bounce")
     self.add_all_services()
     self.log.info("Starting worker threads")
     self.start_workers()
     self.started = True
     self.log.info("Startup finished!")
     self.main_loop()