Vojtech Szocs has uploaded a new change for review.
Change subject: engine: Remove UserSessionTimeOutInvalidationInterval
......................................................................
engine: Remove UserSessionTimeOutInvalidationInterval
Currently, there are two different config options
for controlling Engine user session expiration:
1. UserSessionTimeOutInterval:
- delay between Engine startup and first
execution of "cleanExpiredUsersSessions" job
- allowed values -1,1..100000 (-1 = disable)
- default value is 30 min
2. UserSessionTimeOutInvalidationInterval:
- delay between subsequent executions of
"cleanExpiredUsersSessions" job
- allowed values -1,1..100000 (-1 = disable)
- default value is 30 min
This patch removes the second config option, using
first option to represent both delay intervals.
While it makes little sense to use -1 to disable
Engine user session expiration entirely (as this
essentially generates memory leaks), this patch
preserves the original "-1,1..100000" range for
backward compatibility.
Change-Id: Ic6eb6273653bfffe0d1fa1b8a4dc39e085c19496
Signed-off-by: Vojtech Szocs <[email protected]>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
M packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
M packaging/etc/engine-config/engine-config.properties
4 files changed, 2 insertions(+), 11 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/13/23113/1
diff --git
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java
index 675ba69..79970b4 100644
---
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java
+++
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java
@@ -217,13 +217,12 @@
initExecutionMessageDirector();
Integer sessionTimeoutInterval = Config.<Integer>
getValue(ConfigValues.UserSessionTimeOutInterval);
- Integer sessionTimeOutInvalidationInterval = Config.<Integer>
getValue(ConfigValues.UserSessionTimeOutInvalidationInterval);
// negative value means session should never expire, therefore no need
to clean sessions.
if (sessionTimeoutInterval > 0) {
SchedulerUtilQuartzImpl.getInstance().scheduleAFixedDelayJob(SessionDataContainer.getInstance(),
"cleanExpiredUsersSessions", new Class[] {}, new Object[]
{},
sessionTimeoutInterval,
- sessionTimeOutInvalidationInterval, TimeUnit.MINUTES);
+ sessionTimeoutInterval, TimeUnit.MINUTES);
}
// Set start-up time
diff --git
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
index 6113ddd..acafeb9 100644
---
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
+++
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
@@ -611,10 +611,6 @@
@DefaultValueAttribute("30")
UserSessionTimeOutInterval,
- @TypeConverterAttribute(Integer.class)
- @DefaultValueAttribute("30")
- UserSessionTimeOutInvalidationInterval,
-
@Reloadable
@TypeConverterAttribute(String.class)
@DefaultValueAttribute("/data/images/rhev")
diff --git a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
index 5395c49..b802a75 100644
--- a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
+++ b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
@@ -482,7 +482,6 @@
select fn_db_add_config_value('UserDefinedVMProperties','','3.4');
select fn_db_add_config_value('UserRefreshRate','3600','general');
select fn_db_add_config_value('UserSessionTimeOutInterval','30','general');
-select
fn_db_add_config_value('UserSessionTimeOutInvalidationInterval','30','general');
select fn_db_add_config_value('UtilizationThresholdInPercent','80','general');
select fn_db_add_config_value('ValidNumOfMonitors','1,2,4','general');
select fn_db_add_config_value('VcpuConsumptionPercentage','10','general');
diff --git a/packaging/etc/engine-config/engine-config.properties
b/packaging/etc/engine-config/engine-config.properties
index 5a75619..0ebcc5f 100644
--- a/packaging/etc/engine-config/engine-config.properties
+++ b/packaging/etc/engine-config/engine-config.properties
@@ -210,10 +210,7 @@
SysPrepDefaultPassword.type=Password
UserSessionTimeOutInterval.type=Integer
UserSessionTimeOutInterval.validValues=-1,1..100000
-UserSessionTimeOutInterval.description=Session timeout interval in minutes,
after which it will be expired and clean. A negative value indicates the
session should never timeout.
-UserSessionTimeOutInvalidationInterval.type=Integer
-UserSessionTimeOutInvalidationInterval.validValues=-1,1..100000
-UserSessionTimeOutInvalidationInterval.description=Session timeout
invalidation interval in minutes. Specifies the interval in which the
invalidation check should occur.
+UserSessionTimeOutInterval.description=Timeout interval in minutes, after
which inactive user sessions expire. A negative value indicates that sessions
never expire.
AdminPassword.description="The password of the internal administrator of the
Engine"
AdminPassword.type=Password
IPTablesConfig.description="iptables configuration"
--
To view, visit http://gerrit.ovirt.org/23113
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6eb6273653bfffe0d1fa1b8a4dc39e085c19496
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches