Print this page
7246 SMF stops dependents in the wrong order
7267 SMF is fast and loose with optional dependencies

@@ -19,10 +19,12 @@
  * CDDL HEADER END
  */
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright 2016 RackTop Systems.
  */
 
 
 /*
  * transition.c - Graph State Machine

@@ -135,10 +137,17 @@
 
                 log_framework(LOG_DEBUG, "Propagating maintenance (stop) of "
                     "%s.\n", v->gv_name);
 
                 graph_transition_propagate(v, PROPAGATE_STOP, rerr);
+
+                /*
+                 * The maintenance transition may satisfy optional_all/restart
+                 * dependencies and should be propagated to determine
+                 * whether new dependents are satisfiable.
+                 */
+                graph_transition_propagate(v, PROPAGATE_SAT, rerr);
         } else {
                 log_framework(LOG_DEBUG, "Propagating maintenance of %s.\n",
                     v->gv_name);
 
                 graph_transition_propagate(v, PROPAGATE_SAT, rerr);

@@ -265,10 +274,16 @@
                 log_framework(LOG_DEBUG, "Propagating stop of %s.\n",
                     v->gv_name);
 
                 graph_transition_propagate(v, PROPAGATE_STOP, rerr);
 
+                /*
+                 * The disable transition may satisfy optional_all/restart
+                 * dependencies and should be propagated to determine
+                 * whether new dependents are satisfiable.
+                 */
+                graph_transition_propagate(v, PROPAGATE_SAT, rerr);
         } else {
                 log_framework(LOG_DEBUG, "Propagating disable of %s.\n",
                     v->gv_name);
 
                 graph_transition_propagate(v, PROPAGATE_SAT, rerr);

@@ -324,12 +339,13 @@
                 /*
                  * If the vertex has the GV_TOOFFLINE flag set then that's
                  * because the instance was transitioning from offline to
                  * online and the reverse disable algorithm doesn't offline
                  * those instances because it was already appearing offline.
-                 * So do it now.
+                 * Try to do it now.
                  */
+                if (insubtree_dependents_down(v))
                 offline_vertex(v);
         }
 
         if (gt_running(old_state) == 0) {
                 log_framework(LOG_DEBUG, "Propagating start of %s.\n",