Re: [rt-users] rt-ldapimport user updates failing

2016-03-19 Thread John Bako
Apologies to the list... The problem actually was the mail attribute for a
few users in our active directory.  Thanks anyway, John

--
John Bako
Manager, Scientific Computing
Department of Biology & Center for Genomics and Systems Biology
New York University
212-998-8207 (office)

On Thu, Mar 17, 2016 at 1:28 PM, John Bako  wrote:

> Hi,
>
> rt-dapimport successfully imported users, but user updates fail on
> subsequent runs with the following error:
>
> [23104] [Thu Mar 17 17:12:28 2016] [debug]: User xyz123 already exists as
> 6, updating their data
> (/var/www/site_tickets_bio_nyu_edu/rt4/sbin/../lib/RT/LDAPImport.pm:857)
> [23104] [Thu Mar 17 17:12:28 2016] [debug]: User Nobody: Can not modify
> system users
> User Nobody: Can not modify system users
> User Nobody: Invalid syntax for email address
> (/var/www/site_tickets_bio_nyu_edu/rt4/sbin/../lib/RT/LDAPImport.pm:860)
>
>
> I'm running the import as root and I can't find a user named "Nobody" in
> RT if I wanted to assigned privileges.
>
> Thanks, John
>
> --
> John Bako
> Manager, Scientific Computing
> Department of Biology & Center for Genomics and Systems Biology
> New York University
> 212-998-8207 (office)
>
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] which Perl version should one use with RT 4.4 on CentOS 6

2016-03-19 Thread Chris Groome
I upvote Martin's answer. He gave you the version and the proper technique
to achieving it.

On Wed, Mar 16, 2016 at 5:44 AM, Martin Wheldon <
martin.whel...@greenhills-it.co.uk> wrote:

> Hi,
>
> I would recommend installing a version of perl just for RT that is
> seperate from the
> system perl. I tend to use the version that the perl project considers
> stable. Currently
> v5.22.1 I believe.
>
> Check out perlbrew for a nice easy clean way of installing a independant
> perl version.
>
> Best Regards
>
> Martin
>
>
> On 2016-03-15 15:36, Joseph D. Wagner wrote:
>
>> If you can upgrade to the latest version of CentOS 7, you'll get perl
>> 5.16.
>>
>> Joseph D. Wagner
>>
>> On 2016-03-15 03:06, Boris Epstein wrote:
>>
>> Hi Peter,
>>>
>>> Thanks, I saw that.
>>>
>>> I was wondering what the benefits and general experience was of
>>> those who used later versions of Perl 5 or Perl 6 vs 5.10.1. Just
>>> trying to see if it was a worthwhile exercize trying to upgrade -
>>> which on Centos did not seem to be trivial.
>>>
>>> Cheers,
>>>
>>> Boris.
>>>
>>> On Tue, Mar 15, 2016 at 4:27 AM, Peter Viskup 
>>> wrote:
>>>
>>> Hello Boris,
 from readme [1] on github it is obvious the RT needs Perl as of
 version 5.10.1 and above. Readme file from 4.4 version has the
 same
 list of requirements.
 Some RT modules may have their own dependencies. You need to check
 them.

 [1] https://github.com/bestpractical/rt

 --
 Peter Viskup

 On Mon, Mar 14, 2016 at 4:33 PM, Boris Epstein
  wrote:

> Hello all,
>
> I am about to upgrade my RT 4.2 to v4.4 on a CentOS 6 machine.
>
 It appears

> that Perl 5.1 is barely adequate. What is the recommended
>
 version of Perl

> for this setup?
>
> Thanks.
>
> Cheers,
>
> Boris.
>
>
 -
> RT 4.4 and RTIR Training Sessions
>
 https://bestpractical.com/training

> * Washington DC - May 23 & 24, 2016
>
>
>>> -
>>> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
>>> * Washington DC - May 23 & 24, 2016
>>>
>>
>> -
>> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
>> * Washington DC - May 23 & 24, 2016
>>
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Washington DC - May 23 & 24, 2016
>
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


[rt-users] PostgreSQL full-text index default type: GiST or GIN

2016-03-19 Thread k...@rice.edu
Hi,

I am working on an upgrade from 3.8.x to 4.4.x and I noticed the
following comment in the UPGRADING-4.2 file:

