On Fri, Sep 3, 2010 at 14:36, Manuel Franceschini <[email protected]> wrote: > On Fri, Sep 3, 2010 at 2:31 PM, Michael Hanselmann <[email protected]> wrote: >> Am 3. September 2010 13:17 schrieb Manuel Franceschini <[email protected]>: >>> --- a/lib/backend.py >>> +++ b/lib/backend.py >>> @@ -306,7 +306,10 @@ def StartMaster(start_daemons, no_voting): >>> utils.RunCmd(["arping", "-q", "-U", "-c 3", "-I", master_netdev, >>> "-s", >>> master_ip, master_ip]) >>> elif ipcls == netutils.IP6Address: >>> - utils.RunCmd(["ndisc6", "-q", "-r 3", master_ip, master_netdev]) >>> + try: >>> + utils.RunCmd(["ndisc6", "-q", "-r 3", master_ip, master_netdev]) >>> + except errors.OpExecError: >>> + logging.warning("Can't execute ndisc6, please install if >>> missing") >> >> IIRC, RunCmd doesn't raise an exception. Use its return value and >> include error code and message in the log message. See other places >> where RunCmd is used. > > It does raise an exception in exactly that case (ENOENT) that I want > to catch here.
Good point. Is it enough to just log a warning? Nobody usually looks into the logs of noded. In any case, LGTM for now, but please add a TODO there for better error reporting. iustin
