Bug 215 - if qdel is used with "-t" option, qdel should add "[]" to JOBID.
: if qdel is used with "-t" option, qdel should add "[]" to JOBID.
Status: NEW
Product: TORQUE
clients
: 4.0.*
: PC Linux
: P5 minor
Assigned To: Ken Nielson
:
:
:
  Show dependency treegraph
 
Reported: 2012-09-11 02:19 MDT by sstcosaka01
Modified: 2012-09-11 02:34 MDT (History)
1 user (show)

See Also:


Attachments
patch.qdel.c (760 bytes, text/x-csrc)
2012-09-11 02:19 MDT, sstcosaka01
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description sstcosaka01 2012-09-11 02:19:46 MDT
Created an attachment (id=118) [details]
qdel.c modification

We can not cancel jobs in a job array with qdel -t array_range JOBID with
errors like
  qdel: Unauthorized Request  MSG=must have operator or manager privilege to
use -m parameter 446.torque02

If we modify torque-4.1.1/src/cmds/qdel.c with patch.qdel.c so that "[]" is
added to job_id,
  we can cancel jobs in a job array with qdel -t.

There is a workaround that we can cancel jobs with qdel -t 
  adding "[]" to jobid at command line.
   (Good)  qdel -t 4-8 479[]  
   (Bad)   qdel -t 4-8 479

We have checked this with torque-4.1.1 and torque-4.1.0.

((qdel -t with modified qdel))
/dev/shm/usr/local/torque/bin/qdel:  modified qdel
/usr/local/torque/bin/qdel:          original qdel

[test01@torque02 ~]$ qstat -t
Job id                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
445[5].torque02            STDIN-5          test01          00:00:00 C batch    
445[6].torque02            STDIN-6          test01          00:00:00 C batch    
445[7].torque02            STDIN-7          test01          00:00:00 C batch    
445[8].torque02            STDIN-8          test01          00:00:00 C batch    
446[1].torque02            STDIN-1          test01                 0 R batch    
446[2].torque02            STDIN-2          test01                 0 R batch    
446[3].torque02            STDIN-3          test01                 0 R batch    
446[4].torque02            STDIN-4          test01                 0 R batch    
446[5].torque02            STDIN-5          test01                 0 R batch    
446[6].torque02            STDIN-6          test01                 0 R batch    
446[7].torque02            STDIN-7          test01                 0 R batch    
446[8].torque02            STDIN-8          test01                 0 R batch    
[test01@torque02 ~]$ /dev/shm/usr/local/torque/bin/qdel -t 5-8 446
[test01@torque02 ~]$ qdel -t 1-4 446 
qdel: Unauthorized Request  MSG=must have operator or manager privilege to use
-m parameter 446.torque02

((workarround))
[test01@torque02 ~]$ qstat -t
Job id                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
479[1].torque02            NPB01-1          test01                 0 Q batch    
479[2].torque02            NPB01-2          test01                 0 Q batch    
479[3].torque02            NPB01-3          test01                 0 Q batch    
479[4].torque02            NPB01-4          test01                 0 Q batch    
479[5].torque02            NPB01-5          test01                 0 Q batch    
479[6].torque02            NPB01-6          test01                 0 Q batch    
479[7].torque02            NPB01-7          test01                 0 Q batch    
479[8].torque02            NPB01-8          test01                 0 Q batch    
[test01@torque02 ~]$ qdel -t 4-8 479
qdel: Unauthorized Request  MSG=must have operator or manager privilege to use
-m parameter 479.torque02.ahoaho
[test01@torque02 ~]$ qdel -t 4-8 479[]
[test01@torque02 ~]$ qstat -t
Job id                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
479[1].torque02            NPB01-1          test01                 0 R batch    
479[2].torque02            NPB01-2          test01                 0 R batch    
479[3].torque02            NPB01-3          test01                 0 Q batch    
479[4].torque02            NPB01-4          test01                 0 C batch    
479[5].torque02            NPB01-5          test01                 0 C batch    
479[6].torque02            NPB01-6          test01                 0 C batch    
479[7].torque02            NPB01-7          test01                 0 C batch    
479[8].torque02            NPB01-8          test01                 0 C batch  

thank you
go
---