> Hi,
> 
> I'm having some difficulty upgrading from version 2.1.1 on an old
> FreeBSD box to 3.0.5 on a Centos 5 box. Centos/RHEL 5 provides Plone via
> the EPEL (Extra Packages for Enterprise Linux) repository. In this
> setup, along with Plone 3.0.5, you get Zope 2.10.5 and Python 2.4.3.
> 
> There were some third party products installed, SimpleForum, Plone2PDF
> and PloneCaptcha but I've uninstalled them (using the plone quick
> installer) before carrying out a database pack via the ZMI, shutting
> down zope and copying the Data.fs to the new server.
> 
> I started up zope on the new server and went into the ZMI and proceeded
> to carry out the migration, however the result is the output below.
> 
> *   Starting the migration from version: 2.1.1
> * Attempting to upgrade from: 2.1.1
> * Registered tools as utilities.
> * Removed plone_3rdParty\CMFTopic layer from all skins.
> * Migrated old actions to new actions stored in portal_actions.
> * Added rename contentmenu action to actions tool.
> * Added se-highlight.js to portal_javascipt
> * Removing workflow from Discussion Item
> * Added must_change_password property to member data
> * Upgrade to: 2.1.2-rc1, completed
> * Attempting to upgrade from: 2.1.2-rc1
> * Upgrade to: 2.1.2-rc2, completed
> * Attempting to upgrade from: 2.1.2-rc2
> * Upgrade aborted
> * Error type: exceptions.TypeError
> * Error value: attempt to wrap extension method using an object that is
> not an extension class instance.
> * File "/usr/lib/zope/lib/python/Products/CMFPlone/MigrationTool.py",
> line 210, in upgrade newv, msgs = self._upgrade(newv)
> * File "/usr/lib/zope/lib/python/Products/CMFPlone/MigrationTool.py",
> line 321, in _upgrade res = function(self.aq_parent)
> * File
> "/usr/lib/zope/lib/python/Products/CMFPlone/migrations/v2_1/two11_two12.py", 
> line 53, in two12rc2_two12 registerToolsAsUtilities(portal, out)
> * File
> "/usr/lib/zope/lib/python/Products/CMFPlone/migrations/v3_0/alphas.py",
> line 746, in registerToolsAsUtilities if sm.queryUtility(reg[1]) is
> None:
> * File "/usr/lib/zope/lib/python/zope/component/registry.py", line 132,
> in queryUtility return self.utilities.lookup((), provided, name,
> default)
> * File "/usr/lib/zope/lib/python/five/localsitemanager/registry.py",
> line 39, in _uncached_lookup result = _wrap(result, registry)
> * File "/usr/lib/zope/lib/python/five/localsitemanager/registry.py",
> line 146, in _wrap comp = base.__of__(Acquisition.aq_parent(parent))
> * End of upgrade path, migration has finished
> * The upgrade path did NOT reach current version
> * Migration has failed
> 
> Through the ZMI, I could see that there was a "broken" SimpleForum
> object. I'm not too worried if I lose old forums as there wasn't much in
> there, so I deleted the object and carried out a database pack. However,
> when I try the migrate again I get the same error.
> 
> I've found this relatively recent post with a similar error:
> 
> http://www.nabble.com/forum/ViewPost.jtp?post=15478377&framed=y&skin=15482
> 
> I thought I might also try what Alexander Limi suggested and cut and
> paste the objects into a new Plone instance, but I'm not sure about
> which objects take. I'd prefer not to have to do this, but if there's no
> way of getting the automated migration to happen I'll give it a go.



I've found a solution to this problem.

Here's what was successful for me:

1. On the FreeBSD Plone 2.1.1 instance, SimpleForum and any other
products that weren't available by default in Plone 3.0.5 were all
uninstalled. Via the ZMI, the one SimpleForum object that could be found
was deleted. A full database pack was run before zope was stopped in
order to get a consistent copy Data.fs from the old server.

2. On a new Centos 5.1 server, Plone 2.5.5 was installed using the
unified installer from the plone site. This version installs a zeo
cluster - I wasn't sure of the implications of this, so modifications
were made to the zope.conf file of client1, so that it could run in
standalone mode. 

The modification of /opt/Plone-2.5.5/zeocluster/client1/etc/zope.conf
was the replacement of this:

<zodb_db main>
    # Main FileStorage database
  <zeoclient>
    server localhost:8100
    storage 1
    name zeostorage
    var $INSTANCE/var

  </zeoclient>
    mount-point /
</zodb_db>


with this:

<zodb_db main>
    # Main FileStorage database
    <filestorage>
      path $INSTANCE/var/Data.fs
    </filestorage>

    mount-point /
</zodb_db>

3. A copy of the Data.fs file was placed in client1's var directory and
the ownership and permission on the file were changed:

 sudo chown plone:plone /opt/Plone-2.5.5/zeocluster/client1/var/Data.fs
 sudo chmod 640 /opt/Plone-2.5.5/zeocluster/client1/var/Data.fs

The client1 zope instance was started manually:

 sudo /opt/Plone-2.5.5/zeocluster/client1/bin/zopectl start

4. Via the ZMI on this new host (on port 8080) the portal_migration was
carried out (took between 1 and 2 minutes), followed by a portal_actc
migration (took less than 1 second). In the plone site itself via the
Add/Remove Products section, all the products that were marked as
requiring a reinstallation were reinstalled.

5. I carried out a pack on the database before shutting down this zope
instance manually using 

 sudo /opt/Plone-2.5.5/zeocluster/client1/bin/zopectl stop

and making a copy of the converted Data.fs, which was now in 2.5.5
format.


6. On a fresh Cents 5.1 system, I installed plone 3.0.5 from the EPEL
repository. I then copied the 2.5.5 Data.fs into the default zope
instance's var directory and changed ownership and permissions

 sudo chown zope:zope /var/lib/zope/var/Data.fs # EPEL zope uses a user
called zope.
 sudo chmod 640 /var/lib/zope/var/Data.fs

I set zope to start up automatically at boot time

 sudo /sbin/chkconfig zope on

and started it manually

 sudo /sbin/service zope start

7. Via the ZMI (port 8080 on this latest centos host) the
portal_migration was carried out, which took about 5 seconds. The final
step was to log into the plone site and carry out a product reinstall
where it was necessary, using the "Add/Remove Products" section. There
were only two products in this state this time, CMFPlacefulWorkflow and
PlonePAS. When an attempt was made to reinstall CMFPlacefulWorkflow, an
error was generated, however PlonePAS reinstalled cleanly. The solution
to get CMFPlacefulWorkflow to reinstall, was to manually uninstall it,
then manually install it.





_______________________________________________
Setup mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/setup

Reply via email to