Commit 81869422 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Merge branch 'stable-2.8' into stable-2.9



* stable-2.8
  Fix integer overflow problem in hbal
  Add missing space
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parents b57b1df4 95ee8abb
......@@ -201,7 +201,8 @@ execJobSet anno master nl il cref (js:jss) = do
let jobs = map (\(_, idx, move, _) ->
map anno $ Cluster.iMoveToJob nl il idx move) js
descr = map (\(_, idx, _, _) -> Container.nameOf il idx) js
logfn = putStrLn . ("Got job IDs" ++) . commaJoin . map (show . fromJobId)
logfn =
putStrLn . ("Got job IDs " ++) . commaJoin . map (show . fromJobId)
putStrLn $ "Executing jobset for instances " ++ commaJoin descr
jrs <- bracket (L.getClient master) L.closeClient $
Jobs.execJobsWait jobs logfn
......
......@@ -70,12 +70,12 @@ waitForJobs jids client = waitForJobs' 500000 15000000
waitForJobs' delay maxdelay = do
-- TODO: this should use WaitForJobChange once it's available in Haskell
-- land, instead of a fixed schedule of sleeping intervals.
threadDelay $ min delay maxdelay
threadDelay delay
sts <- L.queryJobsStatus client jids
case sts of
Bad e -> return . Bad $ "Checking job status: " ++ formatError e
Ok sts' -> if any (<= JOB_STATUS_RUNNING) sts' then
waitForJobs' (delay * 2) maxdelay
waitForJobs' (min (delay * 2) maxdelay) maxdelay
else
return . Ok $ zip jids sts'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment