On Mon, Aug 03, 2015 at 03:17:34PM +0200, 'BSRK Aditya' via ganeti-devel wrote: > This data collector is for the maintainance daemon. > It runs predefined scripts evaluating node health. > > Signed-off-by: BSRK Aditya <[email protected]> > --- > Makefile.am | 1 + > src/Ganeti/Constants.hs | 7 ++ > src/Ganeti/DataCollectors.hs | 5 ++ > src/Ganeti/DataCollectors/Diagnose.hs | 147 > +++++++++++++++++++++++++++++++++ > src/Ganeti/DataCollectors/Types.hs | 2 +- > test/data/cluster_config_2.16.json | 4 +
NACK! Regardless what is happening in this patch, a change to Ganeti 2.17 can *never* affect how a valid 2.16 configuration looks. > test/py/cfgupgrade_unittest.py | 1 + > 7 files changed, 166 insertions(+), 1 deletion(-) > create mode 100644 src/Ganeti/DataCollectors/Diagnose.hs > +-- | This function computes the JSON representation of the LV status. > +buildJsonReport :: IO J.JSValue > +buildJsonReport = do > + fp <- getCurrentDirectory > + setCurrentDirectory C.dataCollectorDiagnoseDirectory > + cmds <- getDirectoryContents "." > + validCmds <- filterM isValid cmds > + outs <- forM validCmds (\cmd -> readProcess cmd [] "") > + setCurrentDirectory fp > + case mapM J.decode outs of > + J.Ok vals -> return . J.JSArray $ vals > + J.Error str -> fail str *Never* fail in IO in a daemon. The daemon needs to survive. Moreover, the comments on the previous versions of this patch do still apply. Also, do send different versions of the same patch to the same email thread. -- Klaus Aehlig Google Germany GmbH, Dienerstr. 12, 80331 Muenchen Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores
