Using RT w/ Perl::Mason on Cobalt with Virtual Host

Apologies for cross posting. I have been periodically attempting to
install RT (http://www.fsck.com/projects/rt) on my Sun Cobalt RaQ XTR
(http://www.sun.com/hardware/serverappliances/xtr/index.html).

In previous attempts I would reach a point where I would restart the
web server and get complaints about the document being outside of
component root.

This is complicated by the Virtual Host directive and something odd
built into the RaQ that I don’t quite understand. It seems that it is
very hard to get the installation to work on a RaQ with the programs
installed as I installed them. I’m hopeful I can simply change a few
directives in my httpd.conf and it will work.

I created a new virtual host to use for my support website with RT. By
default the RaQ will create a site with the root, as this would be the second site
on this server, in /home/sites/site2/web. I changed the
DocumentRoot as specified in the excerpt from my httpd.conf
below. Since I want to use my RT instalation I changed the document
root to /home/opt/rt2/WebRT/html. If I specify the location block for
the root, i.e. , then Mason complains that the component
is outside of root.

When I changed it to be as it is below (Starting with ', many directives and elements
displayed on the page, but I stopped getting the errors. It
displayed:<& /Elements/Header, Title=>“Start page”, Refresh =>
$session{‘home_refresh_interval’} &> <& /Elements/Tabs, current_toptab
=> ‘’ &> <& /Elements/CustomHomepageHeader, %ARGS &> <&
/Elements/MyTickets &> <& /Elements/MyRequests &> <&
/Elements/Quicksearch &> <& /Elements/Refresh, Name =>
‘HomeRefreshInterval’, Default => $session {‘home_refresh_interval’}
&> <%init> if ($ARGS{‘HomeRefreshInterval’}) {
$session{‘home_refresh_interval’} = $ARGS{‘HomeRefreshInterval’}; }

<VirtualHost 10.2.1.5>
ServerName support.x.y.com
ServerAdmin admin
#DocumentRoot /home/sites/site2/web
DocumentRoot /home/opt/rt2/WebRT/html
ServerAlias support.x.y.us support.x.y.org
ErrorDocument 401 /error/401-authorization.html
ErrorDocument 403 /error/403-forbidden.html
ErrorDocument 404 /error/404-file-not-found.html
ErrorDocument 500 /error/500-internal-server-error.html
RewriteEngine on
RewriteCond %{HTTP_HOST} !^10.2.1.5(:80)?$
RewriteCond %{HTTP_HOST} !^10.2.1.5(:80)?$
RewriteCond %{HTTP_HOST} !^support.x.y.com(:80)?$
RewriteRule ^/(.) http://support.x.y.com/$1 [L
,R]
RewriteOptions inherit
#AliasMatch ^/~([^/]+)(/(.
))? /home/sites/site2/users/$1/web/$3
AliasMatch ^/~([^/]+)(/(.*))? /home/opt/rt2/WebRT/web/$3
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
#PerlModule Apache::DBI
##PerlFreshRestart On
PerlRequire /opt/rt2/bin/webmux.pl
<Location /home/opt/rt2>
SetHandler perl-script
PerlHandler RT::Mason

Josh Kuperman
josh@saratoga.lib.ny.us

Josh Kuperman wrote:

below. Since I want to use my RT instalation I changed the document
root to /home/opt/rt2/WebRT/html. If I specify the location block for
the root, i.e. , then Mason complains that the component
is outside of root.

You need – Location refers to URL-space, not
filesystem-space.

ErrorDocument 401 /error/401-authorization.html
ErrorDocument 403 /error/403-forbidden.html
ErrorDocument 404 /error/404-file-not-found.html
ErrorDocument 500 /error/500-internal-server-error.html
AliasMatch ^/~([^/]+)(/(.*))? /home/opt/rt2/WebRT/web/$3
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl

Try commenting these out, for a start…

#PerlModule Apache::DBI

… and uncommenting this one, and see what happens.

(Caveat: I am RaQ-ignorant; the above suggestions are
purely from an RT perspective.)
Phil Homewood, Systems Janitor, www.snapgear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances

Is there an easy way to prevent the owner of a ticket from resolving it?

