[rt-users] Domain name change?

Bruce Campbell bruce_campbell at ripe.net
Thu Feb 7 07:51:46 EST 2002

On Wed, 6 Feb 2002, RT2 Troubles, still without a Name wrote:

> Well this stinks.. I setup RT2 for our organization and they suddenly want to

Not 'stinks'.  Its good that they want to use RT in a more widespread
fashion.  Tell them to give money to starving programmers ;)

> use it as a global tracking system rather than a local system. This means
> that instead of rt.foo-bar.com they want the RT system to identify itself as
> rt.foo.com in the web interface and all the E-Mail correspondence. I have
> already told the people in charge that the domain change would likely break
> RT since it probably uses the domain name right down to the ticketing level.
> However I'm very unsure of the issues and I'd really like input from people
> who have tried this or understand RT well enough to speculate on the possible
> issues.
> If it is possible to make the change with little hassles, I'm sure my next
> question would be something like, "in which files is RT refering to the
> domain information?" so I know what needs to be changed.

The only file where the domain is declared is etc/config.pm, as the
$rtname variable.  The catch with changing this is described in the
comments above:

	# Your domain name is recommended, so as not to pollute the namespace.
	# once you start using a given tag, you should probably never change it.
	# (otherwise, mail for existing tickets won't get put in the right place


With RT, everything uses the contents of the $rtname variable, so you _DO
NOT CHANGE THIS LIGHTLY_.   But, with RT, everything uses the SQL tables.

Looking through the SQL, the main issue that you will have to fix is the
Links table, being based on $TicketBaseURI, itself based on $Organization
and $rtname.  You will also have problems immediately around the
changeover time as RT's loop prevention (X-Loop) is based on $rtname, but
these will go away in due course (see mention of filter program below).

Referring to old tickets may result in multiple [] tags in the subject
line.  You will need to hack RT::Action::SendEmail to remove the old
$rtname from outgoing mails.

Personally I'd recommend writing a filter program to run before
rt-mailgate and rewrite the $rtname tag in Subject and X-Loop to the new
value to avoid hacking rt-mailgate.

You will also need to have some downtime on your SQL server to do a SQL
UPDATE on the Links table to rewrite all occurences of the old with the
new, so that all of your ticket merges are preserved.  Depending on how
many tickets you have, this might take Some Time(tm).


                             Bruce Campbell                            RIPE
                   Systems/Network Engineer                             NCC
                 www.ripe.net - PGP562C8B1B                      Operations

More information about the rt-users mailing list