[OpenAFS-devel] hackathon notes: server and client config files
Michael Meffie
mmeffie@sinenomine.net
Wed, 27 Apr 2011 09:47:09 -0400
The topic of configuration files was discussed at the hackathon in Pittsburgh.
For various reasons, we like to adopt plain text configuration files for server
and client configuration files.
In preparation, Simon has been updating the server command line handling code
to use the libcmd library. Positional arguments and option abbreviations do not
make sense and will not be implemented for server command line arguments,
however this approach allows us to be able to set defaults in config files and
then override those with command line arguments.
The proposed approach will be to use kerberos style ini files for servers and
clients. The parsing code from roken will be used to read these files. The
A single core section will provide common defaults which will be inherited by
individual program types. A section per program type will be defined for
program specific options and to override common core values. Example program
sections will be named after the binary name, eg 'fileserver', 'ptserver', etc
(without any dafs or other prefixes). To keep this manageable, only one level
of inheritance will be done.
The types of data which will be stored in the config files are:
* thiscell and cellservdb data
* the current various server command line options
* other misc configurations and options
The BosConfig file will not be changed at this point, since that is actually
bosserver application state.
A tool will be make to convert between old and new cellservdb formats.
Some examples from the whiteboard illustrate this approach:
[core]
thiscell = andrew.cmu.edu
use_dns = yes
[cells]
andrew.edu = {
description = "Project Andrew - CMU"
vlserver = tcp/128.2.10.2
ptserver = udp/128.2.10.11
dbserver = 128.1.10.7
dbserver = FF00::128.2.10.28
dbserver = db3.andrew.cmu.edu
use_dns = yes
}
[ptserver]
servers = {
vice2 = {
address = 128.2.10.2:7002
priority = 2
}
}
[fileserver]
dbservers = {
# the vlserver to register with on startup
vlserver = vice7
}
# For cache managers the server ranks will be
# in a separate section, so it can be #included
# and managed as a separate physical file
[rank]
# syntax for host addresses:
# [proto/]host[/mask][:port]
128.2.10.2 = 2000
tcp/128.2.10.11 = 9000
128.2.10.2 = 2000
128.2.10.12:7003 = 1500
128.2.172/22 = 100