openstack-manuals/doc/config-reference/object-storage/section_object-storage-general-service-conf.xml
Andreas Jaeger 7eee093761 Whitespace patrol
Remove extra whitespace that slipped through.

Also, reformat config-reference/identity/section_keystone-token-binding.xml
since it was missing the usual indentations.

Change-Id: I7988f9ccaf738b6c15001947b993f0699e0a04be
2013-12-20 21:24:14 +01:00

110 lines
4.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
xml:id="swift-general-service-configuration">
<title>Object Storage general service configuration</title>
<para>
Most Object Storage services fall into two categories, Object Storage's wsgi servers
and background daemons.
</para>
<para>
Object Storage uses paste.deploy to manage server configurations. Read more at <link xlink:href="http://pythonpaste.org/deploy/">http://pythonpaste.org/deploy/</link>.
</para>
<para>
Default configuration options are set in the `[DEFAULT]` section,
and any options specified there can be overridden in any of the
other sections when the syntax <literal>set option_name = value</literal>
is in place.</para>
<para>
Configuration for servers and daemons can be expressed together in
the same file for each type of server, or separately. If a required
section for the service trying to start is missing there will be an
error. The sections not used by the service are ignored.
</para>
<para>
Consider the example of an object storage node. By convention
configuration for the object-server, object-updater,
object-replicator, and object-auditor exist in a single file
<filename>/etc/swift/object-server.conf</filename>:
</para>
<programlisting language="ini">
[DEFAULT]
[pipeline:main]
pipeline = object-server
[app:object-server]
use = egg:swift#object
[object-replicator]
reclaim_age = 259200
[object-updater]
[object-auditor]
</programlisting>
<para>
Object Storage services expect a configuration path as the first argument:
</para>
<screen><prompt>$</prompt> <userinput>swift-object-auditor</userinput>
<computeroutput>Usage: swift-object-auditor CONFIG [options]
Error: missing config path argument
</computeroutput></screen>
<para>
If you omit the object-auditor section this file can not be used
as the configuration path when starting the
<command>swift-object-auditor</command> daemon:
</para>
<screen><prompt>$</prompt> <userinput>swift-object-auditor /etc/swift/object-server.conf</userinput>
<computeroutput>Unable to find object-auditor config section in /etc/swift/object-server.conf
</computeroutput></screen>
<para>
If the configuration path is a directory instead of a file all of
the files in the directory with the file extension &quot;.conf&quot;
will be combined to generate the configuration object which is
delivered to the Object Storage service. This is referred to generally as
&quot;directory based configuration&quot;.
</para>
<para>
Directory based configuration leverages ConfigParser's native
multi-file support. Files ending in &quot;.conf&quot; in the given
directory are parsed in lexicographical order. File names starting
with '.' are ignored. A mixture of file and directory configuration
paths is not supported - if the configuration path is a file, only
that file will be parsed.
</para>
<para>
The Object Storage service management tool
<filename>swift-init</filename>
has adopted the convention of looking for
<filename>/etc/swift/{type}-server.conf.d/</filename> if the file
<filename>/etc/swift/{type}-server.conf</filename> file does not
exist.
</para>
<para>
When using directory based configuration, if the same option under
the same section appears more than once in different files, the last
value parsed is said to override previous occurrences. You can
ensure proper override precedence by prefixing the files in the
configuration directory with numerical values, as in the following
example file layout:
</para>
<programlisting>
/etc/swift/
default.base
object-server.conf.d/
000_default.conf -&gt; ../default.base
001_default-override.conf
010_server.conf
020_replicator.conf
030_updater.conf
040_auditor.conf
</programlisting>
<para>
You can inspect the resulting combined configuration object using
the <command>swift-config</command> command line tool.
</para>
</section>