[Pkg-ganeti-devel] [ganeti] 22/165: Add --first-job-group to hbal

Apollon Oikonomopoulos apoikos at moszumanska.debian.org
Tue Aug 11 13:53:09 UTC 2015


This is an automated email from the git hooks/post-receive script.

apoikos pushed a commit to branch master
in repository ganeti.

commit db2e750a39c711b103ff915f03bee8ad88c9ec5a
Author: Klaus Aehlig <aehlig at google.com>
Date:   Fri Feb 6 16:53:29 2015 +0100

    Add --first-job-group to hbal
    
    ...to support iterative utilization-based cluster
    balancing, allowing for reevaluation of the load
    after each group of moves.
    
    Signed-off-by: Klaus Aehlig <aehlig at google.com>
    Reviewed-by: Hrvoje Ribicic <riba at google.com>
---
 src/Ganeti/HTools/Program/Hbal.hs | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/Ganeti/HTools/Program/Hbal.hs b/src/Ganeti/HTools/Program/Hbal.hs
index 03431ea..f5f06b4 100644
--- a/src/Ganeti/HTools/Program/Hbal.hs
+++ b/src/Ganeti/HTools/Program/Hbal.hs
@@ -86,6 +86,7 @@ options = do
     , luxi
     , oIAllocSrc
     , oExecJobs
+    , oFirstJobGroup
     , oReason
     , oGroup
     , oMaxSolLength
@@ -359,9 +360,13 @@ main opts args = do
   unless (verbose < 1) $
          printf "Solution length=%d\n" (length ord_plc)
 
-  let cmd_jobs = Cluster.splitJobs cmd_strs
+  let cmd_jobs = (if optFirstJobGroup opts then take 1 else id)
+                 $ Cluster.splitJobs cmd_strs
 
-  maybeSaveCommands "Commands to run to reach the above solution:" opts
+  maybeSaveCommands (if optFirstJobGroup opts
+                        then "First set of jobs:"
+                        else "Commands to run to reach the above solution:")
+                    opts
     $ Cluster.formatCmds cmd_jobs
 
   maybeSaveData (optSaveCluster opts) "balanced" "after balancing"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git



More information about the Pkg-ganeti-devel mailing list