http://defect.opensolaris.org/bz/show_bug.cgi?id=12462
Summary: nameservices need to be online before we restart
autofs
Classification: Development
Product: nwam
Version: RC5
Platform: ANY/Generic
OS/Version: All
Status: ACCEPTED
Severity: normal
Priority: P3
Component: ON misc
AssignedTo: nwam-dev at opensolaris.org
ReportedBy: alan.maguire at sun.com
QAContact: nwam-dev at opensolaris.org
--- Comment #0 from amaguire <alan.maguire at sun.com> 2009-11-04 13:45:45 UTC
---
As reported by Paul/Seb:
"When we start nis in our custom location in punchin, the nsswitch.conf
file gets changed and nis gets started, but autofs doesn't work even
though nwam restarts it. If we manually svcadm restart autofs, then the
automount maps start to work again.
I think there's a race condition, possibly.
NWAM phase 1 does, essentially.
svcadm enable -t nis/client
svcadm restart autofs
punchin without nwam phase 1 does this essentially, which is
consistently solid.
svcadm enable -st nis/client
svcadm restart autofs
We had to add the synchronous flag at some point to avoid situations
like this. Might you add the synchronous flag to certain services start
invocations to make sure the dependencies are met? I know you have to
be careful about keeping things non-blocking, so I wouldn't recommend
doing this wholesale."
Examining net-loc, we enable nameservice services via start_svc(), which does
"svcadm enable -t" in cases where the service is currently disabled, or "svcadm
restart" in cases where it is already enabled. start_svc() is used by the
following services (in addition to nameservices):
ipsec/ike
ipsec/policy
ipfilter
nfs/mapid
It might be worth creating a synchronous version of start_svc() to use for the
nameservice services only. However a problem arises - there's no way to issue a
restart and be sure it has completed. We may need to replace restarts with
"disable -st"/"enable -st". From a performance perspective, it'd be better to
restrict this sort of action to the minimum set of services that require it -
it would be painful if we needed to disable/enable ipfilter and wait for both
to complete each time a new location was activated. So I propose adding a
start_svc_sync() function which the nameservices utilize, and it's body would
look like this:
start_svc_sync () {
if service_is_enabled $1; then
$SVCADM disable -st $1
$SVCADM enable -st $1 && return
else
$SVCADM enable -st $1 && return
fi
}
We probably need stop_svc_sync() too (simply does "svcadm disable -st FMRI").
Does this sound right?
(BTW Seb notes that autofs shouldn't require restart to notice the availability
of new automount maps at all, we'll file something in bugster to that effect)
--
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.