Browse Source

[master] Merge branch 'trac4282'

Marcin Siodelski 8 years ago
parent
commit
f287991977
3 changed files with 69 additions and 80 deletions
  1. 15 10
      doc/guide/admin.xml
  2. 27 35
      doc/guide/dhcp4-srv.xml
  3. 27 35
      doc/guide/dhcp6-srv.xml

+ 15 - 10
doc/guide/admin.xml

@@ -145,7 +145,7 @@
     </para>
   </section>
 
-  <section>
+  <section id="supported-databases">
     <title>Supported Databases</title>
 
     <para>The following table presents the capabilities of available
@@ -410,12 +410,6 @@ $ <userinput>kea-admin lease-upgrade mysql -u <replaceable>database-user</replac
       <title>PostgreSQL</title>
 
       <para>
-        PostgreSQL is able to store leases. The capability to store host
-        reservations (that include addresses, prefixes and options) is planned
-        for upcoming Kea 1.1.0.
-      </para>
-
-      <para>
         A PostgreSQL database must be set up if you want Kea to store
         lease and other information in PostgreSQL. This step can be
         safely ignored if you are using other database backends.
@@ -574,9 +568,20 @@ $ <userinput>kea-admin lease-init pgsql -u <replaceable>database-user</replaceab
       <section id="pgsql-upgrade">
         <title>Upgrading a PostgreSQL Database from an Earlier Version of Kea</title>
         <para>
-          Currently, PostgreSQL only supports Kea schema version 1.0 so no upgrades
-          are available.  As upgrades become available, <command>kea-admin</command>
-          will support them.
+          The PostgreSQL database schema can be upgraded using the same tool and
+          commands as described in <xref linkend="mysql-upgrade"/>, with the
+          exception that the "pgsql" database backend type must be used in
+          the commands.
+        </para>
+        <para>
+          Use the following command to check the current schema version:
+<screen>
+$ <userinput>kea-admin lease-version pgsql -u <replaceable>database-user</replaceable> -p <replaceable>database-password</replaceable> -n <replaceable>database-name</replaceable></userinput>
+</screen>
+          Use the following command to perform an upgrade:
+<screen>
+$ <userinput>kea-admin lease-upgrade pgsql -u <replaceable>database-user</replaceable> -p <replaceable>database-password</replaceable> -n <replaceable>database-name</replaceable></userinput>
+</screen>
         </para>
       </section>
     </section> <!-- end of PostgreSQL sections -->

+ 27 - 35
doc/guide/dhcp4-srv.xml

