Forgot to say that this is Zope 2.9.8, Five 1.4 branch from svn, Plone 2.5.5
/Sasha
HiOn a server we have a ZEO server with 6 clients. When we start/restart the server we often get on random instance an AttributeError @@plone and all other browser pages. I have tracked it down to a ConflictError when installing Five on startup. See traceback bellow. To solve this I tried to set enable-product-installation = off to all except one instance but I still got errors.For now we restart the broken instances until they work, I have tried to set sleeping times up to couple seconds between the instances but it didn't make any difference.Five fails when it tries to execute the registerPackage in zcml files. Not the same product every time.First I thought it didn't respect the enable-product-instalation but that is checked in App.Product.initializeProduct method.So I played in fiveconfigure.py with transaction.savepoint() but no success but if I manually check App.Product.doInstall like in the diff belowNow my question is if this is correct solution for the problem or will it have other side effects that I am not aware of? How do I write tests for an ConflicError during startup?/SashaIndex: fiveconfigure.py===================================================================--- fiveconfigure.py (revision 86781)
+++ fiveconfigure.py (working copy)@@ -23,7 +23,7 @@import warningsimport App.config-from App.Product import initializeProduct+from App.Product import initializeProduct, doInstallfrom App.ProductContext import ProductContextimport Productsfrom zLOG import LOG, ERROR@@ -265,6 +265,8 @@if not hasattr(module_, '__path__'):raise ValueError("Must be a package and the " \"package must be filesystem based")+ if not doInstall():+ returnapp = Zope2.app()try:2008-05-16 11:48:17 ERROR Zope Couldn't install FiveTraceback (most recent call last):File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py", line 783, in install_productinitmethod(context)File "/Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py", line 31, in initializezcml.load_site()File "/Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py", line 41, in load_site_context = xmlconfig.file(file)File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py", line 560, in filecontext.execute_actions()File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py", line 612, in execute_actionscallable(*args, **kw)File "/Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py", line 285, in _registerPackagetransaction.commit()File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py", line 96, in commitreturn self.get().commit(sub, deprecation_wng=False)File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py", line 380, in commitself._saveCommitishError() # This raises!File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py", line 378, in commitself._commitResources()File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py", line 433, in _commitResourcesrm.commit(self)File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py", line 484, in commitself._commit(transaction)File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py", line 518, in _commitraise ConflictError(object=obj)ConfigurationExecutionError: ZODB.POSException.ConflictError: database conflict error (oid 0x28f61f, class App.Product.Product)in:File "/Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml", line 5.4-5.65<five:registerPackage package="." initialize=".initialize" />Traceback (most recent call last):File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py", line 56, in ?run()File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py", line 21, in runstarter.prepare()File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py", line 98, in prepareself.startZope()File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py", line 257, in startZopeZope2.startup()File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/__init__.py", line 47, in startup_startup()File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/App/startup.py", line 103, in startupOFS.Application.initialize(application)File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py", line 304, in initializeinitializer.initialize()File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py", line 333, in initializeself.install_products()File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py", line 605, in install_productsreturn install_products(app)File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py", line 636, in install_productsfolder_permissions, raise_exc=debug_mode)File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py", line 783, in install_productinitmethod(context)File "/Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py", line 31, in initializezcml.load_site()File "/Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py", line 41, in load_site_context = xmlconfig.file(file)File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py", line 560, in filecontext.execute_actions()File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py", line 612, in execute_actionscallable(*args, **kw)File "/Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py", line 285, in _registerPackagetransaction.commit()File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py", line 96, in commitreturn self.get().commit(sub, deprecation_wng=False)File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py", line 380, in commitself._saveCommitishError() # This raises!File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py", line 378, in commitself._commitResources()File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py", line 433, in _commitResourcesrm.commit(self)File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py", line 484, in commitself._commit(transaction)File "/Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py", line 518, in _commitraise ConflictError(object=obj)zope.configuration.config.ConfigurationExecutionError: ZODB.POSException.ConflictError: database conflict error (oid 0x28f61f, class App.Product.Product)in:File "/Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml", line 5.4-5.65<five:registerPackage package="." initialize=".initialize" />