On Wed, Feb 25, 2015 at 01:58:49PM +0100, 'Klaus Aehlig' via ganeti-devel wrote:
If this option is given, make loadExternalData evaluate the bit indicating
if all data was available. If this is not the case, exit.

Signed-off-by: Klaus Aehlig <[email protected]>
---
src/Ganeti/HTools/ExtLoader.hs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/Ganeti/HTools/ExtLoader.hs b/src/Ganeti/HTools/ExtLoader.hs
index 18b1563..a922d54 100644
--- a/src/Ganeti/HTools/ExtLoader.hs
+++ b/src/Ganeti/HTools/ExtLoader.hs
@@ -124,9 +124,10 @@ loadExternalData opts = do
      ldresult = input_data >>= (if ignoreDynU then clearDynU else return)
                            >>= mergeData eff_u exTags selInsts exInsts now
  cdata <- exitIfBad "failed to load data, aborting" ldresult
-  (cdata', _) <- if optMonD opts
-                   then MonD.queryAllMonDDCs cdata opts
-                   else return (cdata, True)
+  (cdata', ok) <- if optMonD opts
+                    then MonD.queryAllMonDDCs cdata opts
+                    else return (cdata, True)
+  exitWhen (optMonDExitMissing opts && not ok) "Not all required data 
available"
  let (fix_msgs, nl) = checkData (cdNodes cdata') (cdInstances cdata')

  unless (optVerbose opts == 0) $ maybeShowWarnings fix_msgs
--
2.2.0.rc0.207.ga3a616c


LGTM

Reply via email to