We have a queue where additional approval needs to be given before
resolution of tickets.

Frances

Frances Russell wrote:

Is there an easy way to prevent the owner of a ticket from resolving it?

We have a queue where additional approval needs to be given before
resolution of tickets.

Nothing out of the box, but you could write a ScripAction to
accomplish a similar thing via an OnStatus condition and the
use of a second queue;

have the scrip check to see if the status is Resolved, and
if so, reopen it and switch it to the ForResolution queue.

Not exactly “easy”, but it might suit your purpose.

Another option might be to grant ModifyTicket only to those
who can resolve; but your ticket-owners might then find they
lose other useful abilities (for example, changing keywords
or reassigning tickets).
Phil Homewood, Systems Janitor, www.snapgear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances

At 09:12 08.08.2002 +1000, you wrote:

Is there an easy way to prevent the owner of a ticket from resolving it?

We have a queue where additional approval needs to be given before
resolution of tickets.

Frances

We had a similar problem and did a very unclean and evil hack to resolve it:

Tie the right to change a ticket’s status to a right you probably won’t
need that often (e.g. “modify template” on queues is seldom needed in our
case) and give this right to people who have to resolve tickets.

To do this you just have to add a few lines in Ticket.pm, but as I said
before, this is rather unclean and comes with some more problems:

  1. it is completely inscrutable for users and administrators
  2. updating RT will be more complicated
  3. you have to add a mechanism allowing the unprivileged people to state
    they resolved the ticket

Anyway, I can post the lines we added to Ticket.pm, if you want. But I
would rather stick to the suggestions posted by Phil Homewood and configure
a scrip and a second queue. I think about doing so in our RT, too…

Gordon.

I tried as you suggested and it made one problem very clear. With the virtual host entry defined as follows.

NameVirtualHost 10.0.1.195
<VirtualHost 10.0.1.195>
ServerName support.x.y.us
ServerAdmin admin
DocumentRoot /home/opt/rt2/WebRT/html
ServerAlias support.x.y.us support.x.org
PerlModule Apache::DBI
PerlFreshRestart On
PerlRequire /opt/rt2/bin/webmux.pl

SetHandler perl-script
PerlHandler RT::Mason

I wound up with errors from PERL because I built RT to run against the
perl installation in /opt/bin/perl but the server is running against
the /usr/bin/perl because my cobalt server is not easily updateable to
a contemporary version of perl - all of the web interface that
distinguishes a Cobalt Server is tied to the outdated perl. As such I
doubt I can get it to work unless there is a way to tell Apache to use
a different version of Perl for a virtual host or perhaps I could give
fastcgi a try. The basic error now is no Apache::DBI in @INC etc.On Thu, Aug 08, 2002 at 08:59:34AM +1000, Phil Homewood wrote:

Josh Kuperman wrote:

below. Since I want to use my RT instalation I changed the document
root to /home/opt/rt2/WebRT/html. If I specify the location block for
the root, i.e. , then Mason complains that the component
is outside of root.

You need – Location refers to URL-space, not
filesystem-space.

ErrorDocument 401 /error/401-authorization.html
ErrorDocument 403 /error/403-forbidden.html
ErrorDocument 404 /error/404-file-not-found.html
ErrorDocument 500 /error/500-internal-server-error.html
AliasMatch ^/~([^/]+)(/(.*))? /home/opt/rt2/WebRT/web/$3
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl

Try commenting these out, for a start…

#PerlModule Apache::DBI

… and uncommenting this one, and see what happens.

(Caveat: I am RaQ-ignorant; the above suggestions are
purely from an RT perspective.)

Phil Homewood, Systems Janitor, www.snapgear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances


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

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Josh Kuperman
josh@saratoga.lib.ny.us

Oh my it seems to almost be working. I abandoned Perl and went with
the fastcgi option, which RT also supports. Now my virtual host section
for my support site looks like this. I copied many lines from
suggestions in the email archive. I believe those ScriptAliaseMatch
lines are important and also it needs to be noted that my server at
least will scream about a symlink, so I had to spell out /home/opt/rt2
instead of just /opt/rt2; this is a mild Cobalt idiosyncrasy.

