]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4489] Added log statements when host database is read-only.
authorMarcin Siodelski <marcin@isc.org>
Fri, 29 Jul 2016 07:55:40 +0000 (09:55 +0200)
committerMarcin Siodelski <marcin@isc.org>
Fri, 29 Jul 2016 07:55:40 +0000 (09:55 +0200)
src/lib/dhcpsrv/dhcpsrv_messages.mes
src/lib/dhcpsrv/mysql_host_data_source.cc
src/lib/dhcpsrv/pgsql_host_data_source.cc

index 714148548c1931664a18b2c4a50529e20221489e..7bf0ba22ad8f5432a67d7dbf1b0db4467fd7238f 100644 (file)
@@ -551,6 +551,12 @@ connection including database name and username needed to access it
 A debug message issued when the server is about to obtain schema version
 information from the MySQL hosts database.
 
+% DHCPSRV_MYSQL_HOST_DB_READONLY MySQL host database operates in read-only mode
+This informational message is issued when the user has configured the PostgreSQL
+database in read-only mode. Kea will not be able to insert or modify
+host reservations but will be able to retrieve existing ones and
+assign them to the clients communicating with the server.
+
 % DHCPSRV_MYSQL_ROLLBACK rolling back MySQL database
 The code has issued a rollback call.  All outstanding transaction will
 be rolled back and not committed to the database.
@@ -696,6 +702,12 @@ V6) is about to open a PostgreSQL hosts database.  The parameters of the
 connection including database name and username needed to access it
 (but not the password if any) are logged.
 
+% DHCPSRV_PGSQL_HOST_DB_READONLY PostgreSQL host database operates in read-only mode
+This informational message is issued when the user has configured the PostgreSQL
+database in read-only mode. Kea will not be able to insert or modify
+host reservations but will be able to retrieve existing ones and
+assign them to the clients communicating with the server.
+
 % DHCPSRV_PGSQL_ROLLBACK rolling back PostgreSQL database
 The code has issued a rollback call.  All outstanding transaction will
 be rolled back and not committed to the database.
index 0b98fdbfb11a6294feb9b0dd16c4b52a43416218..30d40624c5ff9dc6d0a3807246215fa824ffda46 100644 (file)
@@ -2013,6 +2013,8 @@ MySqlHostDataSourceImpl(const MySqlConnection::ParameterMap& parameters)
         conn_.prepareStatements(tagged_statements.begin() + WRITE_STMTS_BEGIN,
                                 tagged_statements.end(),
                                 tagged_statements.size());
+    } else {
+        LOG_INFO(dhcpsrv_logger, DHCPSRV_MYSQL_HOST_DB_READONLY);
     }
 }
 
index 5fac1830a68ce83489e7d9acffeb9787a4fc2f78..d134d3c76623fa19e732ea33ed9d1c126977e878 100644 (file)
@@ -1511,6 +1511,9 @@ PgSqlHostDataSourceImpl(const PgSqlConnection::ParameterMap& parameters)
     if (!is_readonly_) {
         conn_.prepareStatements(tagged_statements.begin() + WRITE_STMTS_BEGIN,
                                 tagged_statements.end());
+
+    } else {
+        LOG_INFO(dhcpsrv_logger, DHCPSRV_PGSQL_HOST_DB_READONLY);
     }
 }