I'm sponsoring the following much anticipated fast-track for Rob Thurlow.
The timer is set to Wednesday 11th July.
The case seeks Minor binding.
The interface stability for the new SMF properties is Committed.
When replying, please be sure to Cc: psarc-ext at sun.com
cheers,
calum.
Problem statement:
The NFS client and server currently store their properties in
/etc/default/nfs, which is deprecated in favor of SMF properties.
This will complicate any NFS project which needs to add an NFS
property. This is a proposal to solve this problem. We propose
to convert /etc/default/autofs to SMF properties at the same time.
Solution:
The properties from /etc/default/nfs will be split among the
svc:/network/nfs/* services, as shown below. sharectl(1M) and
libshare will be modified to get and set properties in SMF
instead of using /etc/default/nfs. A packaging script will
be written to convert existing properties in /etc/default/nfs
to SMF properties on upgrade, and BFU will be modified to match.
The sysidnfs4 tool will be taught to play properly with this also.
The current NFS properties are:
NFSD_MAX_CONNECTIONS=<int>, default unlimited
NFSD_LISTEN_BACKLOG=<int>, default 32
NFSD_PROTOCOL=<string>, default ALL, can't be set with NFSD_DEVICE
NFSD_DEVICE=<string>, default not set, can't be set with NFSD_PROTOCOL
NFSD_SERVERS=<int>, default 16
LOCKD_LISTEN_BACKLOG=<int>, default 32
LOCKD_SERVERS=<int>, default 20
LOCKD_RETRANSMIT_TIMEOUT=<int>, default 5
GRACE_PERIOD=<int>, default 90
LOCKD_GRACE_PERIOD=<int>, default 90 (deprecated)
NFS_SERVER_VERSMIN=<enum {2,3,4}>, default 2
NFS_SERVER_VERSMAX=<enum {2,3,4}>, default 4
NFS_CLIENT_VERSMIN=<enum {2,3,4}>, default 2
NFS_CLIENT_VERSMAX=<enum {2,3,4}>, default 4
NFS_SERVER_DELEGATION=<enum {on,off}>, default on
NFSMAPID_DOMAIN=<string>, default none
These should be split up and mapped as follows:
svc:/network/nfs/server properties:
Setting Property
NFSD_MAX_CONNECTIONS application/max_connections astring ""
NFSD_LISTEN_BACKLOG application/listen_backlog astring 32
NFSD_PROTOCOL application/listen_protocol astring ALL
NFSD_DEVICE application/listen_device astring ""
NFSD_SERVERS application/num_servers astring 16
NFS_SERVER_VERSMIN application/min_version astring 2
NFS_SERVER_VERSMAX application/max_version astring 4
NFS_SERVER_DELEGATION application/delegation astring on
svc:/network/nfs/nlockmgr properties:
LOCKD_LISTEN_BACKLOG application/listen_backlog astring 32
LOCKD_SERVERS application/num_servers astring 20
LOCKD_RETRANSMIT_TIMEOUT application/retransmit_timeout astring 5
GRACE_PERIOD application/grace_period astring 90
Note: if a customer has set LOCKD_GRACE_PERIOD and not GRACE_PERIOD,
application/grace_period will take its value; the intent is to fold
these into one SMF setting to reduce confusion.
svc:/network/nfs/client properties:
NFS_CLIENT_VERSMIN application/min_version astring 2
NFS_CLIENT_VERSMAX application/max_version astring 4
svc:/network/nfs/mapid properties:
NFSMAPID_DOMAIN application/domain astring ""
The properties from /etc/default/autofs will be converted to
SMF properties in the svc:/system/filesystem/autofs service.
sharectl(1M) and libshare will be extended with an autofs
plugin to make 'sharectl {get,set} autofs' work with SMF.
A packaging script will be written to convert existing properties
in /etc/default/autofs to SMF properties on upgrade, and BFU will
be modified to match.
The current autofs properties are:
AUTOMOUNT_TIMEOUT=<int>, timeout in seconds, default 600
AUTOMOUNT_VERBOSE=<enum {TRUE,FALSE}, default FALSE
AUTOMOUNTD_VERBOSE=<enum {TRUE,FALSE}, default FALSE
AUTOMOUNTD_NOBROWSE=<enum {TRUE,FALSE}, default FALSE
AUTOMOUNTD_TRACE=<int>, trace level, default 0
AUTOMOUNTD_ENV=<string>, environment variables, default ""
These map as follows to properties in svc:/system/filesystem/autofs:
AUTOMOUNT_TIMEOUT application/timeout astring 600
AUTOMOUNT_VERBOSE application/automount_verbose astring false
AUTOMOUNTD_VERBOSE application/automountd_verbose astring false
AUTOMOUNTD_NOBROWSE application/nobrowse astring false
AUTOMOUNTD_TRACE application/trace astring 0
AUTOMOUNTD_ENV application/environment astring ""
Development plan:
We will start by making the NFS and autofs components consult SMF
instead of using defopen()/defread(), and will test this with
manually-created SMF property properties.
We will then teach libshare_nfs.so to use the SMF as the repository
for get/set operations, rather than /etc/default/*; an example of
this has been done for the CIFS client. Property manipulation
is currently table-driven, so we will add knowledge of the SMF
service in which a property lives to the tables. A new
libshare_autofs.so will be provided to do the same for autofs.
The SMF team has written an postinstall script which converts an
/etc/default/* file into new service properties via commands in
the /var/svc/profile/upgrade file. We will extend this work for
/etc/default/nfs to handle putting properties into multiple
services, and use a simpler script for /etc/default/autofs.
We may do this via the existing 'defnfs' class-action script
rather than a postinstall script. The script will also replace
the old /etc/default file with a document describing how properties
should be managed with SMF.
PSARC 1999/606 introduced this file, and noted that its contents were
Unstable (i.e. Uncommitted), so this change is permitted in a Minor
release, at least in theory.
Summary of interface changes:
- libshare_nfs.so (Consolidation Private) will be modified to
use SMF as a back-end for properties
- libshare_autofs.so (Consolidation Private) will be created to
use SMF as a back-end for properties
- SUNWnfscr will be modified to convert from /etc/default/nfs to SMF
- SUNWatfsr will be modified to convert from /etc/default/autofs to SMF
- sysidnfs4 in the install consolidation will be changed to set SMF
properties instead of /etc/default/nfs
Doc changes:
We will engage doc writers to modify the Systems Administration Guide,
and other Docs where necessary.
Bugs will be filed to change the following man pages:
- automount(1M)
- automountd(1M)
- lockd(1M)
- mount_nfs(1M)
- nfsd(1M)
- nfsmapid(1M)
- sharectl(1M)
- autofs(4)
- nfs(4)
Related work:
What does (or will) the CIFS stuff do?
The CIFS server team is currently implementing a libshare_smb.so plugin
to use SMF to store server configuration parameters; they will never
have them in a flat file as they did in Montana. The CIFS client team
has independently created a libshare_smb.so plugin to handle CIFS
client settings by referring to the CIFS server work; attention has
been paid to make sure they will merge together well.