Hardware upgrade v3.0.10 to 3.60

I’m guessing I have to do at least “two” steps to make the database
upgrade from 3.0.10 to 3.6.0?

Is this advisable? I didn’t see any schema/acl upgrade notes in 3.6 for
version 3.0.10. Does this mean I have to go to an earlier version of RT
and “bump” the acvl/schema "twice?

I would be going from mysql 3.23.58 to 4.1.20.

Any thoughts or experiences would be appreciated.

Thanks,

Tony

“Tony Graziano” tgraziano@myitdepartment.net 07/07/06 9:22 AM >>>
I’m guessing I have to do at least “two” steps to make the database
upgrade from 3.0.10 to 3.6.0?

As per the README:
You may also need to update RT’s database. To find out, type:
ls etc/upgrade
For each item in that directory whose name is greater than
your previously installed RT version, run:
/opt/rt3/sbin/rt-setup-database --action schema
–datadir etc/upgrade/
/opt/rt3/sbin/rt-setup-database --action acl
–datadir etc/upgrade/
/opt/rt3/sbin/rt-setup-database --action insert
–datadir etc/upgrade/
Since all version numbers in etc/upgrade in the 3.6.0 distribution are greater than 3.0.10, run the above commands aganst each of the directories sequentially in order of increasing version number. You do not need to download any versions of RT older than the current release. Backing up first is a good idea.

This does seem to confuse a lot of people; perhaps new documentation is in order?

Tim Smith

As per the readme I run the scripts after make upgrade’. I have two
copies of the database before performing the procedure (live on the
original 3.0.10 server and a copy on this server in another directory).

I confirmed and flushed privileges and reset the root password for
mysql. I dont get the error message when logging into mysql directly.

/opt/rt3/sbin/rt-setup-database --action schema --datadir
etc/upgrade/3.1
DBI connect(‘dbname=rt3;host=localhost’,‘’,…) failed: Access denied
for user ‘root’@‘localhost’ (using password: NO) at
/opt/rt3/sbin/rt-setup-database line 169
Use of uninitialized value in concatenation (.) or string at
/opt/rt3/sbin/rt-setup-database line 169.
Failed to connect to dbi:mysql:;host=localhost as : Access denied for
user ‘root’@‘localhost’ (using password: NO) at
/opt/rt3/sbin/rt-setup-database line 169.

It appears I have to upgrade the schema/acl, etc. six times to get to
this version with these commands.

   /opt/rt3/sbin/rt-setup-database --action schema \         

–datadir etc/upgrade/
/opt/rt3/sbin/rt-setup-database --action acl
–datadir etc/upgrade/
/opt/rt3/sbin/rt-setup-database --action insert
–datadir etc/upgrade/

I can’t find a reason for this in the Wiki. I’ve tried changing the
RT_SiteConfig.pm in both the /tmp and /oprt/rt3/etc directory with a
working user/password, and still does not work. I don’t have any missing
dependencies and am running with mod_perl2 and fastcgi (fastcgi is
configured and works on apache 2.0).

What am I doing incorrect?

“Timothy Smith” tsmith@loc.gov 07/07/06 09:34 AM >>>
“Tony Graziano” tgraziano@myitdepartment.net 07/07/06 9:22 AM >>>
I’m guessing I have to do at least “two” steps to make the database
upgrade from 3.0.10 to 3.6.0?

As per the README:
You may also need to update RT’s database. To find out, type:
ls etc/upgrade
For each item in that directory whose name is greater than
your previously installed RT version, run:
/opt/rt3/sbin/rt-setup-database --action schema
–datadir etc/upgrade/
/opt/rt3/sbin/rt-setup-database --action acl
–datadir etc/upgrade/
/opt/rt3/sbin/rt-setup-database --action insert
–datadir etc/upgrade/
Since all version numbers in etc/upgrade in the 3.6.0 distribution are
greater than 3.0.10, run the above commands aganst each of the
directories sequentially in order of increasing version number. You do
not need to download any versions of RT older than the current release.
Backing up first is a good idea.

