Revision 77676415 src/Ganeti/JQueue.hs

b/src/Ganeti/JQueue.hs
92 92
import Ganeti.THH
93 93
import Ganeti.Types
94 94
import Ganeti.Utils
95
import Ganeti.VCluster (makeVirtualPath)
95 96

  
96 97
-- * Data types
97 98

  
......
397 398
replicateJob rootdir mastercandidates job = do
398 399
  let filename = liveJobFile rootdir . qjId $ job
399 400
      content = Text.JSON.encode . Text.JSON.showJSON $ job
401
  filename' <- makeVirtualPath filename
400 402
  callresult <- executeRpcCall mastercandidates
401
                  $ RpcCallJobqueueUpdate filename content
403
                  $ RpcCallJobqueueUpdate filename' content
402 404
  let result = map (second (() <$)) callresult
403 405
  logRpcErrors result
404 406
  return result
......
442 444
              logError msg
443 445
              return . Bad $ msg 
444 446
            Right () -> do
447
              serial' <- makeVirtualPath serial
445 448
              _ <- executeRpcCall mastercandidates
446
                     $ RpcCallJobqueueUpdate serial serial_content
449
                     $ RpcCallJobqueueUpdate serial' serial_content
447 450
              putMVar lock ()
448 451
              return $ mapM makeJobId [(current+1)..(current+n)]
449 452

  

Also available in: Unified diff