]> git.puffer.fish Git - mirror/frr.git/commitdiff
watchquagga-mode-3-fix.patch
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 22 Jul 2015 19:35:36 +0000 (12:35 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 22 Jul 2015 19:35:36 +0000 (12:35 -0700)
Watchquagga: In phased restart with zebra, invoke restart all when zebra dies

To correctly handle starting and stopping of individual daemons not affecting
watchquagga's monitoring, we resorted to fixing up watchquagga's daemon watch
list every time a daemon was started or stopped. This was done by restarting
watchquagga itself. This meant the handling of phased restart of individual
daemons was broken in watchquagga as it attempted to stop daemons individually
before starting them all individually. Fix this by restarting all when this
happens. This does make mode 4 indistinguishable from mode 1, but I don't
understood the point of mode 4 and we don't think users change watchquagga
modes.

Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
debian/quagga.init.d
watchquagga/watchquagga.c

index b9ad6e66699257723b4e954db4aed9fca1d62fa4..dbf71ce885cf42408b1d7a566920c07d6c250caf 100755 (executable)
@@ -469,9 +469,9 @@ if [ ! -d $V_PATH ]; then
     chmod 755 /$V_PATH
 fi
 
-if [ -n "$3" ]; then
+if [ -n "$3" ] && [ "$3" != "all" ]; then
    dmn="$2"-"$3"
-elif [ -n "$2" ]; then
+elif [ -n "$2" ] && [ "$2" != "all" ]; then
    dmn="$2"
 fi
 
index ca05361c1ce0e389a7040f20b1fc9d5ccb63fe7e..0b48708b780ba05dc9c617a63ed02580005b4bb6 100644 (file)
@@ -912,14 +912,7 @@ try_restart(struct daemon *dmn)
          break;
        }
     }
-    zlog_info("Phased restart: stopping all routing daemons.");
-    /* First step: stop all other daemons. */
-    for (dmn = gs.daemons; dmn; dmn = dmn->next)
-      {
-        if (dmn != gs.special)
-         run_job(&dmn->restart,"stop",gs.stop_command,1,1);
-      }
-    set_phase(PHASE_STOPS_PENDING);
+    run_job(&gs.restart,"restart",gs.restart_command,0,1);
     break;
   default:
     zlog_err("error: unknown restart mode %d",gs.mode);