6465359 Exclusion dependencies could make svcadm milestone spin
authornakanon
Mon, 30 Jul 2007 15:25:23 -0700
changeset 4762 4b350d7d8f90
parent 4761 dd784e5678f2
child 4763 ccaaf7c5d591
6465359 Exclusion dependencies could make svcadm milestone spin
usr/src/cmd/svc/startd/graph.c
--- a/usr/src/cmd/svc/startd/graph.c	Mon Jul 30 14:32:47 2007 -0700
+++ b/usr/src/cmd/svc/startd/graph.c	Mon Jul 30 15:25:23 2007 -0700
@@ -4002,6 +4002,16 @@
 {
 	assert(PTHREAD_MUTEX_HELD(&dgraph_lock));
 
+	/*
+	 * We must skip exclusion dependencies because they are allowed to
+	 * complete dependency cycles.  This is correct because A's exclusion
+	 * dependency on B doesn't bear on the order in which they should be
+	 * stopped.  Indeed, the exclusion dependency should guarantee that
+	 * they are never online at the same time.
+	 */
+	if (v->gv_type == GVT_GROUP && v->gv_depgroup == DEPGRP_EXCLUDE_ALL)
+		return;
+
 	/* If v isn't an instance, recurse on its dependencies. */
 	if (v->gv_type != GVT_INST)
 		goto recurse;