NameVirtualHost 10.0.8.195
<VirtualHost 10.0.8.195>
ServerName support.x.y.us
ServerAdmin admin
DocumentRoot /home/opt/rt2/WebRT/html
ServerAlias support.saratoga.lib.ny.us support.sspl.org
AddHandler fastcgi-script fcgi
FastCgiServer /home/opt/rt2/bin/mason_handler.fcgi
ScriptAliasMatch (./)$ /home/opt/rt2/bin/mason_handler.fcgi$1
ScriptAliasMatch (.
.html)$ /home/opt/rt2/bin/mason_handler.fcgi$1

The httpd log is complaining on a regular bases about some of the
scritps. Perhaps I need to do something, yet. Perhaps the module needs
to be updated. Any ideas are really appreciated.

Here are some of the log errors.

[Thu Aug 8 13:31:26 2002] [error] [client 192.168.1.20] FastCGI: server “/home/
opt/rt2/bin/mason_handler.fcgi” stderr: HTML::Mason::Component::run(‘HTM
L::Mason::Component::FileBased=HASH(0x8c1dbe8)’, ‘Create’, 1) called at /home/op
t/lib/perl5/site_perl/5.6.1/HTML/Mason/Request.pm line 654
[Thu Aug 8 13:31:26 2002] [error] [client 192.168.1.20] FastCGI: server “/home/
opt/rt2/bin/mason_handler.fcgi” stderr: eval {…} called at /home/opt/l
ib/perl5/site_perl/5.6.1/HTML/Mason/Request.pm line 654
[Thu Aug 8 13:31:26 2002] [error] [client 192.168.1.20] FastCGI: server “/home/
opt/rt2/bin/mason_handler.fcgi” stderr: HTML::Mason::Request::comp(‘HTML
::Mason::Request=HASH(0x8d36efc)’, ‘HASH(0x8d32264)’, ‘HTML::Mason::Component::F
ileBased=HASH(0x8c1dbe8)’, ‘Create’, 1) called at /home/opt/lib/perl5/site_perl/
5.6.1/HTML/Mason/Request.pm line 160
[Thu Aug 8 13:31:26 2002] [error] [client 192.168.1.20] FastCGI: server “/home/
opt/rt2/bin/mason_handler.fcgi” stderr: eval {…} called at /home/opt/l
ib/perl5/site_perl/5.6.1/HTML/Mason/Request.pm line 160
[Thu Aug 8 13:31:26 2002] [error] [client 192.168.1.20] FastCGI: server “/home/
opt/rt2/bin/mason_handler.fcgi” stderr: HTML::Mason::Request::exec(‘HTML
::Mason::Request=HASH(0x8d36efc)’, ‘/Admin/Queues/Modify.html’, ‘Create’, 1) cal
led at /home/opt/lib/perl5/site_perl/5.6.1/HTML/Mason/Interp.pm line 244

Josh Kuperman
josh@saratoga.lib.ny.us

Hi,

Frances Russell wrote:

Is there an easy way to prevent the owner of a ticket from resolving it?

We have a queue where additional approval needs to be given before
resolution of tickets.

We have introduced a new status named “fixed” for tickets that are
resolved but not proved nor tested. If you do something like that in
combination with a scripaction that changes the queue according to the
status change, this could be a good resolution to your problem.

Harald
Dr. Harald Koll�ra
Professional Services
fun communications GmbH
Brauerstrasse 6 76135 Karlsruhe Germany
Tel: +49 721 964480 Fax: +49 721 96448-299
email: harald.kollera@fun.de http://www.fun.de/

I trust in http://www.keytrust.de

Willing to post the patch?

-jr

We have introduced a new status named “fixed” for tickets that are
resolved but not proved nor tested. If you do something like that in
combination with a scripaction that changes the queue according to the
status change, this could be a good resolution to your problem.

Josh Richards <jrichard@{ digitalwest.net, geekresearch.com, cubicle.net }>
Digital West Networks, Inc. - "Making Internet Business Better"
San Luis Obispo, CA - URL:http://www.digitalwest.net/ - ASN 14589