The full-text indexing defaults for PostgreSQL have changed; GiST is now
the suggested index, as well as storing data in a separate
AttachmentsIndex table.  Both changes improve lookup speed.  For
improved search performance, you may wish to drop existing C
and C indexes on C, and re-generate the index using
C.

I am curious about the benchmarks you used to make this determination?
In particular, the GIN fastscan option can dramatically improve search
performance in versions 9.4 and above. Here is a nice discussion:

http://blog.pgaddict.com/posts/performance-since-postgresql-7-4-to-9-4-fulltext

In addition, GIN indexes are much smaller in PostgreSQL 9.4 and above.
So I am curious about the data that motivated the change to GiST.

Regards,
Ken
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] PostgreSQL full-text index default type: GiST or GIN

2016-03-19 Thread Matt Zagrabelny
On Thu, Mar 17, 2016 at 3:29 PM, k...@rice.edu  wrote:
> Hi,
>
> I am working on an upgrade from 3.8.x to 4.4.x and I noticed the
> following comment in the UPGRADING-4.2 file:
>
> The full-text indexing defaults for PostgreSQL have changed; GiST is now
> the suggested index, as well as storing data in a separate
> AttachmentsIndex table.  Both changes improve lookup speed.  For
> improved search performance, you may wish to drop existing C
> and C indexes on C, and re-generate the index using
> C.
>
> I am curious about the benchmarks you used to make this determination?
> In particular, the GIN fastscan option can dramatically improve search
> performance in versions 9.4 and above. Here is a nice discussion:
>
> http://blog.pgaddict.com/posts/performance-since-postgresql-7-4-to-9-4-fulltext
>
> In addition, GIN indexes are much smaller in PostgreSQL 9.4 and above.
> So I am curious about the data that motivated the change to GiST.


Hi Ken,

Here is a correspondence between myself and a BP engineer you  may find helpful:

On Fri, 2013-12-13 at 12:24 -0500, Matt Zagrabelny via RT wrote:
> I've enabled full-text searching on our 4.2 instance.
>
> How often are folks running the sbin/rt-fulltext-indexer to keep the
> index up-to-date?

Since the pg updates are incremental, they are safe to run rather
frequently.  Depending on ticket volume, they've been run anywhere from
every minute to every hour.  Unlike the Sphinx indexes for MySQL,
there's no need to hold back and run them daily.  Indeed, we've
considered updating the Pg index in realtime as attachments are created
-- it's sufficiently fast.

> We are using Pg 9.1 on the backend with GIN indexing. We get ~100
> tickets created per day and I am not sure how many transactions are
> created per day.
>
> Any best practices or anecdotal data would be helpful. Also, how
> "strong" of a default recommendation is the GiST indexing? Am I being
> foolish for choosing GIN?

The GiST recommendation is very much a soft one.  We're not aware of any
particular cases where it has been explicitly required, nor have we done
comprehensive comparisons between the two on RT's data at scale.

---end of email---

There is also some good documentation on the Pg site regarding the
index choices:

http://www.postgresql.org/docs/9.5/static/textsearch-indexes.html

-m

> Regards,
> Ken
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Washington DC - May 23 & 24, 2016
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Order of multiple transactions in request

2016-03-19 Thread Jim Brandt


On 3/14/16 7:29 PM, Matt Zagrabelny wrote:

On Mon, Mar 14, 2016 at 1:25 PM, Marcos Orallo  wrote:


https://metacpan.org/pod/RT::Extension::AjaxPreviewScrips

I understand this was integrated into 4.4 core?

@BPS,

Can you confirm the merge of AjaxPreviewScrips in 4.4?

Yes, this appears to be the commit that pulled in that code:

https://github.com/bestpractical/rt/commit/098c568f

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


[rt-users] rt-ldapimport user updates failing

2016-03-19 Thread John Bako
Hi,

rt-dapimport successfully imported users, but user updates fail on
subsequent runs with the following error:

[23104] [Thu Mar 17 17:12:28 2016] [debug]: User xyz123 already exists as
6, updating their data
(/var/www/site_tickets_bio_nyu_edu/rt4/sbin/../lib/RT/LDAPImport.pm:857)
[23104] [Thu Mar 17 17:12:28 2016] [debug]: User Nobody: Can not modify
system users
User Nobody: Can not modify system users
User Nobody: Invalid syntax for email address
(/var/www/site_tickets_bio_nyu_edu/rt4/sbin/../lib/RT/LDAPImport.pm:860)


