Unable to Upgrade RT 3.6.6 to 3.8.x using MySQL 5.0.77 and provided database upgrade scripts

Hello all,

I’m having quite the time upgrading RT from 3.6.6 to the last version.
I am following the readme and upgrading.mysql docs.

./configure runs fine

Make testdeps and fixdeps were also successful

Make upgrade ran with no errors

Coming up on the section about upgrading the database to 3.7.87 prior to
executing the SQL schema as detailed in the upgrading.mysql doc:

[root@help01 rt-3.8.6]# ./sbin/rt-setup-database --dba root
–prompt-for-dba-password --action upgrade

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.6.6

Going to apply following upgrades:

  • 3.7.1

  • 3.7.3

  • 3.7.10

  • 3.7.15

  • 3.7.19

  • 3.7.81

  • 3.7.82

  • 3.7.85

  • 3.7.86

  • 3.7.87

  • 3.8.0

  • 3.8.1

  • 3.8.2

  • 3.8.3

  • 3.8.4

  • 3.8.6

Enter RT version if you want to stop upgrade at some point,

or leave it blank if you want apply above upgrades: 3.7.87

Going to apply following upgrades:

  • 3.7.1

  • 3.7.3

  • 3.7.10

  • 3.7.15

  • 3.7.19

  • 3.7.81

  • 3.7.82

  • 3.7.85

  • 3.7.86

  • 3.7.87

IT’S VERY IMPORTANT TO BACK UP BEFORE THIS STEP

Proceed [y/N]:y

Processing 3.7.1

DBI connect(‘dbname=rt3;host=localhost’,‘rt_user’,…) failed: Access
denied for user ‘rt_user’@‘localhost’ (using password: YES) at
/usr/lib/perl5/site_perl/5.8.8/DBIx/SearchBuilder/Handle.pm line 106

Connect Failed Access denied for user ‘rt_user’@‘localhost’ (using
password: YES)

at /home/jbarron/rt-3.8.6/sbin/…/lib/RT.pm line 204

Using the user/pass specified in the script to connect directly to mysql
works fine so I’m not sure why its still failing on me. I’ve added all
the permissions for the rt_user and root user just to test, tried
running the script with no arguments except -action upgrade, and I’m
still stuck.

Thanks kindly,

Josh Barron

[root@help01 rt-3.8.6]# ./sbin/rt-setup-database --dba root
–prompt-for-dba-password --action upgrade

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.

did you entered your MySQL root password here ?

Hi Emmanuel,

Yes I did. Its very strange, even when I enter the command with “–dba
root” it still comes up using "rt_user"
I’ve tried the password for rt-user and the password for root with no
success.

-Josh

[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Emmanuel
LacourSent: Monday, November 02, 2009 6:02 AM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Unable to Upgrade RT 3.6.6 to 3.8.x usingMySQL
5.0.77 and provided database upgrade scripts

Hi,
we figured out during the last weeks, that a ticket resolved by a scrip has no resolved time stamp set, is this a know behavior or a simple bug? We are still under RT 3.6.5.

Torsten

Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne

Hi,
we figured out during the last weeks, that a ticket resolved by a scrip has no resolved time stamp set, is this a know behavior or a simple bug? We are still under RT 3.6.5.

“lack of a feature” - I’d take a patch.

I’d love to do this, drop me a tiny hint where to start from :wink:

Torsten

Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne

-----Urspruengliche Nachricht-----Von: Jesse Vincent [mailto:jesse@bestpractical.com]
Gesendet: Montag, 2. November 2009 18:10
An: Brumm, Torsten / Kuehne + Nagel / Ham MI-ID
Cc: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System

Hi,
we figured out during the last weeks, that a ticket resolved by a scrip has no resolved time stamp set, is this a know behavior or a simple bug? We are still under RT 3.6.5.

“lack of a feature” - I’d take a patch.

Torsten

Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann
(Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang,
Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.),
Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA
21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft:
Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender
Verwaltungsrat: Klaus-Michael Kuehne


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com Commercial support:
sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

I’d love to do this, drop me a tiny hint where to start from :wink:

First up, what scrip is doing the resolving? What’s the ScripAction?

It’s from cron:

0 8 * * * /opt/rt3/bin/rt-crontool --search RT::Search::FromSQL --search-arg " Queue = ‘QueueName’ AND ( Status = ‘delivered’ OR Status = ‘waiting’ ) AND ‘CF.{Update Required}’ LIKE ‘No’ AND Starts < ‘Today’" --action RT::Action::AutoResolve

I’m not 100% sure anymore where the Action::AutoResolve comes from (found it at our local/lib/ dir) but i think i got it from wiki:

package RT::Action::AutoResolve;
require RT::Action::Generic;

use strict;
use vars qw/@ISA/;
@ISA=qw(RT::Action::Generic);

#Do what we need to do and send it out.

#What does this type of Action does

{{{ sub Describe

sub Describe {
my $self = shift;
return (ref $self );
}

}}}

{{{ sub Prepare

sub Prepare {
my $self = shift;

# if the ticket is already open or the ticket is new and the message is more mail from the
# requestor, don't reopen it.

my $status = $self->TicketObj->Status;
return undef if $status eq 'resolved';

return 1;

}

}}}

sub Commit {
my $self = shift;
my $oldstatus = $self->TicketObj->Status();
$self->TicketObj->__Set( Field => ‘Status’, Value => ‘resolved’ );
$self->TicketObj->_NewTransaction(
Type => ‘Status’,
Field => ‘Status’,
OldValue => $oldstatus,
NewValue => ‘resolved’,
Data => ‘Ticket auto-resolved on cron script action’
);

return(1);

}

eval “require RT::Action::AutoResolve_Vendor”;
die $@ if ($@ && $@ !~ qr{^Can’t locate RT/Action/AutoResolve_Vendor.pm});
eval “require RT::Action::AutoResolve_Local”;
die $@ if ($@ && $@ !~ qr{^Can’t locate RT/Action/AutoResolve_Local.pm});

1;

Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne

-----Urspruengliche Nachricht-----Von: Jesse Vincent [mailto:jesse@bestpractical.com]
Gesendet: Dienstag, 3. November 2009 15:18
An: Brumm, Torsten / Kuehne + Nagel / Ham MI-ID
Cc: Jesse Vincent; rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System

I’d love to do this, drop me a tiny hint where to start from :wink:

First up, what scrip is doing the resolving? What’s the ScripAction?

It’s from cron:

0 8 * * * /opt/rt3/bin/rt-crontool --search RT::Search::FromSQL --search-arg " Queue = ‘QueueName’ AND ( Status = ‘delivered’ OR Status = ‘waiting’ ) AND ‘CF.{Update Required}’ LIKE ‘No’ AND Starts < ‘Today’" --action RT::Action::AutoResolve

I’m not 100% sure anymore where the Action::AutoResolve comes from (found it at our local/lib/ dir) but i think i got it from wiki:

Ah. well, it would need to also set the resolved date, as it’s using an
internal API to change the status and record a transaction.