I was looking into having a service get notifications when an optional 
dependent service came online or offline.  There doesn't seem to be a 
1-step way of getting this.  If I set restart_on to refresh I will get 
notifications if the service is stopped, but my service won't be restarted 
if the dependent service is started.

So, service foo has declared

        <dependency
                name='foo'
                type='service'
                grouping='optional_all'
                restart_on='refresh'>
                <service_fmri value='svc:/bar' />
        </dependency>

If bar is disabled, and foo is started, foo will not be notified if bar 
comes online later.  question 1, is this correct?

I also noticed I can work around this by creating a pseudoservice baz, and 
declaring baz to be exclude_all on bar, and foo to be optional_all on both 
bar and baz.  Question 2, am I correct in my understanding here?

Are there any plans for more detailed notifications for service 
transitions for dependencies that might help with this?

-- Dave

Reply via email to