Closed Bug 788002 Opened 12 years ago Closed 12 years ago

Dragnet not remembering CSRF token

Categories

(Infrastructure & Operations Graveyard :: WebOps: Other, task, P4)

x86
macOS

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: brandon, Assigned: nmaul)

Details

(Whiteboard: [triaged 20120904])

A CSRF token is being generated, but not remembered, on the login form: https://dragnet-dev.allizom.org/en-US/users/login/ My guess is that memcache is set as the cache but not configured on the webhead.
Assignee: server-ops → server-ops-webops
Component: Server Operations → Server Operations: Web Operations
QA Contact: jdow → cshields
Hmm... I don't see any cache settings (memcache or otherwise) in settings/local.py or settings/base.py for dragnet-dev. I'm not sure what to look for on this. Are there any other relevant settings we should check? Also, does stage or prod have this issue too, or just dev? For reference: url = git://github.com/mozilla/dragnet [root@genericadm.private.phx1 dragnet]# git show HEAD commit 8f2f41f79a4e7e5fef9160d329315e6c2803fc97 Merge: 3dbbe9e 37cc43d Author: Peter Bengtsson <mail@peterbe.com> Date: Wed Aug 1 09:40:52 2012 -0700 Merge pull request #5 from brandonsavage/master Add a platform field
Priority: -- → P4
Whiteboard: [triaged 20120904][waiting][webdev]
Try this: $ ./manage.py shell >>> from django.conf import settings >>> settings.CACHES >>> # does that say Memcache?? >>> from django.core.cache import cache >>> cache.set('foo', 'bar', 60) [exit and re-enter] $ ./manage.py shell >>> from django.core.cache import cache >>> cache.get('foo') 'bar' Memcache is (I think) configured in funfactory. By entering and exiting the shell you can test that it actually works all the way to the local memcached server.
>>> from django.conf import settings >>> settings.CACHES {'default': {'LOCATION': '', 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} >>> It's using the Django locmem (local memory) cache, not memcached. https://docs.djangoproject.com/en/dev/topics/cache/ If we think caching is the problem here, it might be worth trying the DummyCache. We've had some issues from time to time with the local memory cache... our mod_wsgi settings fork off multiple processes, and locmem is a per-process cache... stuff that goes in one proc's cache isn't visible to another process.
Thanks jakem. No we want to use Memcache. I thought Memcache was configured by default in playdoh. Apparently it's not. I'll get brandon to sort it out locally first. We will however need a memcached running on 11211 on this webhead.
It won't be a local memcache that we add to settings/local.py... the block will look like this: CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': [ '10.8.33.12:11211', '10.8.33.13:11211', ], 'KEY_PREFIX': 'dragnet_dev', } }
So, does it work now?
(In reply to Peter Bengtsson [:peterbe] from comment #4) > I'll get brandon to sort it out locally first. Haven't done anything yet, was waiting for that. Is he done with whatever you wanted him to look over?
I think brandon should add decent default memcache settings to settings/base.py But since you're taking over it anyway now, please go ahead and edit settings/local.py and restart.
This is deployed, but it appears we have an unexpected network firewall/ACL issue. Investigating that now. It probably affects more than just dragnet-dev.
Assignee: server-ops-webops → nmaul
Whiteboard: [triaged 20120904][waiting][webdev] → [triaged 20120904]
This should be resolved now... memcache works and the config for it is in place (for dragnet-dev.allizom.org). If the underlying problem still exists, please let us know what we can do to help. Thanks!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.