Ravi Nori has uploaded a new change for review.

Change subject: core : Automatic logout does not always happen as per 
UserSessionTimeOutInterval value
......................................................................

core : Automatic logout does not always happen as per 
UserSessionTimeOutInterval value

After setting UserSessionTimeOutInterval value, automatic logout
does not always happen after the set period for inactivity.
It takes much longer than the time set by the
UserSessionTimeOutInterval parameter.

Change-Id: I4866a28749b0ae1313c07bdbf22779b711892026
Bug-Url: https://bugzilla.redhat.com/953614
Signed-off-by: Ravi Nori <[email protected]>
---
M backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql
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/etc/engine-config/engine-config.properties
4 files changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/04/15804/1

diff --git a/backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql 
b/backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql
index 7695d3c..4b120df 100644
--- a/backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql
+++ b/backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql
@@ -474,6 +474,7 @@
 select fn_db_add_config_value('UserDefinedVMProperties','','3.3');
 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');
 --Handling Use Secure Connection with Hosts
 select 
fn_db_add_config_value('UseSecureConnectionWithServers','true','general');
 select fn_db_add_config_value('UtilizationThresholdInPercent','80','general');
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 f1b2745..d61edb7 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
@@ -201,12 +201,13 @@
         initExecutionMessageDirector();
 
         Integer sessionTimoutInterval = 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 (sessionTimoutInterval > 0) {
             
SchedulerUtilQuartzImpl.getInstance().scheduleAFixedDelayJob(SessionDataContainer.getInstance(),
                     "cleanExpiredUsersSessions", new Class[] {}, new Object[] 
{},
                     sessionTimoutInterval,
-                    sessionTimoutInterval, TimeUnit.MINUTES);
+                    sessionTimeOutInvalidationInterval, TimeUnit.MINUTES);
         }
         // Set start-up time
         _startedAt = DateTime.getNow();
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 9b6d02b..a85d360 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
@@ -622,6 +622,10 @@
     @DefaultValueAttribute("30")
     UserSessionTimeOutInterval(269),
 
+    @TypeConverterAttribute(Integer.class)
+    @DefaultValueAttribute("30")
+    UserSessionTimeOutInvalidationInterval(270),
+
     @Reloadable
     @TypeConverterAttribute(String.class)
     @DefaultValueAttribute("/data/images/rhev")
diff --git a/packaging/etc/engine-config/engine-config.properties 
b/packaging/etc/engine-config/engine-config.properties
index 910f9f6..420af5e 100644
--- a/packaging/etc/engine-config/engine-config.properties
+++ b/packaging/etc/engine-config/engine-config.properties
@@ -201,6 +201,9 @@
 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.
 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/15804
To unsubscribe, visit http://gerrit.ovirt.org/settings

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

Reply via email to