Lack of memcached oopses login

Bug #1377178 reported by Simon Davy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical SSO provider
New
Undecided
Unassigned

Bug Description

If memached is unavailable for any reason, login fails in the rate limiting code.

It would be better if sso handled this more gracefully, albiet with degraded functionality.

ValueError "Key ':1:rl-86.10.217.127-de0da8968b776ff204592d442ac793a37abeef2f-201410030918' not found"
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/lib/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/lib/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/lib/django/utils/decorators.py", line 29, in _wrapper
    return bound_func(*args, **kwargs)
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/src/webui/decorators.py", line 52, in _redirect_home_if_logged_in
    return func(request, *args, **kwargs)
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/lib/django/utils/decorators.py", line 25, in bound_func
    return func(self, *args2, **kwargs2)
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/lib/django/utils/decorators.py", line 29, in _wrapper
    return bound_func(*args, **kwargs)
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/src/webui/decorators.py", line 58, in _dont_cache_decorator
    response = func(request, *args, **kwargs)
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/lib/django/utils/decorators.py", line 25, in bound_func
    return func(self, *args2, **kwargs2)
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/lib/django/utils/decorators.py", line 29, in _wrapper
    return bound_func(*args, **kwargs)
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/src/webui/decorators.py", line 198, in wrapper
    return self.view_wrapper(request, fn, *args, **kwargs)
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/src/webui/decorators.py", line 208, in view_wrapper
    self.cache_incr(self.current_key(request))
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/src/webui/decorators.py", line 226, in cache_incr
    cache.incr(key)
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/lib/django_statsd/patches/utils.py", line 20, in wrapped
    return method(*args, **kw)
  File "/srv/login.staging.ubuntu.com/staging/code/r1190/lib/django/core/cache/backends/memcached.py", line 117, in incr
    raise ValueError("Key '%s' not found" % key)

Revision history for this message
Martin Albisetti (beuno) wrote :

Please make sure there are unit tests that validate that everything still works with and without memcache.
There are examples of that in ubuntuone-servers from the matvu days.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.