Revision eee1fa2d

b/daemons/ganeti-watcher
344 344
    self.instances = GetInstanceList()
345 345
    self.bootids = GetNodeBootIDs()
346 346
    self.messages = []
347
    self.started_instances = set()
347 348

  
348 349
  def Run(self):
349 350
    notepad = WatcherState()
......
373 374
                                        " non-autostart instance '%s'." %
374 375
                                        instance.name)))
375 376
          continue
377
        if instance.name in self.started_instances:
378
          # we already tried to start the instance, which should have
379
          # activated its drives (if they can be at all)
380
          continue
376 381
        try:
377 382
          self.messages.append(Message(NOTICE, ("Activating disks for %s." %
378 383
                                                instance.name)))
......
411 416
          self.messages.append(Message(NOTICE, ("Restarting %s%s." %
412 417
                                                (instance.name, last))))
413 418
          instance.Restart()
419
          self.started_instances.add(instance.name)
414 420
        except Error, x:
415 421
          self.messages.append(Message(ERROR, str(x)))
416 422

  

Also available in: Unified diff