[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#890517: killer's CRON logs out users once per hour



On Sun, Feb 25, 2018 at 03:14:03PM +0100, Petter Reinholdtsen wrote:
> [Mike Gabriel]
> > This is at most a dirty work around. The killer command wipes  
> > x2goagent hourly and this must be prevented in killer itself somehow.
> >
> > With the above patch you disable killer system-wide once at least one  
> > X2Go Session is running on the host. Not the right approach.
> 
> It do not sound like a too bad approach either, given that X2Go fail to
> register its sessions in the standard unix way.  It seem like the safe
> option to just disable killer if X2Go is detected.
 
While X2Go should add session registration ASAP, killer could save those 
sessions (similar like the 'condor' ones) for the time being.

Users with active X2Go sessions can be identified running:
'ps aux | grep '[x]2goruncommand' | cut -d ' ' -f1'

Mike, could you test this change to killer (might be smarter, some one 
w/ Perl skills should check it:

--- a/killer	2018-02-27 18:14:50.085187798 +0100
+++ b/killer	2018-02-27 18:15:59.624571678 +0100
@@ -1328,6 +1328,23 @@
 
 =item *
 
+Exclude all jobs belonging to users running an X2Go session from being
+terminated. X2Go fails to register users in utemp/wtemp files; for more
+information, see: https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=1171
+
+=cut
+
+    my @x2gousers = ();
+    foreach my $pid ( keys %pid2comm ) {
+        next unless ( $pid2comm{$pid} eq 'x2goruncommand' );
+        push(@x2gousers, $pid2user{$pid});
+    }
+    foreach $user ( @x2gousers ) {
+        $ptable->removeProcesses('ruser', $user);
+    }
+
+=item *
+
 Finally, the process table and terminal objects are returned.
 
 =back
 

Wolfgang

Attachment: signature.asc
Description: PGP signature


Reply to: