Sebastien Roy wrote: > Hello Tony, > > Tony Nguyen wrote: >>> I have a distinct feeling that it's because of the following >>> dependency information in dlmgmt.xml: >>> >>> <dependent name='network-physical' >>> grouping='require_all' >>> restart_on='none'> >>> <service_fmri value='svc:/network/physical' /> >>> </dependent> >>> >>> Can we express the dependency in the other direction to workaround >>> this problem? >>> >> >> Dependency implies certain starting order, dlmgnt -> network-physical, >> thus reversing wouldn't get us the original desired starting order. > > I'm not sure I got my point across properly. Instead of the above in > dlmgmt.xml, I'm suggesting putting the following in network-physical.xml: > > <dependency name='datalink-management' > grouping='require_all' > ... > <service_fmri value='svc:/network/datalink-management' /> > </dependency> > > That way, the network/physical service can start the datalink-management > service without svcadm detecting a problematic dependency (the > dependency from network-physical.xml will not yet have taken effect > since manifest-import hasn't yet run!)
Ah, I see now but not sure whether that would help. Without an updated running snapshot, this dependency shouldn't take part in enabling datalink-managament. However, it may worth a try :) > >> Two narrow down the problem, can you >> >> 1. Send "svcs -l datalink-management" output to get the current state >> of the service(there may be a bug in the synchronous, -s option). > > I'm not sure what you mean by "current". Can you clarify? The problem > is with enabling the service from within net-physical. The service is > enabled correctly when manifest-import runs, but by that time, it's too > late. > I'd like to see the enabled property and state of the datalink-management service right after svcadm enable failed. I'm suspecting the svcadm command just returned prematurely but datalink service may really failed to start for another reason. It would help to confirm if we can get svcs -l output for datalink-management and manifest-import. >> 2. Output of network/physical log(alt_logfle) for clues from svcadm >> enable -ts command. > > The log file contains: > unable to enable datalink-management: 3 > > Which is my own output from the new code I added which does: > > svcprop -q -p system/reconfigure system/svc/restarter:default > if [ $? -eq 0 ]; then > svcadm enable -ts datalink-management > status=$? > if [ $status -ne 0 ]; then > echo "unable to enable datalink-management: > $status" > exit $SMF_EXIT_ERR_CONFIG > fi > fi Looking at svcadm.c, we only return 3(EXIT_SVC_FAILURE) without warning if we failed to get instance's state. So, it's quite likely that the datalink-management is coming online properly but slowly. -tony