Bug 669023 - Dissimilar output of condor_q
Summary: Dissimilar output of condor_q
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor
Version: 1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 2.0
: ---
Assignee: Matthew Farrellee
QA Contact: Martin Kudlej
URL:
Whiteboard:
Depends On:
Blocks: 693778
TreeView+ depends on / blocked
 
Reported: 2011-01-12 13:42 UTC by Martin Kudlej
Modified: 2011-06-23 15:39 UTC (History)
2 users (show)

Fixed In Version: condor-7.5.6-0.1
Doc Type: Bug Fix
Doc Text:
C: condor_q compiled without postgresql suggests -avgqueuetime as an argument (from -help) C: condor_q ignores the argument, with an error F: condor_q -h updated to not report -avgqueuetime when compiled without postgresql R: No more confusion
Clone Of:
Environment:
Last Closed: 2011-06-23 15:39:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0889 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Grid 2.0 Release 2011-06-23 15:35:53 UTC

Description Martin Kudlej 2011-01-12 13:42:48 UTC
Description of problem:

$ condor_q -h
Usage: condor_q [options]
        where [options] are
                -global                 Get global queue
                -submitter <submitter>  Get queue of specific submitter
                -run                    Get information about running jobs
                -hold                   Get information about jobs on hold
                -dag                    Sort DAG jobs under their DAGMan
                -expert                 Display shorter error messages
                -avgqueuetime           Average queue time for uncompleted jobs

$ condor_q -global
....
20 jobs; 20 idle, 0 running, 0 held

$ condor_q -submitter condor
....
20 jobs; 20 idle, 0 running, 0 held

$ condor_q -run
---->....(without information: 20 jobs; 20 idle, 0 running, 0 held) <-----

$ condor_q -hold
....
----> 0 jobs; 0 idle, 0 running, 0 held <---- wrong numbers

$ condor_q -dag
....
20 jobs; 20 idle, 0 running, 0 held

$ condor_q -expert
....
20 jobs; 20 idle, 0 running, 0 held

$ condor_q -avgqueuetime
----> Error: unrecognized argument -avgqueuetime <---- parameter from help, which doesn't work
... help message

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


How reproducible:
100%

Actual results:
There are some dissimilar outputs from condor_q command with parameters. 

Expected results:
There will not be -avgqueuetime in parameters or the functionality of this parameter will be in condor_q.
All other outputs from condor_q with above parameters will output correct information about jobs on last line.

Additional info:

Comment 1 Matthew Farrellee 2011-01-12 13:53:51 UTC
Three issues here -

Re -avgqueuetime: https://condor-wiki.cs.wisc.edu/index.cgi/tktview?tn=1629

Re -run: definitely unfortunate

Re -hold: probably a bug

Comment 2 Matthew Farrellee 2011-01-12 14:06:57 UTC
Re -avgqueuetime,

commit 914fe998bba1d9dc1d9e6813b9b98e8c6bea294c
Author: Matthew Farrellee <matt@redhat>
Date:   Wed Jan 12 09:04:55 2011 -0500

    Removed -avgqueuetime from condor_q -h when built without postgresql, #1629

diff --git a/src/condor_q.V6/queue.cpp b/src/condor_q.V6/queue.cpp
index 91054a0..85d9342 100644
--- a/src/condor_q.V6/queue.cpp
+++ b/src/condor_q.V6/queue.cpp
@@ -1854,10 +1854,10 @@ usage (char *myName)
                "\t\t\tPerform a direct query to the rdbms\n"
                "\t\t\tor to the schedd without falling back to the queue\n"
                "\t\t\tlocation discovery algortihm, even in case of error\n"
+               "\t\t-avgqueuetime\t\tAverage queue time for uncompleted jobs\n"
 #else
                "\t\t-direct <schedd>\tPerform a direct query to the schedd\n"
 #endif
-               "\t\t-avgqueuetime\t\tAverage queue time for uncompleted jobs\n"
                "\t\t-version\t\tPrint the Condor Version and exit\n"
                "\t\trestriction list\n"
                "\twhere each restriction may be one of\n"

--

Available for 7.5.6.

Comment 3 Matthew Farrellee 2011-01-12 14:15:49 UTC
Re -run,

commit 9cc888274722aeda9935615dcd93107b84be4f2e
Author: jbasney <jbasney>
Date:   Thu Jan 21 18:49:56 1999 +0000

    add -run option, which only displays running jobs (unless another
    constraint is given) and shows the remote host on which each job is
    running

...
@@ -527,6 +577,27 @@ show_queue( char* scheddAddr, char* scheddName, char* scheddMachine )
                
                if( verbose ) {
                        jobs.fPrintAttrListList( stdout );
+               } else if ( run ) {
+                       summarize = false;
+                       AttrListPrintMask mask;
+                       printf( " %-7s %-14s %11s %12s %-16s\n", "ID", "OWNER",
+                                       "SUBMITTED", "CPU_USAGE",
...

The lack of summary is intentional.

Comment 4 Matthew Farrellee 2011-01-12 14:20:29 UTC
Re -hold,

ommit 2128193f894e47e903b5b53ac6e497e0ccca315c
Author: tannenba <tannenba>
Date:   Tue Sep 24 22:00:40 2002 +0000

    added "-hold" (or -held) option to condor_q.
    derek: this was a bug.  really.  honest.  ;^)
    p.s. derek: don't hurt me.  i am weak.  i need am sick.

...
+       } else if ( show_held ) {
+               if (!setup_mask) {
+                       mask.registerFormat ("%4d.", ATTR_CLUSTER_ID);
+                       mask.registerFormat ("%-3d ", ATTR_PROC_ID);
+                       mask.registerFormat ( (StringCustomFmt) format_owner,
+                                                                 ATTR_OWNER, "[????????????] " );
+                       mask.registerFormat(" ", "*bogus*", " ");  // force space
+                       mask.registerFormat ( (IntCustomFmt) format_q_date,
+                                                                 ATTR_ENTERED_CURRENT_STATUS, "[??????????
+                       mask.registerFormat(" ", "*bogus*", " ");  // force space
+                       mask.registerFormat( "%-43.43s\n", ATTR_HOLD_REASON );
+                       setup_mask = true;
+                       usingPrintMask = true;
+               }
...

Unlike other options, this one relies on the default setting for "summarize".

Comment 5 Matthew Farrellee 2011-01-12 14:22:40 UTC
Re -hold,

I would expect that the summary line reports a summary of what was displayed. Since there are no held jobs, having "0 jobs; 0 idle, 0 running, 0 held" is reasonable output.

Comment 6 Matthew Farrellee 2011-01-12 14:24:05 UTC
Summary -

-avgqueuetime: fixed upstream for 7.5.6
-run: intentional, NOTABUG, reasonable RFE
-hold: NOTABUG

Comment 7 Matthew Farrellee 2011-01-12 14:29: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: condor_q compiled without postgresql suggests -avgqueuetime as an argument (from -help)
C: condor_q ignores the argument, with an error
F: condor_q -h updated to not report -avgqueuetime when compiled without postgresql
R: No more confusion

Comment 9 Martin Kudlej 2011-04-19 08:00:42 UTC
Tested on RHEL6.1/5.6 x x86_64/i386 with condor-7.6.1-0.1 and it works. -->VERIFIED

There is correct output of condor_q -avgqueuetime: Error: unrecognized argument -avgqueuetime

Comment 10 errata-xmlrpc 2011-06-23 15:39:12 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0889.html


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