                  DC_CONFIG_* Command Specification

The DC_CONFIG commands are daemon core TCP commands used to modify a
daemon's configuration.  DC_CONFIG_PERSIST sets the configuration
persistently, so the configuration survives daemon restarts.
DC_CONFIG_RUNTIME sets the configuration for one run, so the
configuration survives daemon reconfigs but is lost on restarts.  The
changes are not committed until a RECONFIG command is sent (or until
the daemon restarts for persistent changes).

The command format is:

   ------------------------------------
  | COMMAND | ADMIN ID | CONFIGURATION |
   ------------------------------------

where:

  COMMAND is the CEDAR integer with value DC_CONFIG_PERSIST or
    DC_CONFIG_RUNTIME

  ADMIN ID is a null terminated string which identifies the
    administrative entity making the configuration.

  CONFIGURATION is a null terminated string which contains the config
    file.  Standard Condor config file syntax is used, including
    required newlines between expression and macro definitions.

The command returns a CEDAR integer: 0 indicates success, <0 indicates
an error occurred.

There is one persistent configuration and one runtime configuration
for each admin id.  A DC_CONFIG_PERSIST command overwrites the
previous persistent configuration with the configuration specified; a
DC_CONFIG_RUNTIME command overwrites the previous runtime
configuration with the configuration specified.  To undo a
configuration, simply send a DC_CONFIG_PERSIST or DC_CONFIG_RUNTIME
command with a zero length configuration string.

The ADMIN ID field is used to allow multiple administrative entities to
manage daemon configurations.  It is the responsibility of the
administrator to ensure that these configurations do not contradict
one another.

Configuration files are processed in the following order:

  1. global configuration file
  2. local configuration files specified in global configuration file
  3. root configuration file
  4. configurations set via DC_CONFIG_PERSIST
  5. configurations set via DC_CONFIG_RUNTIME
  3. root configuration file

The ordering between persistent configurations is unspecified;
similarly for runtime configurations.  Thus, the configurations should
not contradict one another or unpredictable results will occur.

The root configuration file is processed twice to ensure that the
location of the persistent configuration files may be specified in the
root configuration file and the configuration in the root file can not
be overridden.

The persistent configuration is stored as follows.  SUBSYS_CONFIG
specifies the top level persistent config file, which contains one
line, a definition of RUNTIME_CONFIG_ADMIN, which specifies a list of
active admin ids.  SUBSYS_CONFIG has a default value of
$(LOG)/.config.$(SUBSYS).  The persistent config files are each named
$(SUBSYS_CONFIG).ADMIN_ID, where ADMIN_ID is the string specified in
the ADMIN ID field.  The SUBSYS_CONFIG file is created and maintained
automatically by the Condor configuration subsystem in response to
DC_CONFIG_* commands.  Temporary files are used with rename to
implement commit semantics for the config files, so the files should
always be consistent.
