David Bustos wrote: > SMF users and developers, > > What would you think about something like this: > > $ svcadm enable nfs/server > Error: svc:/network/nfs/server:default is locked. > Use share(1M) to administer this service. > $ echo $? > 1 > $ > > $ svccfg -s nfs/server:default > svc:/network/nfs/server:default> setprop general/enabled = true > Error: The general/enabled property is locked. > Use share(1M) to administer this service. > svc:/network/nfs/server> exit > $ > > The idea is that the NFS developers want to enforce NFS-specific > consistency between the general/enabled properties of the NFS services > (nfsd, statd, lockd, mountd, etc.) and with configuration outside the > repository (sharetab). Since the repository doesn't provide hooks for > the developer to execute code when a property changes (not that I'm > saying it should), the NFS developers provide the share(1M) command > which knows how to make coordinated changes. However, one of the > benefits of SMF is actually a problem here -- a standard way to enable > and disable services (svcadm) allows the user to make uncoordinated > changes, which could put the system into an unsupported configuration, > which not only might cause problems, but might cause problems that he > won't discover until later. So this would allow the NFS developers to > specify that the nfs/server service should be locked and to supply text > which user tools would print if a change is attempted (the bit about > share(1M), here). > I think the idea is moving in the right direction but the example of the problem I see for NFS isn't the one I would use. I don't see a problem with enable/disable via SMF.
The problem I see comes with the sharemgr project (putback coming this week) where we move configuration of shares into SMF. A share consists of a property group and at least one property in the pg (the path). It would be useful to be able ensure that the actual share and options are created correctly and that for operational properties that the values are legal. Using the share utiliities, the configuration will always be setup consistently. Bypassing the utilities could lead to operational problems that aren't readily diagnosed. Not being able to "enable" the share automatically if done via svcadm isn't a problem for NFS at this point. Doug