← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1243277] Re: timeout logic causes logout when load balanced

 

** Changed in: horizon/havana
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1243277

Title:
  timeout logic causes logout when load balanced

Status in OpenStack Dashboard (Horizon):
  Fix Released
Status in OpenStack Dashboard (Horizon) havana series:
  Fix Released

Bug description:
  The session timeout code in the horizon/middleware.py can cause
  inappropriate timeouts/logouts when running Horizon behind a load
  balancer on two machines that are slightly out of sync time-wise.

  Results in redirection to the login screen and Session expired error
  if not fixed.

  Example with 3 minute time difference:
    import datetime

    timestamp = datetime.datetime.now()

    day_one = datetime.datetime(2007, 12, 5, 9, 1, 1)
    day_two = datetime.datetime(2007, 12, 5, 9, 5, 1)

    print (day_one - day_two).seconds
    print (day_two - day_one).seconds

    print abs((day_one - day_two).total_seconds())  // apparently no total_seconds in python 2.6
    print abs((day_two - day_one).total_seconds())

    print abs(day_one - day_two).seconds
    print abs(day_two - day_one).seconds

  Output:
    86160
    240
    240.0
    240.0
    240
    240

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1243277/+subscriptions