Bug 725758

Summary: condor_router_q doesn't work correctly with route names containing a white space
Product: Red Hat Enterprise MRG Reporter: Lubos Trilety <ltrilety>
Component: condorAssignee: Timothy St. Clair <tstclair>
Status: CLOSED ERRATA QA Contact: Daniel Horák <dahorak>
Severity: low Docs Contact:
Priority: low    
Version: DevelopmentCC: dahorak, matt, mkudlej, tstclair
Target Milestone: 2.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: condor-7.6.4-0.4 Doc Type: Bug Fix
Doc Text:
When the condor_router_q utility was running on job routes whose name contained space characters, condor_router_q returned incorrect output and grouping. With this update, the awk parsing for the script that displays names has been fixed and output for routes whose names contain spaces is now displayed correctly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-23 17:27:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 743350    

Description Lubos Trilety 2011-07-26 13:39:30 UTC
Description of problem:
The condor_router_q tools works only with first word of Name attribute in JOB_ROUTER_ENTRIES.
E.g.
JOB_ROUTER_ENTRIES = \
   [ GridResource = "condor sched host1"; \
     name = "Site 1"; \
     set_remote_jobuniverse = 5; \
   ] \
   [ GridResource = "condor sched host2"; \
     name = "Site 2"; \
     set_remote_jobuniverse = 5; \
   ] \
   [ GridResource = "condor sched host3"; \
     name = "Site 3"; \
     set_remote_jobuniverse = 5; \
   ]

After submitting bunch of jobs all of these routes are shown as one route in 'condor_router_q -S' summary. (The same for '-R' '-I' '-H' options)
$ condor_router_q -S
   JOBS ST Route      GridResource
      1  R Site       condor
     89  I Site       condor

If "Site1", "Site2" and "Site3" are used instead, the 'condor_router_q -S' looks like this:
$ condor_router_q -S
   JOBS ST Route      GridResource
      1  R Site1      host1
     33  I Site1      host1
      5  C Site1      host1
      1  R Site2      host2
      2  C Site2      host2
     49  I Site2      host2
      1  R Site3      host3
      2  C Site3      host3
     50  I Site3      host3

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

How reproducible:
100%
  
Actual results:
condor_router_q summary doesn't work with whole route name

Expected results:
condor_router_q summary show correctly all routes

Additional info:

Comment 1 Timothy St. Clair 2011-09-14 17:06:32 UTC
Modification is to use , as a separator in the awk parse line.  

,'s are invalid in the names.

Comment 2 Timothy St. Clair 2011-09-23 20:36:19 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: Running condor_router_q on job routes whose names contain spaced
C: Incorrect output and grouping.
F: Update the awk parsing for the script to display names with spaces correctly.
R: Output for routes whose names contain spaces should be displayed correctly.

Comment 4 Daniel Horák 2011-10-20 12:56:44 UTC
Reproduced on RHEL 6.1 i386:
# rpm -qa | grep condor
  condor-classads-7.6.4-0.8.el5
  condor-7.6.4-0.8.el5

JOB_ROUTER_ENTRIES = \
  [ GridResource = "condor sched host1"; \
    name = "Site 1"; \
    set_remote_jobuniverse = 5; ] \
  [ GridResource = "condor sched host2"; \
    name = "Site 2"; \
    set_remote_jobuniverse = 5; ] \
  [ GridResource = "condor sched host3"; \
    name = "Site 3"; \
    set_remote_jobuniverse = 5; ]

# runuser -s /bin/bash -l condor -c "condor_submit /tmp/bz725758.job"
  Submitting job(s).........................
  25 job(s) submitted to cluster 1.

# condor_router_q -S
     JOBS ST Route      GridResource
       25  I Site       condor


Verified on RHEL 6.1 i386:
# rpm -qa | grep condor
  condor-7.6.4-0.8.el6.i686
  condor-classads-7.6.4-0.8.el6.i686

# runuser -s /bin/bash -l condor -c "condor_submit /tmp/bz725758.job"
  Submitting job(s).........................
  25 job(s) submitted to cluster 1.

# condor_router_q -S
     JOBS ST Route                GridResource
        8  I Site 1               condor sched host1
        8  I Site 2               condor sched host2
        8  I Site 3               condor sched host3

# condor_router_q -I
     JOBS ST Route                GridResource
        8  I Site 1               condor sched host1
        8  I Site 2               condor sched host2
        8  I Site 3               condor sched host3


Verified on RHEL 5.7 i386, RHEL 5.7 x86_64 and RHEL 6.1 x86_64 with similar output.

>>> VERIFIED

Comment 5 Tomas Capek 2011-11-17 11:27:00 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: Running condor_router_q on job routes whose names contain spaced
+When the condor_router_q utility was running on job routes whose name contained space characters, condor_router_q returned incorrect output and grouping. With this update, the awk parsing for the script that displays names has been fixed and output for routes whose names contain spaces is now displayed correctly.-C: Incorrect output and grouping.
-F: Update the awk parsing for the script to display names with spaces correctly.
-R: Output for routes whose names contain spaces should be displayed correctly.

Comment 6 errata-xmlrpc 2012-01-23 17:27:56 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