Juan Hernandez has uploaded a new change for review.

Change subject: packaging: Make DB connection pool configurable
......................................................................

packaging: Make DB connection pool configurable

Currently the only way to change the database connections pool size is
to modify the /usr/share/ovirt-engine/service/engine-service.xml.in
file. But that file is not marked as configuration so changes are lost
when the package containing it is updated. This patch introduces two new
optional parameters in /etc/sysconfig/ovirt-engine to control the size
of the pool:

  ENGINE_DB_MIN_CONNECTIONS=1
  ENGINE_DB_MAX_CONNECTIONS=100

The default values are 1 and 100 as shown above.

Bug-Url: https://bugzilla.redhat.com/856273
Change-Id: I607e74df406128c7fd9b2e1496b3efa08e11fbac
Signed-off-by: Juan Hernandez <[email protected]>
---
M backend/manager/conf/engine.conf.defaults
M packaging/fedora/engine-service.xml.in
2 files changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/16/8216/1

diff --git a/backend/manager/conf/engine.conf.defaults 
b/backend/manager/conf/engine.conf.defaults
index 6e75dca..bdff993 100644
--- a/backend/manager/conf/engine.conf.defaults
+++ b/backend/manager/conf/engine.conf.defaults
@@ -139,3 +139,9 @@
 ENGINE_DB_SSL=false
 ENGINE_DB_USER=engine
 ENGINE_DB_PASSWORD=
+
+#
+# Size of the database connection pool:
+#
+ENGINE_DB_MIN_CONNECTIONS=1
+ENGINE_DB_MAX_CONNECTIONS=100
diff --git a/packaging/fedora/engine-service.xml.in 
b/packaging/fedora/engine-service.xml.in
index 00b3b1b..f2a7e8a 100644
--- a/packaging/fedora/engine-service.xml.in
+++ b/packaging/fedora/engine-service.xml.in
@@ -91,8 +91,8 @@
           <driver>postgresql</driver>
           
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
           <pool>
-            <min-pool-size>1</min-pool-size>
-            <max-pool-size>100</max-pool-size>
+            
<min-pool-size>$getInteger('ENGINE_DB_MIN_CONNECTIONS')</min-pool-size>
+            
<max-pool-size>$getInteger('ENGINE_DB_MAX_CONNECTIONS')</max-pool-size>
             <prefill>true</prefill>
           </pool>
           <security>


--
To view, visit http://gerrit.ovirt.org/8216
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I607e74df406128c7fd9b2e1496b3efa08e11fbac
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to