Ugly Migration

Well… we’re preparing to go to rt2.

As part of this, I kludged the rt2 serial number up to > 5000, as we have
around 4400 tickets in RT1.

Unfortunately, If I reply to an rt1 ticket (say, #4100) and it gets put
into rt2, the MTA (postfix) spits back an erorr message, which is included
below.

This only happens when I include [UTS #4100] in the subject line.

I fear this will be very icky. Anyone got any thoughts?

ioffice2@rt.itd.uts.edu.au: Command died with status 2:
"/usr/local/rt2/bin/rt-mailgate --queue ioffice --action correspond".
Command output: Permission DeniedCan’t locate
Mail/Mailer/sendmailpipe.pm
in @INC (@INC contains: /usr/local/rt2/etc /usr/local/rt2/lib
/usr/local/perl-5.6.1/lib/perl5/5.6.1/sun4-solaris
/usr/local/perl-5.6.1/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris
/usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl)
at
(eval 36) line 3.

T�o de Hesselle, | Kites rise highest against
Unix Systems Administrator | the wind – not with it.
|
University of Technology, Sydney | – Winston Churchill

What version of RT? There was an error condition message that didn’t work
with sendmailpipe before 2.0.5.

-jOn Wed, Aug 22, 2001 at 05:07:05PM +1000, Teo de Hesselle wrote:

Well… we’re preparing to go to rt2.

As part of this, I kludged the rt2 serial number up to > 5000, as we have
around 4400 tickets in RT1.

Unfortunately, If I reply to an rt1 ticket (say, #4100) and it gets put
into rt2, the MTA (postfix) spits back an erorr message, which is included
below.

This only happens when I include [UTS #4100] in the subject line.

I fear this will be very icky. Anyone got any thoughts?

ioffice2@rt.itd.uts.edu.au: Command died with status 2:
"/usr/local/rt2/bin/rt-mailgate --queue ioffice --action correspond".
Command output: Permission DeniedCan’t locate
Mail/Mailer/sendmailpipe.pm
in @INC (@INC contains: /usr/local/rt2/etc /usr/local/rt2/lib
/usr/local/perl-5.6.1/lib/perl5/5.6.1/sun4-solaris
/usr/local/perl-5.6.1/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris
/usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl)
at
(eval 36) line 3.


Téo de Hesselle, | Kites rise highest against
Unix Systems Administrator | the wind – not with it.
|
University of Technology, Sydney | – Winston Churchill


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

http://www.bestpractical.com/products/rt – Trouble Ticketing. Free.

I’m just about ready to migrate my data from 1.07 to 2.0.4.

First question: Should I put 2.05 online first?

Second question: What’s the easiest way to remove the three test tickets I
have in the new database, before converting the old data?

Thanks in advance!

Russ Johnson
Stargate Online

http://www.dimstar.net
telnet://telnet.dimstar.net
ICQ: 3739685

2.0.5_03 does add new functionality and remove some bugs.
to do an import, you’re going to have to drop your RT database, anyway…On Wed, Aug 22, 2001 at 01:06:15PM -0700, Russ Johnson wrote:

I’m just about ready to migrate my data from 1.07 to 2.0.4.

First question: Should I put 2.05 online first?

Second question: What’s the easiest way to remove the three test tickets I
have in the new database, before converting the old data?

Thanks in advance!

Russ Johnson
Stargate Online

http://www.dimstar.net
telnet://telnet.dimstar.net
ICQ: 3739685


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

http://www.bestpractical.com/products/rt – Trouble Ticketing. Free.

Jesse Vincent wrote:

What version of RT? There was an error condition message that didn’t work
with sendmailpipe before 2.0.5.

I’m now using 2.0.5_3, and am getting a new error message when I send in
an email with a subject including [UTS #4990] (our rt2 database starts at
5000).

Here’s the mail sent from RT:From: “rt@rt”.itd.uts.edu.au@rt.itd.uts.edu.au
To: teo.dehesselle@uts.edu.au
Subject: Correspondence not recorded
Message-Id: 20010823015823.AC1354013F@rt.itd.uts.edu.au
Date: Thu, 23 Aug 2001 11:58:23 +1000 (EST)

Permission Denied

[then a MIME-attached copy of the email sent in].

Anyone got any ideas?

T�o de Hesselle, | Kites rise highest against
Unix Systems Administrator | the wind – not with it.
|
University of Technology, Sydney | – Winston Churchill

OK, I’ve upgraded to 2.0.5_03.

I dropped the old database.

When I attempt to run the import utility, everything works fine, up until this:

2122…transactions: 9203.done.

can’t parse Content-Type: multipart/mixed; boundary="<<001-3b333a08-5cd9>>"
for boundry at ./import-1.0-to-2.0 line 725, line 222428.

Any ideas on that I need to do?

At 05:39 PM 8/22/2001 -0400, Jesse Vincent wrote:

2.0.5_03 does add new functionality and remove some bugs.
to do an import, you’re going to have to drop your RT database, anyway…

Russ Johnson
Stargate Online

http://www.dimstar.net
telnet://telnet.dimstar.net
ICQ: 3739685

It looks like the regexp in import-1.0-to-2.0 doesn’t accept < and > as boundary
characters. One way to fix it would be to change the regexps (I’d love a patch). The quick fix is probably to go edit the mail message and change the boundary conditions by hand.On Thu, Aug 23, 2001 at 04:16:41PM -0700, Russ Johnson wrote:

OK, I’ve upgraded to 2.0.5_03.

I dropped the old database.

When I attempt to run the import utility, everything works fine, up until this:

2122…transactions: 9203.done.

can’t parse Content-Type: multipart/mixed; boundary="<<001-3b333a08-5cd9>>"
for boundry at ./import-1.0-to-2.0 line 725, line 222428.

Any ideas on that I need to do?

At 05:39 PM 8/22/2001 -0400, Jesse Vincent wrote:

2.0.5_03 does add new functionality and remove some bugs.
to do an import, you’re going to have to drop your RT database, anyway…

Russ Johnson
Stargate Online

http://www.dimstar.net
telnet://telnet.dimstar.net
ICQ: 3739685


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

http://www.bestpractical.com/products/rt – Trouble Ticketing. Free.

| It looks like the regexp in import-1.0-to-2.0 doesn’t accept < and > as
| boundary characters. One way to fix it would be to change the regexps
| (I’d love a patch). The quick fix is probably to go edit the mail message
| and change the boundary conditions by hand.
±–>8

It just occurred to me that that error should not be fatal, although
dropping the ticket on the floor with a warning is fine. Anyone else get
lots of copies of Sircam in their queues? :-/ There is a missing closing
MIME boundary in the message it sends…

brandon s. allbery [os/2][linux][solaris][freebsd] allbery@kf8nh.apk.net
system administrator [JAPH][WAY too many hats] allbery@ece.cmu.edu
electrical and computer engineering KF8NH
carnegie mellon university [linux: proof of the million monkeys theory]

Here’s the code for that:

while ( my $header = shift @headers ) {
if ( $header =~
/^content-type:\smultipart/(alternative|mixed|report|signed|digest|related)\s;/i
) {
my $two = 0;
my $boundary;
if ( $header =~
/;\sboundary="?([-\w.=/+%]+)"?/i ) {
$boundary = $1;
} elsif ( $header =~ /;\s
boundary=\s*$/i ) {
#special case for actual boundary on next line
die unless $headers[0] =~
/\s+"?([-\w.=/+%]+)"?/i;
$boundary = $1;
$two = 1;
} elsif ( $headers[0] =~ /(^|;)\sboundary="([
-\w.=/+%]+)"/i ) { #embedded space, quotes not optional
$boundary = $2;
$two = 1;
} elsif ( $headers[0] =~
/(^|;)\s
boundary="?([-\w.=/+%]+)"?/i ) {
$boundary = $2;
$two = 1;
} elsif ( $headers[1] =~
/(^|;)\sboundary="?([-\w.=/+%]+)"?/i ) {
$boundary = $2;
$two = 2;
} elsif ( $headers[2] =~
/(^|;)\s
boundary="?([-\w.=/+%]+)"?/i ) {
#terrible false laziness.
$boundary = $2;
$two = 3;
} else {
die “can’t parse $header for boundry”;
}
warn “looking for $boundary in body\n” if $Debug;
unless ( grep /^(--)?\Q$boundary\E(--)?$/, @body ) {
splice(@headers, 0, $two);
until ( !scalar(@headers) || $headers[0] =~ /^\S/ ) {
warn “**WARNING throwing away header fragment:
”. shift @headers;
}
warn “false Content-type: header removed\n”;
next;
}
}
push @n_headers, $header;
}

Unfortunately, I’m nowhere near the perl programmer to know what would need
to be changed.

At 07:45 PM 8/23/2001 -0400, you wrote:>On Thursday, August 23, 2001 19:36:36 -0400, Jesse Vincent jesse@bestpractical.com wrote:

±----
| It looks like the regexp in import-1.0-to-2.0 doesn’t accept < and > as
| boundary characters. One way to fix it would be to change the regexps
| (I’d love a patch). The quick fix is probably to go edit the mail message
| and change the boundary conditions by hand.
±–>8

It just occurred to me that that error should not be fatal, although
dropping the ticket on the floor with a warning is fine. Anyone else get
lots of copies of Sircam in their queues? :-/ There is a missing closing
MIME boundary in the message it sends…


brandon s. allbery [os/2][linux][solaris][freebsd] allbery@kf8nh.apk.net
system administrator [JAPH][WAY too many hats] allbery@ece.cmu.edu
electrical and computer engineering KF8NH
carnegie mellon university [linux: proof of the million monkeys theory]


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Russ Johnson
Stargate Online

http://www.dimstar.net
telnet://telnet.dimstar.net
ICQ: 3739685

Well… in case anyone ever finds this useful…

What I’m going to do is create stub entries in the Tickets table, using
the id, requestor and subject from the rt1 database. I have also commented
out one of the if conditions from Ticket->Correspond:

# TODO this bit of logic should really become a scrip for 2.2
if ( #TDH# ($TransObj->IsInbound) and
    ($self->Status ne 'open') and
    ($self->Status ne 'new')
   ) 

This fixes our problem with re-opening resolved tickets in RT2 upon
correspondence, which is unrelated to the ugly-migration issues.
T�o de Hesselle, | Kites rise highest against
Unix Systems Administrator | the wind – not with it.
|
University of Technology, Sydney | – Winston Churchill

OK, I’ve done a little hacking that allowed me to finish the import.

I changed this starting at line 724:

else {
die “can’t parse $header for boundry”;
}

To this:

else {
#die “can’t parse $header for boundry”;
print “Discarding unknown: $header for boundry\n”;
next;
}

That’s probably not the “right” thing to do, but it did let the import
finish. Like I said, I’m not too experienced with perl/regex. It does look
like this is discarding all the headers for that message, so I’m fairly
confident that it’s not the right thing to do.

At 07:36 PM 8/23/2001 -0400, Jesse Vincent wrote:

It looks like the regexp in import-1.0-to-2.0 doesn’t accept < and > as
boundary
characters. One way to fix it would be to change the regexps (I’d love a
patch). The quick fix is probably to go edit the mail message and change
the boundary conditions by hand.

OK, I’ve upgraded to 2.0.5_03.

I dropped the old database.

When I attempt to run the import utility, everything works fine, up
until this:

2122…transactions: 9203.done.

can’t parse Content-Type: multipart/mixed;
boundary="<<001-3b333a08-5cd9>>"
for boundry at ./import-1.0-to-2.0 line 725, line 222428.

Any ideas on that I need to do?

At 05:39 PM 8/22/2001 -0400, Jesse Vincent wrote:

2.0.5_03 does add new functionality and remove some bugs.
to do an import, you’re going to have to drop your RT database,
anyway…

Russ Johnson
Stargate Online

http://www.dimstar.net
telnet://telnet.dimstar.net
ICQ: 3739685


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users


http://www.bestpractical.com/products/rt – Trouble Ticketing. Free.


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Russ Johnson
Stargate Online

http://www.dimstar.net
telnet://telnet.dimstar.net
ICQ: 3739685