Project

General

Profile

Actions

Bug #7387

closed

SMF is fast and loose with require_any/service dependencies

Added by Andrew Stormont over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2016-09-16
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Service instances are started by graph_start_if_satisfied() in startd/graph.c. This function calls instance_satisfied with 'satbility' set to B_FALSE (the 'satbility' flag is used to enable/disable checking for unsatisfiable dependencies) which in turn is passed to the dependency functions.

https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/svc/startd/graph.c#L1691

Unfortunately due to a bug in require_any_satisfied it always returns '1' when 'satbility' is set to B_FALSE. Even more unfortunate is that dependencies on services are mapped internally to a require_any dependency group containing all instances of said service. In short, you cannot rely on require_any or service dependencies to be satisfied before your service starts.

https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/svc/startd/graph.c#L1300


Related issues

Related to illumos gate - Bug #7267: SMF is fast and loose with optional dependenciesClosed2016-08-03

Actions
Actions

Also available in: Atom PDF