Standard OpenNMS Solaris SMF manifest creates an insane multi-user-server dependency
Description
The SMF allows applications to depend on other services to be available and running in order for them to start. We want Solaris to boot in this order (omitting irrelevant services) : single-user -> multi-user-server -> start opennms
multi-user-server starts exports - ie nfs shares, cifs shares, ssh daemon - higher level services that applications rely upon - think application or virtual zones working off an NFS share!
The installer however puts the dependencies in this order: single-user -> start opennms -> multi-user-server
Impact: If the opennms service is disabled/cant start, the server cant come up to multi-user-server level and any other applications depending on this will not be started. The huge dependency on the multi-user-server is the virtual zone service. No zone will boot if opennms is not running.
Fix svc:/milestone/multi-user-server should not be changed (ie have a "dependency") on the opennms service. This causes the multi-user-server to depend on opennms starting rather than opennms depending on the server being at the multi-user-server milestone before it starts.
Add <dependency name='multi-user-server' type='service' grouping='require_all' restart_on='none'> <service_fmri value='svc:/milestone/multi-user-server' /> </dependency> to the smf-manifest.xml file.
After the change, the above will look like ("svccfg -s opennms listprop | grep multi-user-server") multi-user-server dependency multi-user-server/entities fmri svc:/milestone/multi-user-server multi-user-server/grouping astring require_all multi-user-server/restart_on astring none multi-user-server/type astring service
No opennms entries will exist in svc:/milestone/multi-user-server
Benefit: Zones will now boot without depending on the opennms service being online.
Notes: Smoke tested in a Solaris 11 zone.
Environment
Solaris 10 / Solaris 11 (express)
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Seth Leger January 17, 2012 at 4:02 PM
DJ blessed this change so it has been committed. Marking as fixed.
commit 53b532e37c762e16654130a281745a249e303e72
Seth Leger December 8, 2011 at 5:27 PM
I have this patch ready to apply... DJ. does this look like a reasonable change?
The SMF allows applications to depend on other services to be available and running in order for them to start.
We want Solaris to boot in this order (omitting irrelevant services) : single-user -> multi-user-server -> start opennms
multi-user-server starts exports - ie nfs shares, cifs shares, ssh daemon - higher level services that applications rely upon - think application or virtual zones working off an NFS share!
The installer however puts the dependencies in this order: single-user -> start opennms -> multi-user-server
Impact:
If the opennms service is disabled/cant start, the server cant come up to multi-user-server level and any other applications depending on this will not be started. The huge dependency on the multi-user-server is the virtual zone service. No zone will boot if opennms is not running.
Fix
svc:/milestone/multi-user-server should not be changed (ie have a "dependency") on the opennms service. This causes the multi-user-server to depend on opennms starting rather than opennms depending on the server being at the multi-user-server milestone before it starts.
Remove:
<dependent
name='opennms_multi-user-server'
grouping='require_all'
restart_on='none'>
<service_fmri value='svc:/milestone/multi-user-server' />
</dependent>
from smf-manifest.xml
Add
<dependency
name='multi-user-server'
type='service'
grouping='require_all'
restart_on='none'>
<service_fmri value='svc:/milestone/multi-user-server' />
</dependency>
to the smf-manifest.xml file.
After the change, the above will look like ("svccfg -s opennms listprop | grep multi-user-server")
multi-user-server dependency
multi-user-server/entities fmri svc:/milestone/multi-user-server
multi-user-server/grouping astring require_all
multi-user-server/restart_on astring none
multi-user-server/type astring service
No opennms entries will exist in svc:/milestone/multi-user-server
Benefit:
Zones will now boot without depending on the opennms service being online.
Notes:
Smoke tested in a Solaris 11 zone.