Revision a39779f6
b/man/hroller.rst | ||
---|---|---|
43 | 43 |
|
44 | 44 |
For backends that support identifying the master node (currenlty |
45 | 45 |
RAPI and LUXI), the master node is scheduled as the last node |
46 |
in the last reboot group. |
|
46 |
in the last reboot group. Apart from this restriction, larger reboot |
|
47 |
groups are put first. |
|
47 | 48 |
|
48 | 49 |
ALGORITHM FOR CALCULATING OFFLINE REBOOT GROUPS |
49 | 50 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
b/src/Ganeti/HTools/Program/Hroller.hs | ||
---|---|---|
31 | 31 |
|
32 | 32 |
import Control.Applicative |
33 | 33 |
import Control.Monad |
34 |
import Data.Function |
|
34 | 35 |
import Data.List |
35 | 36 |
import Data.Ord |
36 | 37 |
|
... | ... | |
161 | 162 |
nodesRebootGroups = |
162 | 163 |
map (map idToNode . filter (`IntMap.member` nodes)) $ |
163 | 164 |
IntMap.elems smallestColoring |
164 |
outputRebootGroups = masterLast nodesRebootGroups |
|
165 |
outputRebootGroups = masterLast . |
|
166 |
sortBy (flip compare `on` length) $ |
|
167 |
nodesRebootGroups |
|
165 | 168 |
outputRebootNames = map (map Node.name) outputRebootGroups |
166 | 169 |
|
167 | 170 |
when (verbose > 1) . putStrLn $ getStats colorings |
Also available in: Unified diff