Revision 3d7cd10b hbal.hs
b/hbal.hs | ||
---|---|---|
160 | 160 |
putStrLn . unlines . map (\s -> printf " - %s" s) $ fix_msgs |
161 | 161 |
|
162 | 162 |
let offline_names = optOffline opts |
163 |
all_names = snd . unzip $ ktn |
|
164 |
offline_wrong = filter (\n -> not $ elem n all_names) offline_names |
|
163 | 165 |
offline_indices = fst . unzip . |
164 | 166 |
filter (\(_, n) -> elem n offline_names) $ ktn |
165 | 167 |
|
168 |
when (length offline_wrong > 0) $ do |
|
169 |
printf "Wrong node name(s) set as offline: %s\n" |
|
170 |
(commaJoin offline_wrong) |
|
171 |
exitWith $ ExitFailure 1 |
|
172 |
|
|
166 | 173 |
let nl = Container.map (\n -> if elem (Node.idx n) offline_indices |
167 | 174 |
then Node.setOffline n True |
168 | 175 |
else n) fixed_nl |
Also available in: Unified diff