ExternalAuth, local users, and upgrade woes

I’ve been poking around in the databases…

In the virgin RT4 database (the one we created from scratch) the
password
field is varchar(256).

In the converted RT3->RT4 database the password field is varbinary(40).

In the original RT3 database, the password field is varbinary(40).

I don’t know enough about mysql but that doesn’t seem right. Can some
mysql gurus clue me in?

It looks like you didn’t run the database upgrade scripts.
On 4.0.3 after running make upgrade it should tell you about
make upgrade-database. There is a step that the automated process
runs which converts you to a varchar(256).

There are a lot of important changes between 3.8 and 4.0 that happen
at the database level, including lots of new columns and tables.

Unless I really screwed something up, this is the command I used. It
asked me for which version to start from and then ran a whole bunch of
steps.

/opt/rt4/sbin/rt-setup-database -dba root -p --action upgrade

Is there another command I should have run?

How can I verify I ran the process correctly?

Pain is temporary. It may last a minute, or an hour, or a day, or a year,
but eventually it will subside and something else will take its place. If
I quit, however, it lasts forever.

I’ve been poking around in the databases…

In the virgin RT4 database (the one we created from scratch) the
password
field is varchar(256).

In the converted RT3->RT4 database the password field is varbinary(40).

In the original RT3 database, the password field is varbinary(40).

I don’t know enough about mysql but that doesn’t seem right. Can some
mysql gurus clue me in?

It looks like you didn’t run the database upgrade scripts.
On 4.0.3 after running make upgrade it should tell you about
make upgrade-database. There is a step that the automated process
runs which converts you to a varchar(256).

There are a lot of important changes between 3.8 and 4.0 that happen
at the database level, including lots of new columns and tables.

Unless I really screwed something up, this is the command I used. It
asked me for which version to start from and then ran a whole bunch of
steps.

/opt/rt4/sbin/rt-setup-database -dba root -p --action upgrade

Is there another command I should have run?

That’s the command

How can I verify I ran the process correctly?

Look at the output of the command and your database logs. Since your
schema isn’t upgraded, something failed. You can look through
etc/upgrade/relevant-versions/* and see what else should have run.

-kevin

If you’re having trouble managing RT internal users while logged in as
an LDAP user, please see Ruslan’s response about possible bugs. Try
logging in as root and seeing if that helps.

Is the bug report public? If so, where?

If there is an existing bug report it would be in the rt.cpan.org
queue for RT-Authen-ExternalAuth. If there is no report, please make
one.

https://rt.cpan.org/Ticket/Display.html?id=71744

-kevin


RT Training Sessions (http://bestpractical.com/services/training.html)

  • Barcelona, Spain — November 28 & 29, 2011

Best regards, Ruslan.

Look at the output of the command and your database logs. Since your
schema isn’t upgraded, something failed. You can look through
etc/upgrade/relevant-versions/* and see what else should have run.

OK, a cursory look says that everything updated except for the user table.
(??)

I don’t have the records of the original command…

I dumped the table, changed the password type, and stuffed it back into
the database. Seems to be working now.

I have no idea what would cause this one update to fail. I have all of
the additional tables and the schemas seem to be OK…

Pain is temporary. It may last a minute, or an hour, or a day, or a year,
but eventually it will subside and something else will take its place. If
I quit, however, it lasts forever.