Error When Upgrade-Database from 3.8.1 to 3.8.2

Hi,

New install for RT 4
Centos 6.3 running in OSX Parrallels container (test server)
MySQL 5.1.61
Perl v5.10.1
mod_perl 2.0.4-10
mod_fastcgi-2.4.6

I am in the process of upgrade our RT environment from 3.2.2 to 4.0.7. So far I have been able to upgrade successfully from 3.2.2 to 3.8.1. However, when I run the $ make upgrade-database from 3.8.1 to 3.8.2 I received the following error:

FYI this is my first exposure to RT.

$ make upgrade-database
/usr/local/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/lib sbin/rt-setup-database --action upgrade --prompt-for-dba-password
In order to create or update your RT database, this script needs to connect to your mysql instance on localhost as root
Please specify that user’s database password below. If the user has no database
password, just press return.

Password:
Working with:
Type: mysql
Host: localhost
Name: rt3
User: rt_user
DBA: root
Enter RT version you’re upgrading from: 3.8.1

Going to apply following upgrades:

  • 3.8.2
  • 3.8.3
  • 3.8.4
  • 3.8.6
  • 3.8.8
  • 3.8.9
  • 3.9.1
  • 3.9.2
  • 3.9.3
  • 3.9.5
  • 3.9.6
  • 3.9.7
  • 3.9.8
  • 4.0.0rc2
  • 4.0.0rc4
  • 4.0.0rc7
  • 4.0.1
  • 4.0.3
  • 4.0.4
  • 4.0.6

Enter RT version if you want to stop upgrade at some point,
or leave it blank if you want apply above upgrades: 3.8.2

Going to apply following upgrades:

  • 3.8.2

IT’S VERY IMPORTANT TO BACK UP BEFORE THIS STEP

