plone / plone.recipe.zope2instance

zc.buildout recipe to setup and configure a Zope 2 instance.
https://pypi.org/project/plone.recipe.zope2instance
6 stars 23 forks source link

blob-dir configuration generated improperly #103

Closed zopyx closed 5 years ago

zopyx commented 5 years ago

I have a standard ZEO setup generated with zope2instance 6.1.0


<zodb_db main>
    # Main database
    cache-size 30000
# Blob-enabled ZEOStorage database
    <zeoclient>
      read-only false
      read-only-fallback false
      blob-dir var/blobstorage
      shared-blob-dir on
      server 21100
      storage 1
      name zeostorage
      var /home/abstract/onkopedia_buildout-plone5/parts/wsgi.py/var
      cache-size 128MB
    </zeoclient>
    mount-point /
</zodb_db>

The related section on Plone 4.3 looks like this

<zodb_db main>
    # Main database
    cache-size 30000
# Blob-enabled ZEOStorage database
    <zeoclient>
      read-only false
      read-only-fallback false
      blob-dir /home/dgho/onkopedia_buildout_new/var/blobstorage
      shared-blob-dir on
      server 9250
      storage 1
      name zeostorage
      var /home/dgho/onkopedia_buildout_new/parts/instance/var
      cache-size 128MB
    </zeoclient>
    mount-point /
</zodb_db>

The value for blob-dir is generated with a relative path in 6.2.0 vs. an absolute path under Plone 4.3

The problem here is that Plone 5.2 looks up a blob from an improper location


Traceback (innermost last):

Module ZPublisher.WSGIPublisher, line 142, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 295, in publish_module
Module ZPublisher.WSGIPublisher, line 229, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 57, in call_object
Module plone.namedfile.browser, line 46, in __call__
Module plone.namedfile.utils, line 96, in stream_data
Module ZODB.Connection, line 803, in setstate
Module ZEO.ClientStorage, line 670, in loadBlob
ZODB.POSException.POSKeyError: 'No blob file at /home/abstract/onkopedia_buildout-plone5/parts/wsgi.py/var/blobstorage/0x00/0x00/0x00/0x00/0x00/0x0d/0x51/0xfc/0x03cef6fc610dfc00.blob'

note that Plone resolves the blob filename from the parts/<part> directory.

dataflake commented 5 years ago

Have you tried this with version 6.1.5? I can't reproduce it. If you can still reproduce it on 6.1.5 it would help if you shared the actual buildout configuration section.

zopyx commented 5 years ago

Omitting the blob-storage setting in my instance part resolved the issue (with V 6.2.0). Not sure why the behavior differs from the version used for Plone 4.3..anyway. SOLVED