Bug 725746 - condor_router_rm doesn't work with user names or job ids as constraint
Summary: condor_router_rm doesn't work with user names or job ids as constraint
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor
Version: Development
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: 2.1
: ---
Assignee: Timothy St. Clair
QA Contact: Lubos Trilety
URL:
Whiteboard:
Depends On:
Blocks: 743350
TreeView+ depends on / blocked
 
Reported: 2011-07-26 12:49 UTC by Lubos Trilety
Modified: 2012-01-23 17:27 UTC (History)
4 users (show)

Fixed In Version: condor-7.6.4-0.4
Doc Type: Bug Fix
Doc Text:
Due to inaccurate help messages, users were led to believe the condor_router_rm utility can be passed both the user name and the job ID parameters at the same time, which is not possible. This update fixes the help messages to provide accurate information on condor_router_rm usage.
Clone Of:
Environment:
Last Closed: 2012-01-23 17:27:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:0045 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Grid 2.1 bug fix and enhancement update 2012-01-23 22:22:58 UTC

Description Lubos Trilety 2011-07-26 12:49:56 UTC
Description of problem:
If condor_router_rm is run with some job ids or user names, it always ends with error: "You can't use both -constraint and usernames or job ids"

Version-Release number of selected component (if applicable):
condor-7.6.3-0.2

How reproducible:
100%

Steps to Reproduce:
1. set condor job router and submit a job
2. try to remove job using condor_router_rm and cluster id
$ condor_router_q
-- Submitter: hostname : <IP:41309> : hostname
 ID      OWNER            SUBMITTED     RUN_TIME ST PRI SIZE CMD               
  50.0   condor_user     7/26 14:39   0+00:00:34 R  0   0.0  myscript.sh       
  51.0   condor_user     7/26 14:39   0+00:00:00 I  0   0.0  myscript.sh       
  52.0   condor_user     7/26 14:39   0+00:00:00 I  0   0.0  myscript.sh       
  53.0   condor_user     7/26 14:39   0+00:00:00 I  0   0.0  myscript.sh       
  54.0   condor_user     7/26 14:39   0+00:00:00 I  0   0.0  myscript.sh       
  55.0   condor_user     7/26 14:39   0+00:00:00 I  0   0.0  myscript.sh       

$ condor_router_rm 50
You can't use both -constraint and usernames or job ids
Usage: condor_rm [options] [constraints]
 where [options] is zero or more of:
  -help               Display this message and exit
  -version            Display version information and exit
  -name schedd_name   Connect to the given schedd
  -pool hostname      Use the given central manager to find daemons
  -addr <ip:port>     Connect directly to the given "sinful string"
  -reason reason      Use the given RemoveReason
  -forcex             Force the immediate local removal of jobs in the X state
                      (only affects jobs already being removed)
 and where [constraints] is one of:
  cluster.proc        Remove the given job
  cluster             Remove the given cluster of jobs
  user                Remove all jobs owned by user
  -constraint expr    Remove all jobs matching the boolean expression
  -all                Remove all jobs (cannot be used with other constraints)

$ condor_router_rm condor_user
You can't use both -constraint and usernames or job ids
Usage: condor_rm [options] [constraints]
 where [options] is zero or more of:
  -help               Display this message and exit
  -version            Display version information and exit
  -name schedd_name   Connect to the given schedd
  -pool hostname      Use the given central manager to find daemons
  -addr <ip:port>     Connect directly to the given "sinful string"
  -reason reason      Use the given RemoveReason
  -forcex             Force the immediate local removal of jobs in the X state
                      (only affects jobs already being removed)
 and where [constraints] is one of:
  cluster.proc        Remove the given job
  cluster             Remove the given cluster of jobs
  user                Remove all jobs owned by user
  -constraint expr    Remove all jobs matching the boolean expression
  -all                Remove all jobs (cannot be used with other constraints)

  
Actual results:
condor_router_rm doesn't work correctly

Expected results:
condor_router_rm works also with job ids or usernames


Additional info:
It's because the condor_router_rm is wrapper for condor_rm and always add '-constraint exp' parameter to condor_rm call

Comment 1 Timothy St. Clair 2011-09-14 18:28:11 UTC
Although inconvenient you can do everything with -constraint and I would argue that you should to keep it bounded to Routed jobs only.  

The potential for opening it up could cause unintended consequences.  If they really want to do what you've asked they can just call condor_rm.

Comment 4 Timothy St. Clair 2011-09-15 16:12:38 UTC
Update is to denote in the help the proper usage:

This is a convenience wrapper around condor_rm for removing
jobs being managed by the condor job router.

router_rm options:
  -route <name>  remove only jobs on specified route
  -idle          remove only idle jobs
  -held          remove only held jobs
  -constraint X  remove jobs matching specified constraint

NOTE: If you wish to remove based on job.id or username simply
execute:
   condor_rm job.id, or condor_rm username

Comment 5 Timothy St. Clair 2011-09-23 20:33:09 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
C: Help message leads user to believe the tool can do something that it can't
C: User can not call condor_router_rm jobid,username
F: Update help message to make it clear that users.
R: Clarity of how to use the tool

Comment 7 Lubos Trilety 2011-10-25 12:24:30 UTC
Tested on:
$CondorVersion: 7.6.5 Oct 21 2011 BuildID: RH-7.6.5-0.2.el5 $
$CondorPlatform: I686-RedHat_5.7 $

$CondorVersion: 7.6.5 Oct 21 2011 BuildID: RH-7.6.5-0.2.el5 $
$CondorPlatform: X86_64-RedHat_5.7 $

$CondorVersion: 7.6.5 Oct 21 2011 BuildID: RH-7.6.5-0.2.el6 $
$CondorPlatform: I686-RedHat_6.1 $

$CondorVersion: 7.6.5 Oct 21 2011 BuildID: RH-7.6.5-0.2.el6 $
$CondorPlatform: X86_64-RedHat_6.1 $

Help for condor_router_rm was changed properly.

>>> VERIFIED

Comment 8 Tomas Capek 2011-11-17 11:34:23 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,4 +1 @@
-C: Help message leads user to believe the tool can do something that it can't
+Due to inaccurate help messages, users were led to believe the condor_router_rm utility can be passed both the user name and the job ID parameters at the same time, which is not possible. This update fixes the help messages to provide accurate information on condor_router_rm usage.-C: User can not call condor_router_rm jobid,username
-F: Update help message to make it clear that users.
-R: Clarity of how to use the tool

Comment 9 errata-xmlrpc 2012-01-23 17:27:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-0045.html


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