Add temporary storage support for collective.recipe.filestorage and plone.recipe.zope2zeoserver

Bug #427878 reported by Jean Jordaan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
collective.buildout
New
Undecided
Unassigned

Bug Description

When load balancing without session affinity in a ZEO cluster, the Zope session should be served from the ZEO master to ensure that all clients have a consistent view of the session.

This old post still seems to be valid today: http://longsleep.org/1/howto/sharesessionwithzeo

See also http://plone.org/documentation/how-to/sticky-sessions-and-mod_proxy_balancer and http://www.linux.co.uk/docs/center/how-to/load-balancing-apache-and-plone for reports of failure in the absence of session affinity.

To enable this using buildout, I added a 'temporary-storage = zeo' directive to the [filestorage] part. If this is present, then the zope.conf files contain a stanza like this:

<zodb_db temporary>
  <zeoclient>
    server 8025
    storage temp
    name tempstorage
    var /home/zope/instances/iwlearn/parts/instance1/var
  </zeoclient>
  mount-point /temp_folder
  container-class Products.TemporaryFolder.TemporaryContainer
</zodb_db>

where %(zeo_address)s and %(zeo_client_var)s have been interpolated. The zeo.conf file contains a stanza like this:

%import tempstorage
<temporarystorage temp>
  name temporary storage for sessioning
</temporarystorage>

The zope2zeoserver recipe gains a directive like this: 'zeo-temporary-storage', which works the same as the 'temporary-storage' directive.

The patch does the job, but could probably be refined.

Revision history for this message
Jean Jordaan (jean-jordaan) wrote :
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.