Rt-shredder Users plugin deletes tickets?

I’ve just upgraded to RT 3.8.7 from 3.6.5, and I’m catching up on my
shredding.

Over the weekend I shredded 20000 or so deleted tickets (spam mainly),
and today I went to start on the users. This has never really worked
well before, so we have about 60k users, and at most 1000 of them are
active.

So I created a user called placeholder, made them privileged and made
sure they are the requestor on a long-running ticket. Then…

./rt-shredder --plugin
’Users=status,enabled;replace_relations,placeholder;no_tickets,true;member_of,unprivileged;limit,100’

{snipped output}
[Tue Mar 9 15:20:39 2010] [info]: RT::Transaction-2992615 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
–> [Tue Mar 9 15:20:39 2010] [info]: RT::Ticket-348651 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::CachedGroupMember-4193272 wiped
out (/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::GroupMember-1394521 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::CachedGroupMember-4193271 wiped
out (/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::Transaction-3007389 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::Group-1857870 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)

Why does the Users plugin delete tickets? Surely it should only be
deleting users that have no tickets (no_tickets, true)?

Thanks for any illumination…

Howie

Hi Howie,

I ran into the same problem.

In my case, the deleted Tickets contained Correspondence from Users who
were otherwise not Watchers (i.e., Requestors, Owners, AdminCCs or CCs)
in the system.

The Tickets were deleted by the jobs that removed the Users.

Seems like a bug to me.

Gary
Gary Hall
RT Admin
Simon Fraser UniversityOn 01/-10/-28163 11:59 AM, Howard Jones wrote:

I’ve just upgraded to RT 3.8.7 from 3.6.5, and I’m catching up on my
shredding.

Over the weekend I shredded 20000 or so deleted tickets (spam mainly),
and today I went to start on the users. This has never really worked
well before, so we have about 60k users, and at most 1000 of them are
active.

So I created a user called placeholder, made them privileged and made
sure they are the requestor on a long-running ticket. Then…

./rt-shredder --plugin
‘Users=status,enabled;replace_relations,placeholder;no_tickets,true;member_of,unprivileged;limit,100’

{snipped output}
[Tue Mar 9 15:20:39 2010] [info]: RT::Transaction-2992615 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
→ [Tue Mar 9 15:20:39 2010] [info]: RT::Ticket-348651 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::CachedGroupMember-4193272 wiped
out (/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::GroupMember-1394521 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::CachedGroupMember-4193271 wiped
out (/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::Transaction-3007389 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::Group-1857870 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)

Why does the Users plugin delete tickets? Surely it should only be
deleting users that have no tickets (no_tickets, true)?

Thanks for any illumination…

Howie

Howard Jones wrote:

Why does the Users plugin delete tickets? Surely it should only be
deleting users that have no tickets (no_tickets, true)?

Is anyone else successfully using RT-Shredder to remove redundant users?
What incantation are you using that doesn’t also delete tickets?

Cheers,

Howie

I mailed this bug report and still waiting for a response:
http://rt3.fsck.com/Ticket/Display.html?id=14170&user=guest&pass=guestAm 11.03.2010 19:42, schrieb Gary Hall:

Hi Howie,

I ran into the same problem.

In my case, the deleted Tickets contained Correspondence from Users who
were otherwise not Watchers (i.e., Requestors, Owners, AdminCCs or CCs)
in the system.

The Tickets were deleted by the jobs that removed the Users.

Seems like a bug to me.

Gary

Gary Hall
RT Admin
Simon Fraser University

On 01/-10/-28163 11:59 AM, Howard Jones wrote:

I’ve just upgraded to RT 3.8.7 from 3.6.5, and I’m catching up on my
shredding.

Over the weekend I shredded 20000 or so deleted tickets (spam mainly),
and today I went to start on the users. This has never really worked
well before, so we have about 60k users, and at most 1000 of them are
active.

So I created a user called placeholder, made them privileged and made
sure they are the requestor on a long-running ticket. Then…

./rt-shredder --plugin
‘Users=status,enabled;replace_relations,placeholder;no_tickets,true;member_of,unprivileged;limit,100’

{snipped output}
[Tue Mar 9 15:20:39 2010] [info]: RT::Transaction-2992615 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
→ [Tue Mar 9 15:20:39 2010] [info]: RT::Ticket-348651 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::CachedGroupMember-4193272 wiped
out (/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::GroupMember-1394521 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::CachedGroupMember-4193271 wiped
out (/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::Transaction-3007389 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::Group-1857870 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)

Why does the Users plugin delete tickets? Surely it should only be
deleting users that have no tickets (no_tickets, true)?

Thanks for any illumination…

Howie


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22 & 23
Dublin, Ireland - Mar 15 & 16
Boston, MA, USA - April 5 & 6
Washington DC, USA - Oct 25 & 26

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

I do not think I agree with this. If you ask for a user to be
removed, any ticket that they have touched should go as well.
Otherwise you will have unattributed updates in the system.
It seems like you may have a bit too aggressive a policy for
cleaning out users. Another approach is to put a better anti-spam
system in front of RT to keep these deletions to a more manageable
number. Good luck.

Cheers,
KenOn Tue, Mar 16, 2010 at 02:12:46PM +0100, Christian Loos wrote:

I mailed this bug report and still waiting for a response:
http://rt3.fsck.com/Ticket/Display.html?id=14170&user=guest&pass=guest

Am 11.03.2010 19:42, schrieb Gary Hall:

Hi Howie,

I ran into the same problem.

In my case, the deleted Tickets contained Correspondence from Users who
were otherwise not Watchers (i.e., Requestors, Owners, AdminCCs or CCs)
in the system.

The Tickets were deleted by the jobs that removed the Users.

Seems like a bug to me.

Gary

Gary Hall
RT Admin
Simon Fraser University

On 01/-10/-28163 11:59 AM, Howard Jones wrote:

I’ve just upgraded to RT 3.8.7 from 3.6.5, and I’m catching up on my
shredding.

Over the weekend I shredded 20000 or so deleted tickets (spam mainly),
and today I went to start on the users. This has never really worked
well before, so we have about 60k users, and at most 1000 of them are
active.

So I created a user called placeholder, made them privileged and made
sure they are the requestor on a long-running ticket. Then…

./rt-shredder --plugin
‘Users=status,enabled;replace_relations,placeholder;no_tickets,true;member_of,unprivileged;limit,100’

{snipped output}
[Tue Mar 9 15:20:39 2010] [info]: RT::Transaction-2992615 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
→ [Tue Mar 9 15:20:39 2010] [info]: RT::Ticket-348651 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::CachedGroupMember-4193272 wiped
out (/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::GroupMember-1394521 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::CachedGroupMember-4193271 wiped
out (/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::Transaction-3007389 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)
[Tue Mar 9 15:20:41 2010] [info]: RT::Group-1857870 wiped out
(/opt/rt3/sbin/…/lib/RT/Shredder/Record.pm:236)

Why does the Users plugin delete tickets? Surely it should only be
deleting users that have no tickets (no_tickets, true)?

Thanks for any illumination…

Howie


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22 & 23
Dublin, Ireland - Mar 15 & 16
Boston, MA, USA - April 5 & 6
Washington DC, USA - Oct 25 & 26

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22 & 23
Dublin, Ireland - Mar 15 & 16
Boston, MA, USA - April 5 & 6
Washington DC, USA - Oct 25 & 26

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Kenneth Marshall wrote:

I do not think I agree with this. If you ask for a user to be
removed, any ticket that they have touched should go as well.

No, I asked for users with no tickets to be removed[0]. By definition,
there are no tickets that need to be removed! :slight_smile:

Otherwise you will have unattributed updates in the system.
It seems like you may have a bit too aggressive a policy for
cleaning out users. Another approach is to put a better anti-spam
system in front of RT to keep these deletions to a more manageable
number. Good luck.

If something says it will delete users, but in fact deletes tickets and
users, it’s a little concerning. I guess it would delete less tickets if
there were less users, but that’s not really the issue. This is in a
system with anti-spam measures ahead of the RT instance. However,
historically that wasn’t always the case, so we have all these old users
hanging around.

Howard

[0] at least I’m pretty sure I did. The documentation for RT-Shredder is
fairly sparse.

I do not think I agree with this. If you ask for a user to be
removed, any ticket that they have touched should go as well.
The shredder gives the option of reassigning ownership
(to nobody for instance) when shredding users,
otherwise transactions must be wiped to preserve
referential integrity.

In my experience what happens in these instances
where a non-watcher has correspondence on a ticket
is that the transactions in question get borked and
while the ticket remains, the display is interrupted
once it reaches said transaction. I’ve never seen a
ticket get wiped. Your log does show a Ticket being
wiped out though, but if you read the archived SQL
you will probably find that the only transaction it
contained was 2992615, created by a wiped user.

It seems to me one usually needs to shred users who
have submitted SPAM, and that the ability to shred
tickets meeting certain criteria as well as their
requestors
at the same time would help alleviate this problem e.g;

Status = Deleted and Requestor has no other Tickets
not marked Deleted.

Cambridge Energy Alliance: Save money. Save the planet.