I'm running the import as root and I can't find a user named "Nobody" in RT
if I wanted to assigned privileges.

Thanks, John

--
John Bako
Manager, Scientific Computing
Department of Biology & Center for Genomics and Systems Biology
New York University
212-998-8207 (office)
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


[rt-users] Fwd: which Perl version should one use with RT 4.4 on CentOS 6

2016-03-19 Thread Martin Wheldon

Hi Jerome,

The following google search came back with a tutorial which pretty much
describes the type of perl brew install that I carry out for RT.

perlbrew "request tracker" howto

Best Regards

Martin

 Original Message 
Subject: [rt-users] which Perl version should one use with RT 4.4 on 
CentOS 6

Date: 2016-03-16 16:30
From: Jerome 
To: rt-users@lists.bestpractical.com

Dear Cris Groome,

You've wrote this answer:

"I upvote Martin's answer. He gave you the version and the proper 
technique to achieving it."


Would you be nice to send me too your "howto" about specific perl 
install for RT?


Regards.
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


[rt-users] which Perl version should one use with RT 4.4 on CentOS 6

2016-03-19 Thread Jerome

Dear Cris Groome,

You've wrote this answer:

"I upvote Martin's answer. He gave you the version and the proper 
technique to achieving it."


Would you be nice to send me too your "howto" about specific perl 
install for RT?


Regards.


--
-- Jérôme
Be yourself; everyone else is already taken.
 (Oscar Wilde)
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] scrip to detect attached zip files

2016-03-19 Thread Jannae Jacks
Hi Hugo,

The N in Filename is not capitalized in the docs. Try lowercase?

ttps://docs.bestpractical.com/rt/4.4.0/RT/Attachment.html#Filename

Like so:

while(my $attachment = $self->TransactionObj->Attachments->Next) {
$RT::Logger->info($attachment->Filename);
}



On Wed, Mar 16, 2016 at 1:01 PM, Hugo Escobar  wrote:

> Update:
> The following lines work exactly as I expect:
>
> use Data::Dumper;
>
> my $tobj = $self->TransactionObj;
> my $atts = $tobj->Attachments;
>
> my $attachment = $self->TransactionObj->Attachments->Next;
> if (!$attachment) {
> return 0;
> }
>
> my $content = Dumper($attachment->ContentAsMIME(Children=>1));
> if ($content=~/ name\=\".*?\.zip\"/i) {
> $RT::Logger->info("message has a zip file");
> } else {
> $RT::Logger->info("no zip file");
> }
> return 1;
>
> However, this doesn't look like a good solution
>
>
> In an attempt to use the API directly, I tried the following:
>
> https://docs.bestpractical.com/rt/4.2.12/RT/Attachment.html#Filename
> https://docs.bestpractical.com/rt/4.2.12/RT/Transaction.html#Attachments
>
> while(my $attachment = $self->TransactionObj->Attachments->Next) {
> $RT::Logger->info($attachment->FileName);
> }
>
> But got this in the log file:
>
> [Wed Mar 16 16:47:07 2016] [error]: Scrip 34 Commit failed:
> RT::Attachment::FileName Unimplemented in RT::Action::UserDefined. ((eval
> 652) line 2)
>
> ​any ideas?
>
> Thanks in advance​
>
> ​PS:
> our installation:
> Centos 6.6/MySql/Apache+mod_perl
> RT 4.2​.9
>
>
> On Tue, Mar 15, 2016 at 7:04 PM, Hugo Escobar  wrote:
>
>> Hi,
>>
>> I need to detect if a zip file has been attached to a ticket at
>> creation time and also at 'comment' or 'correspond' time.
>>
>> My idea to solve this is to extract the attachments and then parse
>> the content.
>>
>> I think the best route for this would be:
>>
>>  TransactionObj->Attachments->Next ...
>>   ContentAsMIME(Children=>1)
>>
>> Since MIME entities can themselves contain other entities,
>> I think I'm going to need a recursive function ...
>>
>> Basically what I'd like is a few words of advice. I think I can
>> come up with a solution but perhaps there's a simpler path I'm
>> overlooking or I'm not aware of.
>>
>> ​Thanks in advance​,
>>
>
>
>
> --
> Regards,
>
> Hugo Escobar
>
> 
>
> 4770 Biscayne Blvd, Ste 700
> Miami, FL 33137
>
> main: 305.677.0022
> support: 305.921.4620
> email: hesco...@afslc.com
>
> Follow us on Facebook and Linked-In
> 
>
>
> NOTICE: This email and any attachment to this email may contain
> confidential information. If you are not the intended recipient, you must
> not review, retransmit, convert to hard copy, photocopy, use or disseminate
> this email or any attachments to it. If you have received this email in
> error, please notify us immediately by return email and delete this
> message. Please note that if this email contains a forwarded message or is
> a reply to a prior message, some or all of the contents of this message or
> any attachments may not have been produced by our firm. *As our firm may
> be deemed a debt collector, if your payment is in default, we may be
> attempting to collect a debt on behalf of the association, and any
> information obtained may be used for that purpose.*
>
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Washington DC - May 23 & 24, 2016
>
>