Proceed [y/N]:y
Processing 3.8.2
Now inserting data.
[Mon Oct 22 20:54:57 2012] [warning]: Going to add [OLD] prefix to all templates in approvals queue. If you have never used approvals, you can safely delete all the templates with the [OLD] prefix. Leave the new Approval templates because you may eventually want to start using approvals. (./etc/upgrade/3.8.2/content:3)
[Mon Oct 22 20:54:58 2012] [warning]: DBD::mysql::st execute failed: Unknown column ‘Creator’ in ‘field list’ at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 587. (/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm:587)
[Mon Oct 22 20:54:58 2012] [warning]: RT::Handle=HASH(0x2a71a48) couldn’t execute the query ‘INSERT INTO ACL (PrincipalId, RightName, Creator, ObjectId, LastUpdatedBy, PrincipalType, Created, LastUpdated, ObjectType) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)’ at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 600.
DBIx::SearchBuilder::Handle::SimpleQuery(‘RT::Handle=HASH(0x2a71a48)’, ‘INSERT INTO ACL (PrincipalId, RightName, Creator, ObjectId, L…’, 4, ‘ShowApprovalsTab’, 1, 1, 1, ‘Group’, ‘2012-10-22 20:54:58’, …) called at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 350
DBIx::SearchBuilder::Handle::Insert(‘RT::Handle=HASH(0x2a71a48)’, ‘ACL’, ‘PrincipalId’, 4, ‘RightName’, ‘ShowApprovalsTab’, ‘Creator’, 1, ‘ObjectId’, …) called at /usr/local/share/perl5/DBIx/SearchBuilder/Handle/mysql.pm line 36
DBIx::SearchBuilder::Handle::mysql::Insert(‘RT::Handle=HASH(0x2a71a48)’, ‘ACL’, ‘PrincipalId’, 4, ‘RightName’, ‘ShowApprovalsTab’, ‘Creator’, 1, ‘ObjectId’, …) called at /usr/local/share/perl5/DBIx/SearchBuilder/Record.pm line 1292
DBIx::SearchBuilder::Record::Create(‘RT::ACE=HASH(0x4a0e560)’, ‘PrincipalId’, 4, ‘Creator’, 1, ‘RightName’, ‘ShowApprovalsTab’, ‘ObjectId’, 1, …) called at /tmp/rt-4.0.7/sbin/…/lib/RT/Record.pm line 316
RT::Record::Create(‘RT::ACE=HASH(0x4a0e560)’, ‘PrincipalId’, 4, ‘PrincipalType’, ‘Group’, ‘RightName’, ‘ShowApprovalsTab’, ‘ObjectType’, ‘RT::System’, …) called at /tmp/rt-4.0.7/sbin/…/lib/RT/ACE.pm line 291
RT::ACE::Create(‘RT::ACE=HASH(0x4a0e560)’, ‘RightName’, ‘ShowApprovalsTab’, ‘Object’, ‘RT::System=HASH(0x48296c8)’, ‘PrincipalType’, ‘Group’, ‘PrincipalId’, 4, …) called at /tmp/rt-4.0.7/sbin/…/lib/RT/Principal.pm line 172
RT::Principal::GrantRight(‘RT::Principal=HASH(0x3ebbd38)’, ‘Right’, ‘ShowApprovalsTab’, ‘Object’, ‘RT::System=HASH(0x48296c8)’) called at /tmp/rt-4.0.7/sbin/…/lib/RT/Handle.pm line 964
RT::Handle::InsertData(‘RT::Handle=HASH(0x2a71a48)’, ‘./etc/upgrade/3.8.2/content’, undef) called at sbin/rt-setup-database line 293
main::action_insert(‘prompt-for-dba-password’, 1, ‘datafile’, undef, ‘action’, ‘upgrade’, ‘datadir’, ‘./etc/upgrade/3.8.2’, ‘backcompat’, …) called at sbin/rt-setup-database line 399
main::action_upgrade(‘prompt-for-dba-password’, 1, ‘action’, ‘upgrade’, ‘dba’, ‘root’) called at sbin/rt-setup-database line 198 (/usr/share/perl5/Carp.pm:103)
[Mon Oct 22 20:54:58 2012] [error]: System error. Right not granted. (/tmp/rt-4.0.7/sbin/…/lib/RT/Handle.pm:969)
[Mon Oct 22 20:54:58 2012] [warning]: IMPORTANT: We’re going to delete all scrips in Approvals queue and save them in ‘rt-approvals-scrips-XcRt’ file. (./etc/upgrade/3.8.2/content:165)
Done.

Kind Regards,

Cynthia Roe
Sr. Unix Administrator
Rutgers Marine and Coastal Science
71 Dudley Road, New Brunswick, NJ 08901-8525
Cell (732) 882-6079
Office (848) 932-3370

I am in the process of upgrade our RT environment from 3.2.2 to 4.0.7.
So far I have been able to upgrade successfully from 3.2.2 to 3.8.1.
However, when I run the $ make upgrade-database from 3.8.1 to 3.8.2 I
received the following error:

Is there a particular reason that you’re going one upgrade at a time?
We wrote the make upgrade-database command to make running them all
much easier than it ever was in older versions.

In this case, the problem is that RT’s code expects the ACL table to
have a Creator field, but the 3.8.2 upgrade is run before the schema
change. We actually have code to handle this and if you let it just
run from 3.8.1 -> 4.0.6 instead of taking single steps, it will
complete correctly.

There’s a bug that it only looks for our special “backcompat” file in
the versions of the upgrade you specified, and we should fix that, but
I’m not sure why you’re running the upgrade in single steps instead of
just letting it go and only revisiting it if something fails?

I’ve filed a bug about this
http://issues.bestpractical.com/Ticket/Display.html?id=21317

-kevin

Hi

I ran the upgrade the first time as you indicated just let it run from 3.2.2 to 4.0.7, and that failed as well. So I went back through the docs and the was a step that stated to stop after 3.8.7.

Cynthia Roe

CRoe Photography
(732) 882-6079
http://croephotography.comOn Oct 24, 2012, at 10:58 PM, Kevin Falcone falcone@bestpractical.com wrote:

On Mon, Oct 22, 2012 at 05:13:57PM -0400, Cynthia Roe wrote:

I am in the process of upgrade our RT environment from 3.2.2 to 4.0.7.
So far I have been able to upgrade successfully from 3.2.2 to 3.8.1.
However, when I run the $ make upgrade-database from 3.8.1 to 3.8.2 I
received the following error:

Is there a particular reason that you’re going one upgrade at a time?
We wrote the make upgrade-database command to make running them all
much easier than it ever was in older versions.

In this case, the problem is that RT’s code expects the ACL table to
have a Creator field, but the 3.8.2 upgrade is run before the schema
change. We actually have code to handle this and if you let it just
run from 3.8.1 -> 4.0.6 instead of taking single steps, it will
complete correctly.

There’s a bug that it only looks for our special “backcompat” file in
the versions of the upgrade you specified, and we should fix that, but
I’m not sure why you’re running the upgrade in single steps instead of
just letting it go and only revisiting it if something fails?

I’ve filed a bug about this
http://issues.bestpractical.com/Ticket/Display.html?id=21317

-kevin

$ make upgrade-database
Enter RT version you’re upgrading from: 3.8.1

Going to apply following upgrades:

  • 3.8.2
  • 3.8.3
  • 3.8.4
  • 3.8.6
  • 3.8.8
  • 3.8.9
  • 3.9.1
  • 3.9.2
  • 3.9.3
  • 3.9.5
  • 3.9.6
  • 3.9.7
  • 3.9.8
  • 4.0.0rc2
  • 4.0.0rc4
  • 4.0.0rc7
  • 4.0.1
  • 4.0.3
  • 4.0.4
  • 4.0.6

Enter RT version if you want to stop upgrade at some point,
or leave it blank if you want apply above upgrades: 3.8.2

Going to apply following upgrades:

  • 3.8.2

IT’S VERY IMPORTANT TO BACK UP BEFORE THIS STEP

Proceed [y/N]:y
Processing 3.8.2
Now inserting data.
[Mon Oct 22 20:54:57 2012] [warning]: Going to add [OLD] prefix to all templates in approvals queue. If you have never used approvals, you can safely delete all the templates with the [OLD] prefix. Leave the new Approval templates because you may eventually want to start using approvals. (./etc/upgrade/3.8.2/content:3)
[Mon Oct 22 20:54:58 2012] [warning]: DBD::mysql::st execute failed: Unknown column ‘Creator’ in ‘field list’ at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 587. (/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm:587)


Final RT training for 2012 in Atlanta, GA - October 23 & 24
http://bestpractical.com/training

We’re hiring! http://bestpractical.com/jobs

I ran the upgrade the first time as you indicated just let it run from
3.2.2 to 4.0.7, and that failed as well. So I went back through the
docs and the was a step that stated to stop after 3.8.7.

How did it fail?
3.8.2 isn’t after 3.8.7
3.8.2 wouldn’t fail if it had the backcompat files available.
Please show the failure when you let it run.

-kevin