@@ -439,7 +439,7 @@ be followed by a comma and another object definition.</para>
 "Dhcp4": { "lease-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
 </screen>
   Next, the name of the database to hold the leases must be set: this is the
-  name used when the lease database was created
+  name used when the database was created
   (see <xref linkend="mysql-database-create"/>,
   <xref linkend="pgsql-database-create"/> or
   <xref linkend="cql-database-create"/>).
@@ -482,41 +482,39 @@ If a timeout is given though, it should be an integer greater than zero.
   <title id="hosts4-storage">Hosts Storage</title>
 
     <para>Kea is also able to store information about host reservations in the
-    database. Hosts database configuration uses the same syntax as lease
-    database. In fact, Kea server opens independent connections for each
-    purpose, be it lease or hosts information. This gives the solution most
+    database. The hosts database configuration uses the same syntax as the lease
+    database. In fact, a Kea server opens independent connections for each
+    purpose, be it lease or hosts information. This arrangement gives the most
     flexibility. Kea can be used to keep leases and host reservations
-    separately, but can also point to the same database. Currently the only
-    supported hosts database type is MySQL.</para>
+    separately, but can also point to the same database. Currently the
+    supported hosts database types are MySQL and PostgreSQL. Cassandra
+    backend does not support host reservations yet.</para>
 
-    <para>Please note that usage of hosts storage is optional. User can define
+    <para>Please note that usage of hosts storage is optional. A user can define
     all host reservations in the configuration file. That is the recommended way
-    if the number of reservations is small. However, with the number of
-    reservations growing it's more convenient to use host storage. Please note
-    that both storages (configuration file and MySQL) can be used together. If
-    hosts are defined in both places, the definitions from configuration file
-    are checked first and external storage is checked later, if
-    necessary.</para>
-
-    <para>All hosts leases issued by the server are stored in the hosts
-    database. Currently there is only one available backend: MySQL. Other host
-    backends will become available in future Kea versions.</para>
+    if the number of reservations is small. However, when the number of
+    reservations grows it's more convenient to use host storage. Please note
+    that both storage methods (configuration file and one of the supported databases)
+    can be used together. If hosts are defined in both places, the definitions
+    from the configuration file are checked first and external storage is checked
+    later, if necessary.</para>
 
 <section id="hosts-database-configuration4">
-  <title>IPv4 Hosts Database Configuration</title>
+  <title>DHCPv4 Hosts Database Configuration</title>
 
   <para>Hosts database configuration is controlled through the Dhcp4/hosts-database
-  parameters. If enabled, the type of the database must be set to "mysql". Other
-  hosts backends may be added in later Kea versions.
+  parameters. If enabled, the type of the database must be set to "mysql" or
+  "postgresql". Other hosts backends may be added in later Kea versions.
 <screen>
 "Dhcp4": { "hosts-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
 </screen>
-  Next, the name of the database to hold the leases must be set: this is the
-  name used when the lease database was created (see <xref linkend="mysql-database-create"/>).
+  Next, the name of the database to hold the reservations must be set: this is the
+  name used when the lease database was created (see <xref linkend="supported-databases"/>
+  for instructions how to setup desired database type).
 <screen>
 "Dhcp4": { "hosts-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
 </screen>
-  If the database is located on a different system to the DHCPv4 server, the
+  If the database is located on a different system than the DHCPv4 server, the
   database host name must also be specified (although it should be noted that this
   configuration may have a severe impact on server performance):
 <screen>
@@ -2824,26 +2822,20 @@ It is merely echoed by the server
 
     </section>
 
-    <section id="reservations4-mysql">
-      <title>Storing host reservations in MySQL</title>
+    <section id="reservations4-mysql-pgsql">
+      <title>Storing host reservations in MySQL or PostgreSQL</title>
 
       <para>
-        It is possible to store host reservations in MySQL. See <xref
+        It is possible to store host reservations in MySQL or PostgreSQL. See <xref
         linkend="hosts4-storage" /> for information on how to configure Kea to use
-        reservations stored in MySQL. Kea does not provide any dedicated tools
-        for managing MySQL reservations. See Kea wiki <ulink
+        reservations stored in MySQL or PostgreSQL. Kea does not provide any dedicated
+        tools for managing reservations in a database. See Kea wiki <ulink
         url="http://kea.isc.org/wiki/HostReservationsHowTo" /> for detailed
         information and examples of how reservations can be inserted into the
         database.
       </para>
     </section>
 
-    <section id="reservations4-pgsql">
-      <title>Storing host reservations in PostgreSQL</title>
-      <para>Kea currently does not support storing reservations in
-      PostgreSQL, but this feature is planned for Kea 1.1.0.</para>
-    </section>
-
     <section id="reservations4-cql">
       <title>Storing host reservations in CQL (Cassandra)</title>
       <para>Kea currently does not support storing reservations in
@@ -2852,7 +2844,7 @@ It is merely echoed by the server
 
 
     <section id="reservations4-tuning">
-      <title>Fine Tuning IPv4 Host Reservation</title>
+      <title>Fine Tuning DHCPv4 Host Reservation</title>
 
       <para>Host reservation capability introduces additional restrictions for the
       allocation engine during lease selection and renewal. In particular, three

+ 27 - 35
doc/guide/dhcp6-srv.xml

@@ -440,7 +440,7 @@ be followed by a comma and another object definition.</para>
 "Dhcp6": { "lease-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
 </screen>
   Next, the name of the database is to hold the leases must be set: this is the
-  name used when the lease database was created
+  name used when the database was created
   (see <xref linkend="mysql-database-create"/>,
   <xref linkend="pgsql-database-create"/>
   or <xref linkend="cql-database-create"/>).
@@ -482,41 +482,39 @@ If a timeout is given though, it should be an integer greater than zero.
 <section id="hosts6-storage">
   <title>Hosts Storage</title>
     <para>Kea is also able to store information about host reservations in the
-    database. Hosts database configuration uses the same syntax as lease
-    database. In fact, Kea server opens independent connections for each
-    purpose, be it lease or hosts information. This gives the solution most
+    database. The hosts database configuration uses the same syntax as the lease
+    database. In fact, a Kea server opens independent connections for each
+    purpose, be it lease or hosts information. This arrangment gives the most
     flexibility. Kea can be used to keep leases and host reservations
-    separately, but can also point to the same database. Currently the only
-    supported hosts database type is MySQL.</para>
+    separately, but can also point to the same database. Currently the
+    supported hosts database types are MySQL and PostgreSQL. Cassandra
+    backend does not support host reservations yet.</para>
 
-    <para>Please note that usage of hosts storage is optional. User can define
+    <para>Please note that usage of hosts storage is optional. A user can define
     all host reservations in the configuration file. That is the recommended way
-    if the number of reservations is small. However, with the number of
-    reservations growing it's more convenient to use host storage. Please note
-    that both storages (configuration file and MySQL) can be used together. If
-    hosts are defined in both places, the definitions from configuration file
-    are checked first and external storage is checked later, if
-    necessary.</para>
-
-    <para>All hosts leases issued by the server are stored in the hosts
-    database. Currently there is only one available backend: MySQL. Other host
-    backends will become available in future Kea versions.</para>
+    if the number of reservations is small. However, when the number of
+    reservations grows it's more convenient to use host storage. Please note
+    that both storage methods (configuration file and one of the supported databases)
+    can be used together. If hosts are defined in both places, the definitions
+    from the configuration file are checked first and external storage is checked
+    later, if necessary.</para>
 
 <section id="hosts-database-configuration6">
-  <title>IPv6 Hosts Database Configuration</title>
+  <title>DHCPv6 Hosts Database Configuration</title>
 
   <para>Hosts database configuration is controlled through the Dhcp6/hosts-database
-  parameters. If enabled, the type of the database must be set to "mysql". Other
-  hosts backends may be added in later Kea versions.
+  parameters. If enabled, the type of the database must be set to "mysql" or
+  "postgresql". Other hosts backends may be added in later Kea versions.
 <screen>
 "Dhcp6": { "hosts-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
 </screen>
-  Next, the name of the database to hold the leases must be set: this is the
-  name used when the lease database was created (see <xref linkend="mysql-database-create"/>).
+  Next, the name of the database to hold the reservations must be set: this is the
+  name used when the database was created  (see <xref linkend="supported-databases"/>
+  for instructions how to setup desired database type).
 <screen>
 "Dhcp6": { "hosts-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
 </screen>
-  If the database is located on a different system to the DHCPv6 server, the
+  If the database is located on a different system than the DHCPv6 server, the
   database host name must also be specified (although it should be noted that this
   configuration may have a severe impact on server performance):
 <screen>
@@ -2560,26 +2558,20 @@ should include options from the isc option space:
 
     </section>
 
-    <section id="reservations6-mysql">
-      <title>Storing host reservations in MySQL</title>
+    <section id="reservations6-mysql-pgsql">
+      <title>Storing host reservations in MySQL or PostgreSQL</title>
 
       <para>
-        It is possible to store host reservations in MySQL. See <xref
+        It is possible to store host reservations in MySQL or PostgreSQL. See <xref
         linkend="hosts6-storage" /> for information how to configure Kea to use
-        reservations stored in MySQL. Kea does not provide any dedicated tools
-        for managing MySQL reservations. See Kea wiki <ulink
+        reservations stored in MySQL or PostgreSQL. Kea does not provide any dedicated
+        tools for managing reservations in a database. See Kea wiki <ulink
         url="http://kea.isc.org/wiki/HostReservationsHowTo" /> for detailed
         information and examples of how reservations can be inserted into the
         database.
       </para>
     </section>
 
-    <section id="reservations6-pgsql">
-      <title>Storing host reservations in PostgreSQL</title>
-      <para>Kea currently does not support storing reservations in
-      PostgreSQL, but this feature is planned for Kea 1.1.0.</para>
-    </section>
-
     <section id="reservations6-cql">
       <title>Storing host reservations in CQL (Cassandra)</title>
       <para>Kea currently does not support storing reservations in
@@ -2587,7 +2579,7 @@ should include options from the isc option space:
     </section>
 
     <section id="reservations6-tuning">
-      <title>Fine Tuning IPv6 Host Reservation</title>
+      <title>Fine Tuning DHCPv6 Host Reservation</title>
 
       <para>Host reservation capability introduces additional restrictions for the
       allocation engine during lease selection and renewal. In particular, three