-- 
Jannae Jacks
Senior Network Security Analyst, Technology Security Services
New York University, Information Technology
726 Broadway, 2nd Floor, New York, NY 10003
http://www.nyu.edu

p: (212) 992.7444 | m: (901) 229.3225
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] PostgreSQL full-text index default type: GiST or GIN

2016-03-19 Thread Alex Vandiver
On Thu, 17 Mar 2016 17:47:50 -0500
Matt Zagrabelny  wrote:
> > I am curious about the benchmarks you used to make this determination?
> > In particular, the GIN fastscan option can dramatically improve search
> > performance in versions 9.4 and above. Here is a nice discussion:
> >
> > http://blog.pgaddict.com/posts/performance-since-postgresql-7-4-to-9-4-fulltext
> >
> > In addition, GIN indexes are much smaller in PostgreSQL 9.4 and above.
> > So I am curious about the data that motivated the change to GiST.

You are quite correct; GIN indexes are superior in virtually every
way for our use case.  And the documentation is unfortunately in error;
the default switched in the other direction, from GiST to GIN. See
https://github.com/bestpractical/rt/commit/e103f6da for the actual
behavior change.

This mistake is entirely my fault, and my only excuse for getting it
backwards is that the documentation commit was written several months
after the code was. Apologies!

> Here is a correspondence between myself and a BP engineer you  may find 
> helpful:
> [snip]

That correspondence is out of date; at the time, GiST was the
default, based on no particular research.  The change to default to
GIN was made late 2014/early 2015 after I conducted additional research
on real-world data -- as well as the Postgres documentation, which is
quite clear that static data should use GIN.

You can see the results of that research at
https://chmrr.net/fts-charts/pg.html and
https://chmrr.net/fts-charts/query.html#pg

Those are from performing speed analysis on rebuilding the index on a
clone of Best Practical's own ticketing system, which was taken as
being a representative real-life sample of data.  It was run on
Postgres 9.3, and resulted in the following branch:
https://github.com/bestpractical/rt/compare/1d1ffe44...7c48294a
The last ~7 commits are the most Postgres-specific.

The end result is an indexing engine which, in its default
configuration, indexes data an order of magnitude faster, as well as
provides results an order of magnitude faster.  Wins all around!

I'm happy to supply a patch to fix the documentation, but I suspect
Shawn or someone at BPS will be faster to simply fix it directly. :)
 - Alex
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Fwd: which Perl version should one use with RT 4.4 on CentOS 6

2016-03-19 Thread Jerome

Dear Martin, Jim

You're right. Thanks for the link !

Regards

Le 16/03/2016 11:02, Jim Brandt a écrit :

There is info on options for installing perl in the RT documentation too:

https://docs.bestpractical.com/rt/4.4.0/rt_perl.html

On 3/16/16 5:44 PM, Martin Wheldon wrote:

Hi Jerome,

The following google search came back with a tutorial which pretty much
describes the type of perl brew install that I carry out for RT.

perlbrew "request tracker" howto

Best Regards

Martin

 Original Message 
Subject: [rt-users] which Perl version should one use with RT 4.4 on
CentOS 6
Date: 2016-03-16 16:30
From: Jerome 
To: rt-users@lists.bestpractical.com

Dear Cris Groome,

You've wrote this answer:

"I upvote Martin's answer. He gave you the version and the proper
technique to achieving it."

Would you be nice to send me too your "howto" about specific perl
install for RT?

Regards.
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016



--
-- Jérôme
Les cimetières sont pleins de gens irremplaçables.
(Alphonse Allais)
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016