This does seem to confuse a lot of people; perhaps new documentation is
in order?

Tim Smith

I got the exact same error today when installing RTFM, which has a similar
database setup procuedure. I think perhaps I should have run ./configure
with some other options, but I fixed the problem as follows:

*  Needed to make the following change in their

inc/Module/Install/RTx/Factory.pm:

my @args = (
“-Ilib”, “-I$lib_path”,
“$RT::SbinPath/rt-setup-database”,
“–action” => $action,
“–datadir” => “etc”,
“–datafile” => “etc/initialdata”,
“–dba” => $RT::DatabaseUser,
“–dba-password” => $RT::DatabasePassword, #<- Tcb added this line-otherwise password rejected
);

After that it read the pw as well as the account from the RT_SiteConfig
file and everything worked.

Travis

Travis C. Brooks
SPIRES Scientific Databases Manager
Stanford Linear Accelerator Center
http://www.slac.stanford.edu/spiresOn Fri, 7 Jul 2006, Tony Graziano wrote:

As per the readme I run the scripts after make upgrade’. I have two
copies of the database before performing the procedure (live on the
original 3.0.10 server and a copy on this server in another directory).

I confirmed and flushed privileges and reset the root password for
mysql. I dont get the error message when logging into mysql directly.

/opt/rt3/sbin/rt-setup-database --action schema --datadir
etc/upgrade/3.1
DBI connect(‘dbname=rt3;host=localhost’,‘’,…) failed: Access denied
for user ‘root’@‘localhost’ (using password: NO) at
/opt/rt3/sbin/rt-setup-database line 169
Use of uninitialized value in concatenation (.) or string at
/opt/rt3/sbin/rt-setup-database line 169.
Failed to connect to dbi:mysql:;host=localhost as : Access denied for
user ‘root’@‘localhost’ (using password: NO) at
/opt/rt3/sbin/rt-setup-database line 169.

It appears I have to upgrade the schema/acl, etc. six times to get to
this version with these commands.

   /opt/rt3/sbin/rt-setup-database --action schema \

–datadir etc/upgrade/
/opt/rt3/sbin/rt-setup-database --action acl
–datadir etc/upgrade/
/opt/rt3/sbin/rt-setup-database --action insert
–datadir etc/upgrade/

I can’t find a reason for this in the Wiki. I’ve tried changing the
RT_SiteConfig.pm in both the /tmp and /oprt/rt3/etc directory with a
working user/password, and still does not work. I don’t have any missing
dependencies and am running with mod_perl2 and fastcgi (fastcgi is
configured and works on apache 2.0).

What am I doing incorrect?

“Timothy Smith” tsmith@loc.gov 07/07/06 09:34 AM >>>
“Tony Graziano” tgraziano@myitdepartment.net 07/07/06 9:22 AM >>>
I’m guessing I have to do at least “two” steps to make the database
upgrade from 3.0.10 to 3.6.0?

As per the README:

 You may also need to update RT's database.  To find out, type:
   ls etc/upgrade
 For each item in that directory whose name is greater than
 your previously installed RT version, run:
   /opt/rt3/sbin/rt-setup-database --action schema \
       --datadir etc/upgrade/<version>
   /opt/rt3/sbin/rt-setup-database --action acl \
       --datadir etc/upgrade/<version>
   /opt/rt3/sbin/rt-setup-database --action insert \
        --datadir etc/upgrade/<version>

Since all version numbers in etc/upgrade in the 3.6.0 distribution are
greater than 3.0.10, run the above commands aganst each of the
directories sequentially in order of increasing version number. You do
not need to download any versions of RT older than the current release.
Backing up first is a good idea.

This does seem to confuse a lot of people; perhaps new documentation is
in order?

Tim Smith


The rt-users Archives

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

We’re hiring! Come hack Perl for Best Practical: Careers — Best Practical Solutions

