Clear django_session table

Bug #1466126 reported by Kevin Stevens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Medium
Steve Lewis
Icehouse
Won't Fix
Undecided
Unassigned
Juno
Fix Released
Medium
Steve Lewis
Kilo
Fix Released
Medium
Steve Lewis
Trunk
Fix Released
Medium
Steve Lewis

Bug Description

Looks like mysql is getting pretty big thanks to the django_session table. These are not automatically cleared and must be manually purged per: https://docs.djangoproject.com/en/dev/topics/http/sessions/#clearing-the-session-store

Another cron job?

Changed in openstack-ansible:
status: Confirmed → In Progress
Changed in openstack-ansible:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-ansible-deployment (kilo)

Reviewed: https://review.openstack.org/195220
Committed: https://git.openstack.org/cgit/stackforge/os-ansible-deployment/commit/?id=36378c5547a4c39db98994db61af68ee433ff943
Submitter: Jenkins
Branch: kilo

commit 36378c5547a4c39db98994db61af68ee433ff943
Author: Steve Lewis <email address hidden>
Date: Tue Jun 23 18:22:02 2015 -0700

    Clear expired Django sessions regularly from DB

    A random minute in the 21st hour UTC, daily, was chosen arbitrarily.
    That it is run on a single arbitrary host from the set was done to
    prevent unnecessary work being done until Bug #1424705 provides us with
    a cleaner solution.

    Adjusted to run once per day just to be sure that the operation doesn't
    lock the table for a meaningful duration.

    Making this configurable or tunable does not seem
    to be necessary at this time.

    Change-Id: I87164926a4d6a65d3c9f733d625a2d4af91c2597
    Closes-Bug: #1466126
    (cherry picked from commit 4ab949672428fda396d1d6a28149252dabc5655d)

Revision history for this message
Bjoern (bjoern-t) wrote :

FYI this has doc impact that we need to truncate table dash.django_session prior to running the 10.1.10 upgrade

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-ansible-deployment (juno)

Fix proposed to branch: juno
Review: https://review.openstack.org/197744

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-ansible-deployment (juno)

Reviewed: https://review.openstack.org/197744
Committed: https://git.openstack.org/cgit/stackforge/os-ansible-deployment/commit/?id=bdc5ef3d57580cf4a011bc276d7282f54a58900f
Submitter: Jenkins
Branch: juno

commit bdc5ef3d57580cf4a011bc276d7282f54a58900f
Author: Steve Lewis <email address hidden>
Date: Tue Jun 23 18:22:02 2015 -0700

    Clear expired Django sessions regularly from DB

    A random minute in the 21st hour UTC, daily, was chosen arbitrarily.
    That it is run on a single arbitrary host from the set was done to
    prevent unnecessary work being done until Bug #1424705 provides us with
    a cleaner solution.

    Adjusted to run once per day just to be sure that the operation doesn't
    lock the table for a meaningful duration.

    Making this configurable or tunable does not seem
    to be necessary at this time.

    Closes-Bug: #1466126

    Conflicts:
     playbooks/roles/os_horizon/tasks/horizon_db_setup.yml

    Change-Id: I87164926a4d6a65d3c9f733d625a2d4af91c2597
    (cherry picked from commit 4ab949672428fda396d1d6a28149252dabc5655d)

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/openstack-ansible 11.2.11

This issue was fixed in the openstack/openstack-ansible 11.2.11 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/openstack-ansible 11.2.12

This issue was fixed in the openstack/openstack-ansible 11.2.12 release.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/openstack-ansible 11.2.14

This issue was fixed in the openstack/openstack-ansible 11.2.14 release.

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.