[request-tracker-maintainers] Bug#710027: Bug#710027: /usr/sbin/rt-setup-database-4: ignores $DatabasePort

Dominic Hargreaves dom at earth.li
Tue May 28 23:51:00 UTC 2013


Control: tags -1 + moreinfo

On Mon, May 27, 2013 at 05:25:23PM +0200, Sebastian Ullrich wrote:
> Package: request-tracker4
> Version: 4.0.7-5+deb7u2
> Severity: critical
> File: /usr/sbin/rt-setup-database-4
> Tags: upstream
> Justification: causes serious data loss
> 
> $DatabasePort from the config isn't read anywhere in setup-database.
> This is quite critical if you want to update (or even drop) your rt-4
> Postgres test database running on an alternative port but your
> production rt-3.6 db on the default port is updated instead.

rt-setup-database only accesses the config items directly for the
purposes of displaying some informational output. The database handle
is actually set up in /usr/share/request-tracker4/lib/RT/Handle.pm,
sub BuildDSN and that does DatabasePort.

I tried a test of this, and found that rt-setup-database did see the
port setting:

$  grep DatabasePort /etc/request-tracker4/RT_SiteConfig.pm 
Set($DatabasePort, '1111');
$ /usr/share/dbconfig-common/scripts/request-tracker4/upgrade/pgsql/4.0.7-5+deb7u2 
Working with:
Type:   Pg
Host:   localhost
Name:   rtdb
User:   requesttracker4
DBA:    requesttracker4 (No DBA)
Failed to connect to dbi:Pg:dbname=rtdb;host=localhost;port=1111 as user 'requesttracker4': could not connect to server: Connection refused
        Is the server running on host "localhost" (127.0.0.1) and accepting
        TCP/IP connections on port 1111?$ ^C

Please could you provide more information of the circumstances which led
to you seeing this, ideally a set of steps to reproduce from a clean
setup?

Cheers,
Dominic.

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)



More information about the pkg-request-tracker-maintainers mailing list