[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 1.2 to 1.3 Upgrade fun



Hi Lyle,


Let me start by saying I'm sorry to hear 1.3 is causing you this much trouble. More comments below.

On Sun, Mar 16, 2014 at 4:06 PM, Lyle <..hidden..> wrote:
Hi,
  Trying to upgrade from 1.2 to 1.3 has been quite an experience thus far. Luckily I backed everything up and have been able to revert back to the old version.

I followed the upgrade notes:
http://sourceforge.net/p/ledger-smb/code/HEAD/tree/branches/1.3/UPGRADE

The setup.pl script didn't work properly, when I looked at the Apache SQL logs it looked like an issue with the DB.

Centos 5 comes with PostgreSQL 8.1. Seeing that the install notes say 8.2+ I figured that might be part of the problem, so I upgraded to PostgreSQL 9.3 using the packages direct from the PostgreSQL site:
http://yum.postgresql.org/repopackages.php
I also added the EPEL repo to get all of those packages to install.

I restored my backed up 1.2 databases, and the ledgersmb user. setup.pl would then run, but the resultant upgraded database was empty :(

Well, I have to agree this needs to be communicated better -- and 1.4 does a better job at it, I think, albeit that there remains a lot of room for improvement. However, the problem is that we're lacking real world datasets to do our testing on. The datasets that we do get our hands on usually need to stay private for obvious reasons. However, it makes testing upgrades harder.

The thing with the empty database is the following: the old data is still there, but you don't see it. There's a new schema (lsmb12) where your old data is stored. So, you can drop the public schema and rename the lsmb12 schema back to public. That way, you're back where you were before the failed upgrade.

One problem with the upgrade from 1.2 to 1.3 is that the datamodel on 1.3 has been cleaned up and validation rules are a lot tighter now than they ever were before -- ie on 1.2. That makes migration hard. We have a number of checks in place, but probably the checks required for your dataset haven't been implemented yet.
 

I saw some errors with regards to the ledgersmb users permissions, so decided to remove that user and follow the 1.3 install instructions to create one with the new 1.3 permissions.

That got me a bit further, and there are less errors in the apache error log when I try to upgrade the database:

[Mon Mar 16 10:06:02 2014] [error] [client 192.168.1.10] commit ineffective with AutoCommit enabled at LedgerSMB/DBObject/Employee.pm line 107., referer: http://centos.cosmicnetworks.com/ledgersmb/setup.pl
[Mon Mar 16 10:06:02 2014] [error] [client 192.168.1.10] commit ineffective with AutoCommit enabled at LedgerSMB/DBObject/Admin.pm line 102., referer: http://centos.cosmicnetworks.com/ledgersmb/setup.pl
[Mon Mar 16 10:06:02 2014] [error] [client 192.168.1.10] commit ineffective with AutoCommit enabled at scripts/setup.pl line 1051., referer: http://centos.cosmicnetworks.com/ledgersmb/setup.pl
[Mon Mar 16 10:06:04 2014] [error] [client 192.168.1.10] rollback ineffective with AutoCommit enabled at lsmb-request.pl line 109., referer: http://centos.cosmicnetworks.com/ledgersmb/setup.pl
[Mon Mar 16 10:06:04 2014] [error] [client 192.168.1.10] commit ineffective with AutoCommit enabled at LedgerSMB/App_State.pm line 112., referer: http://centos.cosmicnetworks.com/ledgersmb/setup.pl

But still the upgraded database is empty :(


There are logs in /tmp/ledgersmb which allow you to see which errors occur when setup.pl runs its upgrade scripts. You'll probably find your data is mismatching some data integrity rule. 
 
[ snip ]

I renamed the ledgersmb folder and started with a fresh download. Followed the install instructions, reconfigured ledgersmb.conf, then ran setup.pl to create the database as instructed here:
http://sourceforge.net/p/ledger-smb/code/HEAD/tree/branches/1.3/INSTALL
Although these wasn't any option to create a database?

What do you mean by this remark? You mean that loading http://localhost/ledgersmb/setup.pl didn't give you the option to create a new database? If so, that's great feedback! I never thought of requiring a button like that. The process to follow is to enter a name of a non-existing database, click Login and answer "Yes" to the question "Database does not exist. Create it?"

 
So I tried the prepare-company-database.sh script instead. Which gave me:

[root@centos ledgersmb]# ./tools/prepare-company-database.sh --company testinc
could not change directory to "/home/accounts/public_html/ledgersmb": Permission denied
cat: ignore/tsearch2.sql: No such file or directory
cat: ignore/tablefunc.sql: No such file or directory
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
UPDATE 86
ERROR:  column "customer_id" does not exist
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ROLLBACK

As you can imagine, from that point on it didn't work.

I've spent a fair bit of time poking with this now. The idea was that I'd get onto the latest version, then contribute some usability enhancements. I've calculated that I'll actually save more time in the long run by adding some JS to prevent common usability problems, than I've been spending fixing mistakes my book keeper makes.

Again, I'm sorry to hear the 1.3 release is giving you so much headaches. In 1.4, we've removed all dependencies on extensions, partly by requiring newer database versions (than are required for 1.3) and partly by rewriting code that depended on them. That makes installation of 1.4 easier. However, since that's not released for general use yet, I wouldn't suggest you use it.
 


--
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.