]> git.puffer.fish Git - mirror/frr.git/commitdiff
solaris: fix SMF manifest dependency model and start method
authorBrian Bennett <brian.bennett@joyent.com>
Tue, 17 Feb 2015 23:26:12 +0000 (23:26 +0000)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Thu, 26 May 2016 15:25:13 +0000 (15:25 +0000)
Resolves an issue where quagga daemons restart in an infinite loop.
Quagga daemons declare a dependency on zebra that requires a restart
of the daemon when zebra restarts and they explicitly restart zebra,
which again triggers their own restart.

Restarting zebra when other daemons are started is explicitly removed,
leaving dependency management up to SMF rather than handling it in the
start method.

solaris/quagga.init.in: Remove calls to routeadm_zebra_enable, and the
    routeadm_zebra_enable function.
solaris/quagga.xml.in: Set dependency zebra grouping to require_all.

Fixes: #818
Signed-off-by: Greg Troxel <gdt@ir.bbn.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 75a3cf6cf69f6ab940f8421b0f79b2b1f689b904)

solaris/quagga.init.in
solaris/quagga.xml.in

index 00426241b2244eb2d765af56ade3e7cb90dae3fc..ee3a987f33ffa3f25350d075bc3a170b65a97993 100755 (executable)
@@ -146,31 +146,6 @@ routeadm_daemon_args () {
        echo ${args}
 }
 
-# certain daemons need zebra
-routeadm_zebra_enable () {
-
-       if [ "$DAEMON" = "zebra" ]; then
-               return
-       fi
-       
-       enable_zebra=`/usr/bin/svcprop -p \
-               routing/enable_zebra $SMF_FMRI 2> /dev/null`
-       if [ "$enable_zebra" != "false" ]; then
-               zenabled=`/usr/bin/svcprop -p general/enabled zebra:quagga`
-               zenabledt=`/usr/bin/svcprop -p general_ovr/enabled zebra:quagga`
-               if [ "$zenabled" = "true" -o "$zenabledt" = "true" ]; then
-                       /usr/sbin/svcadm disable zebra:quagga
-                       /usr/sbin/svcadm enable -st zebra:quagga
-               else
-                       /usr/sbin/svcadm enable -st zebra:quagga 
-               fi
-               if [ "$?" != "0" ]; then
-                       echo "Could not enable zebra:quagga"
-                       exit $SMF_EXIT_ERR_FATAL
-               fi
-       fi
-}
-
 # Include smf functions, if available. If not, define smf_present to indicate
 # there is no SMF. Should allow this script to work pre-S10.
 if [ -f "$SMFINCLUDE" ] ; then
@@ -247,7 +222,6 @@ esac
 if [ smf_present -a -f "$ROUTEADMINCLUDE" ]; then
        handle_routeadm_upgrade $DAEMON;
        DAEMON_ARGS=`routeadm_daemon_args`;
-       routeadm_zebra_enable $DAEMON;
 else
        if [ $# -gt 0 ] ; then
                shift
index 50c52c2260e85ff026cb388bed7da21eaa3680f0..60427b06e97c0b1cd3775eedc6a2ac296b8669bd 100644 (file)
@@ -21,6 +21,8 @@
        Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
        Use is subject to license terms.
 
+    Copyright 2015 Joyent, Inc.
+
        ident   "@(#)quagga.xml 1.0     05/03/15 SMI"
 -->
 
        <!-- ensure that restart of zebra is propogated to daemon -->
        <dependency
                name='zebra'
-               grouping='optional_all'
+               grouping='require_all'
                restart_on='restart'
                type='service'>
                <service_fmri value='svc:/network/routing/zebra:quagga' />
        <!-- ensure that restart of zebra is propogated to daemon -->
        <dependency
                name='zebra'
-               grouping='optional_all'
+               grouping='require_all'
                restart_on='restart'
                type='service'>
                <service_fmri value='svc:/network/routing/zebra:quagga' />
        <!-- ensure that restart of zebra is propogated to daemon -->
        <dependency
                name='zebra'
-               grouping='optional_all'
+               grouping='require_all'
                restart_on='restart'
                type='service'>
                <service_fmri value='svc:/network/routing/zebra:quagga' />
        <!-- ensure that restart of zebra is propogated to daemon -->
        <dependency
                name='zebra'
-               grouping='optional_all'
+               grouping='require_all'
                restart_on='restart'
                type='service'>
                <service_fmri value='svc:/network/routing/zebra:quagga' />
        <!-- ensure that restart of zebra is propogated to daemon -->
        <dependency
                name='zebra'
-               grouping='optional_all'
+               grouping='require_all'
                restart_on='restart'
                type='service'>
                <service_fmri value='svc:/network/routing/zebra:quagga' />