Title: custom_zodb.py and Control_Panel

v2.7.4 running on Linux - I'm trying to use this (custom_zodb.py in INSTANCE_HOME)

---------------------------------------------------------
import os
import ZODB.FileStorage
import ZODB.DB

filename = os.path.join(INSTANCE_HOME, 'var', 'Data.fs')
Storage = ZODB.FileStorage.FileStorage(filename)
DB = ZODB.DB(Storage, pool_size=10)
-----------------------------------------------------------

When I do it, zope does start up and run, but I get IOError every time I try to look at the "main" storage in Control_Panel->Database:

Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "/home/zope/Zope-2.7.4-0/lib/python/Zope/__init__.py", line 51, in app
    startup()
  File "/home/zope/Zope-2.7.4-0/lib/python/Zope/__init__.py", line 47, in startu
p
    _startup()
  File "/home/zope/Zope-2.7.4-0/lib/python/Zope/App/startup.py", line 57, in sta
rtup
    DB = configuration.dbtab.getDatabase('/', is_root=1)
  File "/home/zope/Zope-2.7.4-0/lib/python/DBTab/DBTab.py", line 96, in getDatab
ase
    db = self._createDatabase(name, is_root)
  File "/home/zope/Zope-2.7.4-0/lib/python/DBTab/DBTab.py", line 113, in _create
Database
    db = factory.open()
  File "/home/zope/Zope-2.7.4-0/lib/python/Zope/Startup/datatypes.py", line 172,
 in open
    DB = self.createDB()
  File "/home/zope/Zope-2.7.4-0/lib/python/Zope/Startup/datatypes.py", line 169,
 in createDB
    return ZODBDatabase.open(self)
  File "/home/zope/Zope-2.7.4-0/lib/python/ZODB/config.py", line 97, in open
    return ZODB.DB(section.storage.open(),
  File "/home/zope/Zope-2.7.4-0/lib/python/ZODB/config.py", line 128, in open
    quota=self.config.quota)
  File "/home/zope/Zope-2.7.4-0/lib/python/ZODB/FileStorage.py", line 232, in __
init__
    self._lock_file = LockFile(file_name + '.lock')
  File "/home/zope/Zope-2.7.4-0/lib/python/ZODB/lock_file.py", line 62, in __ini
t__
    lock_file(self._fp)
  File "/home/zope/Zope-2.7.4-0/lib/python/ZODB/lock_file.py", line 42, in lock_
file
    fcntl.flock(file.fileno(), _flags)
IOError: [Errno 11] Resource temporarily unavailable


If I remove the custom_zodb.py file, the problem goes away.  Why is the file locked to the ZMI when I use custom_zodb.py?






_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to