[Rt-devel] Need help with RT post upgrade

Ruslan Zakirov ruz at bestpractical.com
Wed Oct 15 15:35:48 EDT 2008


On Wed, Oct 15, 2008 at 11:05 PM, Janet Houser <jhouser at cfa.harvard.edu> wrote:
>
>
> Ruslan Zakirov wrote:
>>
>> On Tue, Oct 14, 2008 at 4:11 PM, Janet L. Houser
>> <jhouser at cfa.harvard.edu> wrote:
>>
>>> Hi Panu,
>>>
>>>
>>>>> mysql db is version 5 (both prior and post upgrade) and didn't have to
>>>>> be upgraded using:
>>>>>
>>>>>   perl etc/upgrade/schema.mysql-4.0-4.1.pl db user pass > sql.queries
>>>>>
>>>>> Do you happen to know how to fix this problem the "proper" way?
>>>>
>>>> Answer below:
>>>>
>>>>
>>>>>> This should be done even if you already have mysql 5 or 4.1
>>>>>> installed. Better name for the file should be
>>>>>> "mysql_schema_upgrade_for_3.8.1" IMO.
>>>
>>>
>>> Yeah, I tried this and it gave me errors and wouldn't run.  That is why
>>> I thought I didn't need it with mysql vs. 5.
>>
>> Have you reported those errors?
>
> No.  I wanted to see if it was something in the script that I could fix
> first but
> I haven't had a chance to look into this.
>
>
> From the UPGRADING.mysql file in rt-3.8.1, it says:
>
>>=== Upgrading RT from versions prior to 3.8.0 ===
>>
>>4) Apply mysql 4.0->4.1 schema changes. RT tarball has script
>>etc/upgrade/schema.mysql-4.0-4.1.pl that generates SQL queries to upgrade
>> schema of
>>the DB. Run it:
>>
>>    perl etc/upgrade/schema.mysql-4.0-4.1.pl db user pass > sql.queries
>
> When I ran this command, I got the error:
>
> [root at rt rt-3.8.1]# perl etc/upgrade/schema.mysql-4.0-4.1.pl  db user pass
>  (using db=rt3 and user=root or rt_user)
> DBD::mysql version 4.002 required--this is only version 3.0007 at
> etc/upgrade/schema.mysql-4.0-4.1.pl line 7.
> BEGIN failed--compilation aborted at etc/upgrade/schema.mysql-4.0-4.1.pl
> line 7.

run:

perl -e 'use DBD::mysql 4.002'

DBD::mysql is a perl driver for mysql, it's a module available from
the CPAN. You can install it using 'cpan' program, from sources or
using packaging system of your distro, however your distribution most
probably has very old version of the driver.

Installing it from sources or via cpan can be a challenge for
unexperienced admins as perl modules usually make autotests. In this
case you'll need compiler as module has parts written in C, headers
for mysql-client libraries, a live mysql server with a DB to test
against and some user to test with.

Some people may suggest you ignore test step or its failures, but it's
direct way to shoot your leg with exit point in your head. Don't panic
if tests fail. Make sure you've done them right and report whole log
via http://rt.cpan.org (almost all perl modules has a queue there) so
authors can fix it later. Then install newer DBI module, it's a perl
abstract database interface that make it possible to talk to many DBs
using the same API. All DBD::* drivers are extensions for DBI and
there is close interconnection between version of DBI module and any
DBD::* driver. I don't know why, but mysql developers don't want to
increase requirement on version of DBI module. Anyway experience shows
that it's better to use newer DBI with newer DBD::mysql as developers
often use the latest versions and have no resources to test against
older versions.

It could sound scary, but it's actually easy.

>
> [root at rt rt-3.8.1]# mysql --version
> mysql  Ver 14.12 Distrib 5.0.45, for redhat-linux-gnu (i686) using readline
> 5.0
>
> [root at rt rt-3.8.1]# cat /etc/redhat-release
> CentOS release 5.2 (Final)
>
> I don't quite understand the error.  This is a fresh install of centos and I
> followed the upgrade
> procedures.  I assumed since it was for mysql-4.0 and 4.1 that the error
> resulted from the fact
> that I have mysql vs. 5.0.45.  However, Panu suggested that it should also
> be run for
> mysql vs. 5.
>
> thanks.
>
> janet
>
>
>
>>
>>
>>>> If you upgrade from version below 3.8 and use Mysql you have to use the
>>>> method describe above.
>>>>
>>>> The schema script has some bugs so make sure you check the things it
>>>> suggests changing (and better yet try to understand what they mean,
>>>> luckily I got help pointing the errors for me probably saving some time
>>>> and frustration)
>>>
>>> Thanks for your help.
>>>
>>> j
>>> _______________________________________________
>>> List info:
>>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> Spam detection software, running on the system "raincoat.cfa.harvard.edu",
>> has
>> identified this incoming email as possible spam.  The original message
>> has been attached to this so you can view it (if it isn't spam) or label
>> similar future email.  If you have any questions, see
>> fst at ipa.harvard.edu for details.
>>
>> Content preview:  On Tue, Oct 14, 2008 at 4:11 PM, Janet L. Houser
>> <jhouser at cfa.harvard.edu>
>>   wrote: > Hi Panu, > >>> >>> mysql db is version 5 (both prior and post
>> upgrade)
>>   and didn't have to >>> be upgraded using: >>> >>> perl
>> etc/upgrade/schema.mysql-4.0-4.1.pl
>>   db user pass > sql.queries >>> >>> Do you happen to know how to fix this
>>  problem the "proper" way? >> >> Answer below: >> >>>> This should be done
>>  even if you already have mysql 5 or 4.1 >>>> installed. Better name for
>> the
>>   file should be >>>> "mysql_schema_upgrade_for_3.8.1" IMO. > > > Yeah, I
>> tried
>>   this and it gave me errors and wouldn't run. That is why > I thought I
>> didn't
>>   need it with mysql vs. 5. Have you reported those errors? [...]
>> Content analysis details:   (4.8 points, 4.0 required)
>>
>>  pts rule name              description
>> ---- ----------------------
>> --------------------------------------------------
>>  1.4 SPF_NEUTRAL            SPF: sender does not match SPF record
>> (neutral)
>> [SPF failed: Please see
>> http://www.openspf.org/why.html?sender=ruslan.zakirov%40gmail.com&ip=131.142.41.8&receiver=raincoat.cfa.harvard.edu]
>>  2.0 DNS_FROM_SECURITYSAGE  RBL: Envelope sender in
>>                            blackholes.securitysage.com
>>  1.4 DNS_FROM_RFC_POST      RBL: Envelope sender in
>> postmaster.rfc-ignorant.org
>>
>>
>
> --
> Dr. Janet L. Houser
> Chandra X-ray Observatory
> Smithsonian Astrophysical Observatory
> Mail Stop 33
> 60 Garden Street
> Cambridge, MA  02138
> E-mail:    jhouser at cfa.harvard.edu
> Telephone: 617-496-7082
> Fax:       617-496-7049
>



-- 
Best regards, Ruslan.


More information about the Rt-devel mailing list