Revision abc1f2ce

b/lib/jqueue.py
377 377

  
378 378
    # TODO: check failed_nodes
379 379

  
380
  def _RenameFileUnlocked(self, old, new):
381
    os.rename(old, new)
382

  
383
    result = rpc.call_jobqueue_rename(self._nodes, old, new)
384
    for node in self._nodes:
385
      if not result[node]:
386
        logging.error("Moving %s to %s failed on %s", old, new, node)
387

  
388
    # TODO: check failed nodes
389

  
380 390
  def _FormatJobID(self, job_id):
381 391
    if not isinstance(job_id, (int, long)):
382 392
      raise errors.ProgrammerError("Job ID '%s' not numeric" % job_id)
......
577 587
      old = self._GetJobPath(job.id)
578 588
      new = self._GetArchivedJobPath(job.id)
579 589

  
580
      os.rename(old, new)
590
      self._RenameFileUnlocked(old, new)
581 591

  
582 592
      logging.debug("Successfully archived job %s", job.id)
583 593
    finally:

Also available in: Unified diff