I’ve just installed RTFM (2.2rc2 with RT3.6) and the make install dumped
the new html/ directory in my /opt/rt3 directory. In order to work, I
need to put the html in either /opt/rt3/share/ or /opt/rt3/local/, both
will work, of course, but which should I do?

If I put it in share, presumably upgrading RT will neccessitate
re-installing RTFM, but local will mean that upgrades to RTFM stand a
chance of overwriting local customizations. Neither of these seems
optimal. I note that it dumped the perl into /opt/rt3/lib, not
/opt/rt3/local/lib, but since the makefile didn’t seem to understand where
to put the html, I’m not sure it knew where to put the perl. Does anyone
have any experience with this, or advice.

Possibly another way of asking the same question is when doing perl
Makefile.PL, should PREFIX be /opt/rt3 or /opt/rt3/local?

Finally, while doing the same procedure, I noticed that
/inc/Module/Install/RTx/Factory.pm → RTxInitDB seemed to need an extra
argument in @args to work correctly with a password when updating the
database. I posted the modification in response to another question on
this list, but it is:

  • Needed to make the following change in their
    inc/Module/Install/RTx/Factory.pm:
    my @args = (
    “-Ilib”, “-I$lib_path”,
    “$RT::SbinPath/rt-setup-database”,
    “–action” => $action,
    “–datadir” => “etc”,
    “–datafile” => “etc/initialdata”,
    “–dba” => $RT::DatabaseUser,
    “–dba-password” => $RT::DatabasePassword, #<- Tcb added this
    line-otherwise password rejected
    );

Without this modification rt-setup-database failed, it did not prompt for
the password, it just complained that there was none.

Thanks
Travis

Travis C. Brooks
SPIRES Scientific Databases Manager
Stanford Linear Accelerator Center
http://www.slac.stanford.edu/spires

I have now updated the schema/acl/db from 3.0.10 to 3.6.

The prior mysql db was running MyISAM. Updating the schema using the
provided upgrade scripts did not work properly as a result.

I did a mysqldump

/usr/bin/mysqldump --user=rt_user –-password=rt_pass --add-drop-table
–opt --skip-lock-tables --single-transaction
–default-character-set=binary --databases rt3 > /home/rt3/rt.sql

dropped the database and changed all the server types from MyISam to
InnoDB with a text editor and saved it.

If your database is very large, the dump file may be too large to fit in
your text editor. If so, you can use a batch editor like sed to make the
changes.

I added
SET AUTOCOMMIT = 0; to the beginning of the dump file, and add the
COMMIT;
command to the end.

“By default, autocommit is on, meaning that each and every insert
command in the dump file will be treated as a separate transaction and
written to disk before the next one is started. If you don’t add these
commands, reloading a large database into InnoDB can take many hours.”

I edited the /etc/my.cnf file to read

default-storage-engine=innodb
innodb_data_home_dir = /ibdata1

restarted mysqld

then I made sure the database was gone and I imported the sql file

mysql --user=rt_ser --password=rt_pass < /home/rt3/rt.sql

This took longer then a normal import because of the way innodb writes
the db files.

by looking at

ls -l /var/lib/mysl

during the import I was able to determine the data was importing, I had
about a 600MB attachment table, and could see it progress. Once the DB
was imported, I restarted msqld for good measure. The first time it may
take a while to initialize the innodb.

Now I can login to RT.

I’m having an issue still with any email coming in to the system not
being received by RT. Sendmail is giving a “user unknown” for every
message in its log files.

I’ve tried everything I can find in the wiki.

Any suggestions?

The issue was resolved. When doing the ‘make upgrade’ as per the readme,
their was an assumption this was an in place upgrade. After running the
schema updates, it might not have happened if a ‘make install’ had been
run again, I’m not sure.

/usr/sbin/smrsh root:root gid was changed to root:rt3

Then things were working fine. Thanks for the feedback.

I'm having an issue still with any email coming in to the system not being received by RT. Sendmail is giving a "user unknown" for every message in its log files.

I’ve tried everything I can find in the wiki.

Any suggestions?