mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 06:25:34 +00:00
changes after review
This commit is contained in:
@@ -257,11 +257,74 @@
|
|||||||
// Port on which the database is available.
|
// Port on which the database is available.
|
||||||
"port": 3306,
|
"port": 3306,
|
||||||
|
|
||||||
// Type of the database, e.g. "mysql", "pgsql", "cql".
|
// Type of the database, e.g. "mysql", "postgresql", "cql".
|
||||||
"type": "mysql",
|
"type": "mysql",
|
||||||
|
|
||||||
// User name to be used to access the database.
|
// User name to be used to access the database.
|
||||||
"user": "kea"
|
"user": "kea"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Name of the database to connect to.
|
||||||
|
"name": "kea",
|
||||||
|
|
||||||
|
// Host on which the database resides.
|
||||||
|
"host": "localhost",
|
||||||
|
|
||||||
|
// Database password.
|
||||||
|
"password": "kea",
|
||||||
|
|
||||||
|
// Port on which the database is available.
|
||||||
|
"port": 5432,
|
||||||
|
|
||||||
|
// Type of the database, e.g. "mysql", "postgresql", "cql".
|
||||||
|
"type": "postgresql",
|
||||||
|
|
||||||
|
// User name to be used to access the database.
|
||||||
|
"user": "kea"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Name of the database to connect to.
|
||||||
|
"keyspace": "kea",
|
||||||
|
|
||||||
|
// Host on which the database resides.
|
||||||
|
"contact-points": "127.0.0.1",
|
||||||
|
|
||||||
|
// Database password.
|
||||||
|
"password": "kea",
|
||||||
|
|
||||||
|
// Port on which the database is available.
|
||||||
|
"port": 9042,
|
||||||
|
|
||||||
|
// Type of the database, e.g. "mysql", "postgresql", "cql".
|
||||||
|
"type": "cql",
|
||||||
|
|
||||||
|
// User name to be used to access the database.
|
||||||
|
"user": "kea",
|
||||||
|
|
||||||
|
// Consistency level for all queries.
|
||||||
|
// Supported values: any, one, two, three, quorum, all,
|
||||||
|
// local-quorum, each-quorum, serial, local-serial, local-one.
|
||||||
|
"consistency": "quorum",
|
||||||
|
|
||||||
|
// Serial consistency level for all queries.
|
||||||
|
// Supported values: any, one, two, three, quorum, all,
|
||||||
|
// local-quorum, each-quorum, serial, local-serial, local-one.
|
||||||
|
"serial-consistency": "serial",
|
||||||
|
|
||||||
|
// Connection reconnect wait time.
|
||||||
|
"reconnect-wait-time": 100,
|
||||||
|
|
||||||
|
// Connection connect timeout.
|
||||||
|
"connect-timeout": 100,
|
||||||
|
|
||||||
|
// Connection request timeout.
|
||||||
|
"request-timeout": 100,
|
||||||
|
|
||||||
|
// Connection tcp keepalive.
|
||||||
|
"tcp-keepalive": 100,
|
||||||
|
|
||||||
|
// Connection tcp nodelay.
|
||||||
|
"tcp-nodelay": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -332,8 +395,8 @@
|
|||||||
// because non stored leases will be lost upon Kea server restart.
|
// because non stored leases will be lost upon Kea server restart.
|
||||||
"persist": true,
|
"persist": true,
|
||||||
|
|
||||||
// Lease database backend type, i.e. "memfile", "mysql", "pgsql"
|
// Lease database backend type, i.e. "memfile", "mysql",
|
||||||
// or "cql".
|
// "postgresql" or "cql".
|
||||||
"type": "memfile"
|
"type": "memfile"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -677,7 +740,7 @@
|
|||||||
// Name of the database to connect to.
|
// Name of the database to connect to.
|
||||||
"name": "config",
|
"name": "config",
|
||||||
|
|
||||||
// Type of the database, e.g. "mysql", "pgsql", "cql".
|
// Type of the database, e.g. "mysql", "postgresql", "cql".
|
||||||
"type": "mysql"
|
"type": "mysql"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@@ -257,7 +257,7 @@
|
|||||||
// Port on which the database is available.
|
// Port on which the database is available.
|
||||||
"port": 3306,
|
"port": 3306,
|
||||||
|
|
||||||
// Type of the database, e.g. "mysql", "pgsql", "cql".
|
// Type of the database, e.g. "mysql", "postgresql", "cql".
|
||||||
"type": "mysql",
|
"type": "mysql",
|
||||||
|
|
||||||
// User name to be used to access the database.
|
// User name to be used to access the database.
|
||||||
@@ -332,8 +332,8 @@
|
|||||||
// because non stored leases will be lost upon Kea server restart.
|
// because non stored leases will be lost upon Kea server restart.
|
||||||
"persist": true,
|
"persist": true,
|
||||||
|
|
||||||
// Lease database backend type, i.e. "memfile", "mysql", "pgsql"
|
// Lease database backend type, i.e. "memfile", "mysql",
|
||||||
// or "cql".
|
// "postgresql" or "cql".
|
||||||
"type": "memfile"
|
"type": "memfile"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -674,7 +674,7 @@
|
|||||||
// Name of the database to connect to.
|
// Name of the database to connect to.
|
||||||
"name": "config",
|
"name": "config",
|
||||||
|
|
||||||
// Type of the database, e.g. "mysql", "pgsql", "cql".
|
// Type of the database, e.g. "mysql", "postgresql", "cql".
|
||||||
"type": "mysql"
|
"type": "mysql"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@@ -51,7 +51,7 @@
|
|||||||
// password is not necessary to connect and that timeout is 5 seconds.
|
// password is not necessary to connect and that timeout is 5 seconds.
|
||||||
// Kea must be compiled with --with-pgsql option to use this backend.
|
// Kea must be compiled with --with-pgsql option to use this backend.
|
||||||
// "lease-database": {
|
// "lease-database": {
|
||||||
// "type": "pgsql",
|
// "type": "postgresql",
|
||||||
// "name": "keatest",
|
// "name": "keatest",
|
||||||
// "host": "localhost",
|
// "host": "localhost",
|
||||||
// "port": 5432,
|
// "port": 5432,
|
||||||
|
@@ -213,11 +213,74 @@
|
|||||||
// Port on which the database is available.
|
// Port on which the database is available.
|
||||||
"port": 3306,
|
"port": 3306,
|
||||||
|
|
||||||
// Type of the database, e.g. "mysql", "pgsql", "cql".
|
// Type of the database, e.g. "mysql", "postgresql", "cql".
|
||||||
"type": "mysql",
|
"type": "mysql",
|
||||||
|
|
||||||
// User name to be used to access the database.
|
// User name to be used to access the database.
|
||||||
"user": "kea"
|
"user": "kea"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Name of the database to connect to.
|
||||||
|
"name": "kea",
|
||||||
|
|
||||||
|
// Host on which the database resides.
|
||||||
|
"host": "localhost",
|
||||||
|
|
||||||
|
// Database password.
|
||||||
|
"password": "kea",
|
||||||
|
|
||||||
|
// Port on which the database is available.
|
||||||
|
"port": 5432,
|
||||||
|
|
||||||
|
// Type of the database, e.g. "mysql", "postgresql", "cql".
|
||||||
|
"type": "postgresql",
|
||||||
|
|
||||||
|
// User name to be used to access the database.
|
||||||
|
"user": "kea"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Name of the database to connect to.
|
||||||
|
"keyspace": "kea",
|
||||||
|
|
||||||
|
// Host on which the database resides.
|
||||||
|
"contact-points": "127.0.0.1",
|
||||||
|
|
||||||
|
// Database password.
|
||||||
|
"password": "kea",
|
||||||
|
|
||||||
|
// Port on which the database is available.
|
||||||
|
"port": 9042,
|
||||||
|
|
||||||
|
// Type of the database, e.g. "mysql", "postgresql", "cql".
|
||||||
|
"type": "cql",
|
||||||
|
|
||||||
|
// User name to be used to access the database.
|
||||||
|
"user": "kea",
|
||||||
|
|
||||||
|
// Consistency level for all queries.
|
||||||
|
// Supported values: any, one, two, three, quorum, all,
|
||||||
|
// local-quorum, each-quorum, serial, local-serial, local-one.
|
||||||
|
"consistency": "quorum",
|
||||||
|
|
||||||
|
// Serial consistency level for all queries.
|
||||||
|
// Supported values: any, one, two, three, quorum, all,
|
||||||
|
// local-quorum, each-quorum, serial, local-serial, local-one.
|
||||||
|
"serial-consistency": "serial",
|
||||||
|
|
||||||
|
// Connection reconnect wait time.
|
||||||
|
"reconnect-wait-time": 100,
|
||||||
|
|
||||||
|
// Connection connect timeout.
|
||||||
|
"connect-timeout": 100,
|
||||||
|
|
||||||
|
// Connection request timeout.
|
||||||
|
"request-timeout": 100,
|
||||||
|
|
||||||
|
// Connection tcp keepalive.
|
||||||
|
"tcp-keepalive": 100,
|
||||||
|
|
||||||
|
// Connection tcp nodelay.
|
||||||
|
"tcp-nodelay": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -271,8 +334,8 @@
|
|||||||
// because non stored leases will be lost upon Kea server restart.
|
// because non stored leases will be lost upon Kea server restart.
|
||||||
"persist": true,
|
"persist": true,
|
||||||
|
|
||||||
// Lease database backend type, i.e. "memfile", "mysql", "pgsql"
|
// Lease database backend type, i.e. "memfile", "mysql",
|
||||||
// or "cql".
|
// "postgresql" or "cql".
|
||||||
"type": "memfile"
|
"type": "memfile"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -633,7 +696,7 @@
|
|||||||
// Name of the database to connect to.
|
// Name of the database to connect to.
|
||||||
"name": "config",
|
"name": "config",
|
||||||
|
|
||||||
// Type of the database, e.g. "mysql", "pgsql", "cql".
|
// Type of the database, e.g. "mysql", "postgresql", "cql".
|
||||||
"type": "mysql"
|
"type": "mysql"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@@ -213,7 +213,7 @@
|
|||||||
// Port on which the database is available.
|
// Port on which the database is available.
|
||||||
"port": 3306,
|
"port": 3306,
|
||||||
|
|
||||||
// Type of the database, e.g. "mysql", "pgsql", "cql".
|
// Type of the database, e.g. "mysql", "postgresql", "cql".
|
||||||
"type": "mysql",
|
"type": "mysql",
|
||||||
|
|
||||||
// User name to be used to access the database.
|
// User name to be used to access the database.
|
||||||
@@ -271,8 +271,8 @@
|
|||||||
// because non stored leases will be lost upon Kea server restart.
|
// because non stored leases will be lost upon Kea server restart.
|
||||||
"persist": true,
|
"persist": true,
|
||||||
|
|
||||||
// Lease database backend type, i.e. "memfile", "mysql", "pgsql"
|
// Lease database backend type, i.e. "memfile", "mysql",
|
||||||
// or "cql".
|
// "postgresql" or "cql".
|
||||||
"type": "memfile"
|
"type": "memfile"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -630,7 +630,7 @@
|
|||||||
// Name of the database to connect to.
|
// Name of the database to connect to.
|
||||||
"name": "config",
|
"name": "config",
|
||||||
|
|
||||||
// Type of the database, e.g. "mysql", "pgsql", "cql".
|
// Type of the database, e.g. "mysql", "postgresql", "cql".
|
||||||
"type": "mysql"
|
"type": "mysql"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@@ -51,7 +51,7 @@
|
|||||||
// password is not necessary to connect and that timeout is 5 seconds.
|
// password is not necessary to connect and that timeout is 5 seconds.
|
||||||
// Kea must be compiled with --with-pgsql option to use this backend.
|
// Kea must be compiled with --with-pgsql option to use this backend.
|
||||||
// "lease-database": {
|
// "lease-database": {
|
||||||
// "type": "pgsql",
|
// "type": "postgresql",
|
||||||
// "name": "keatest",
|
// "name": "keatest",
|
||||||
// "host": "localhost",
|
// "host": "localhost",
|
||||||
// "port": 5432,
|
// "port": 5432,
|
||||||
|
@@ -150,7 +150,7 @@ CqlConnection::openDatabase() {
|
|||||||
sconsistency = getParameter("consistency");
|
sconsistency = getParameter("consistency");
|
||||||
consistency = sconsistency.c_str();
|
consistency = sconsistency.c_str();
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
// No user. Fine, we'll use NULL.
|
// No consistency. Fine, we'll use "quorum".
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* serial_consistency = NULL;
|
const char* serial_consistency = NULL;
|
||||||
@@ -159,7 +159,7 @@ CqlConnection::openDatabase() {
|
|||||||
sserial_consistency = getParameter("serial-consistency");
|
sserial_consistency = getParameter("serial-consistency");
|
||||||
serial_consistency = sserial_consistency.c_str();
|
serial_consistency = sserial_consistency.c_str();
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
// No user. Fine, we'll use NULL.
|
// No serial consistency. Fine, we'll use "serial".
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* reconnect_wait_time = NULL;
|
const char* reconnect_wait_time = NULL;
|
||||||
|
@@ -145,15 +145,6 @@ module kea-dhcp-types {
|
|||||||
description "Cassandra database keyspace (this is Cassandra's equivalent
|
description "Cassandra database keyspace (this is Cassandra's equivalent
|
||||||
of a database name).";
|
of a database name).";
|
||||||
}
|
}
|
||||||
leaf consistency {
|
|
||||||
type string;
|
|
||||||
description "Consistency level.";
|
|
||||||
}
|
|
||||||
leaf serial-consistency {
|
|
||||||
type string;
|
|
||||||
description "Serial consistency level which manages lightweight
|
|
||||||
transaction isolation.";
|
|
||||||
}
|
|
||||||
leaf max-reconnect-tries {
|
leaf max-reconnect-tries {
|
||||||
type uint32;
|
type uint32;
|
||||||
description "Maximum of recovery attempts before exit.";
|
description "Maximum of recovery attempts before exit.";
|
||||||
|
Reference in New Issue
Block a user