Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 595704 - QMF: submission objects in schedd-plugin scenario should go away after jobs complete/removed
QMF: submission objects in schedd-plugin scenario should go away after jobs c...
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor-qmf (Show other bugs)
1.3
All Linux
high Severity medium
: 1.3.2
: ---
Assigned To: Pete MacKinnon
Jan Sarenik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-25 08:23 EDT by Pete MacKinnon
Modified: 2011-02-15 07:12 EST (History)
5 users (show)

See Also:
Fixed In Version: condor-7.4.5-0.7
Doc Type: Bug Fix
Doc Text:
Schedd QMF left the Submission QMF objects hanging after all of submission jobs finished. This happend due to absence of ref counting of jobs on submissions in the Schedd QMF plug-in. With this update, ref counting as a job is attached to every submission and QMF submission objects are deleted once all their jobs are completed or removed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-15 07:12:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0217 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging and Grid bug fix and enhancement update 2011-02-15 07:10:15 EST

  None (edit)
Description Pete MacKinnon 2010-05-25 08:23:52 EDT
Currently when the schedd plug-in is configured to publish job submissions, submission objects "hang around" beyond the life span of their jobs. However, they are effectively useless since we can't get job summaries from them once those jobs are gone. 

Propose to somehow reap those submission objects after some configurable period of time.

Note that Justin and I have proposed that the schedd-plugin publish scenario is the functional equivalent of condor_q minus quill, etc. ie., you get to query jobs as long as they are in the queue. If users want persistent job info they need to use the job server.
Comment 1 Pete MacKinnon 2010-05-25 08:26:31 EDT
Matt, appreciate feedback on proposal.
Comment 2 Matthew Farrellee 2010-05-25 10:54:53 EDT
I support garbage collecting submissions, but on a long timeout. A submission is not a first class entity and is not closed from Condor's perspective.
Comment 3 Pete MacKinnon 2010-11-04 12:04:24 EDT
Trevor, we're proposing to delete the C++ submission mgmt objects when the last job is completed/removed. However, the submission objects should hang around for a while (2-3 days?) in cumin db.
Comment 4 Matthew Farrellee 2010-11-04 15:16:10 EDT
Quick proposal to QMF (jr+mf): allow for separation of ManagementObject memory reclamation and sending of Resource Destroy message
Comment 5 Pete MacKinnon 2010-12-03 16:19:33 EST
FH sha 89e65dc6 right on V7_4-QMF-branch

manually tested
Comment 6 Pete MacKinnon 2010-12-10 10:05:03 EST
    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:
Cause: no ref counting of jobs to submissions in job server plug-in
Consequences: management console would see submissions but unable to retrieve any job summaries from these 
Fix: added ref counting as jobs are attached to submissions
Result: QMF submission objects are "cleaned up" once all their jobs have been completed or removed
Comment 8 Jan Sarenik 2011-01-07 10:39:05 EST
How can I verify this bug?
Comment 9 Pete MacKinnon 2011-01-10 10:13:53 EST
Submit jobs through QMF or condor_submit to a schedd plug-in job server (QMF_PUBLISH_SUBMISSIONS=True).

Use a devel tool like src/management/qmfprobe.py or submissions.py to verify that once all the procs in a submission have gone to COMPLETED or REMOVED, the QMF submission object is no longer available.
Comment 10 Jan Sarenik 2011-01-11 05:31:15 EST
Reproduced on condor-7.4.4-0.17.el5
Comment 11 Jan Sarenik 2011-01-12 05:24:24 EST
Verified on condor-qmf-7.4.5-0.6.el5
Comment 12 Jan Sarenik 2011-01-12 05:25:25 EST
$ ./submit.py amqp://cumin/cumin@localhost:5672
$ ./qmfprobe.py | grep submission
$ sleep 60
$ ./qmfprobe.py | grep submission
Comment 13 Jan Sarenik 2011-01-13 10:21:40 EST
Oops, now I found there's a problem.
The submission for job, which is running
when I do "condor_rm -all" does not get
removed.

Reproducer:

condor_submit << EOF
Executable     = /bin/sleep
Universe = vanilla
args    = 20m
queue 1
EOF
condor_rm -all
# Now see the Submissions in Cumin->Grid


Tested on cumin-0.1.4462-1.el5
Comment 14 Jan Sarenik 2011-01-13 10:23:37 EST
Submission objects of these already non-exiting
jobs are also visible with src/management/qmfprobe.py
Comment 15 Pete MacKinnon 2011-01-14 16:18:23 EST
FH sha 8946a558e3 directly in V7_4-QMF-branch

Proc count check needed to account for negative value since 
late ad updates on removed jobs could drive count below zero
Comment 17 Jan Sarenik 2011-01-17 10:04:38 EST
I will re-check as soon as there are new packages
containing the change mentioned in comment #15.
Thank you.
Comment 18 Pete MacKinnon 2011-01-17 13:08:06 EST
More refactoring needed. Can't rely on proc counts from UNEXPANDED state if the schedd is restarted while a job is still running in the job queue.
Comment 19 Pete MacKinnon 2011-01-17 21:05:33 EST
FH sha f77bdd6

unit testing looks good with restarts of schedd
counts are correct
completion and removal cleans up submission object
NB: completed/removed counts will zero out for a submission if the schedd is restarted and the cluster hasn't completely finished
Comment 21 Jan Sarenik 2011-01-26 03:16:30 EST
Verified on RHEL5 x86_64 with condor-qmf-7.4.5-0.7.el5,
will check RHEL4 and i386 packages today.
Comment 22 Jan Sarenik 2011-01-26 06:41:26 EST
Oops, the running jobs count is still wrong in the Grid tab
(where the pools are listed) and in Statistics of Overview.
Comment 23 Jan Sarenik 2011-01-26 06:56:31 EST
Can that be a Cumin bug? cumin-0.1.4478-1.el5
If yes, then condor-qmf-7.4.5-0.7 seems to be
fine on all architectures including RHEL4.
Comment 24 Jan Sarenik 2011-01-26 07:13:49 EST
The wrong running jobs count seems to be gone after
some time... I am investigating more now.
Comment 25 Jan Sarenik 2011-01-26 07:23:20 EST
After rough measurement, it takes 5 minutes before the
wrong statistics are gone.

And I am testing with both QMF_UPDATE_INTERVAL and
COLLECTOR_UPDATE_INTERVAL set to 1 (minute, AFAIK),
qpidd's mgmt-pub-interval set to 5 (seconds)
and cumin's page refresh set to 5 seconds as well.
Comment 26 Trevor McKay 2011-01-26 16:01:16 EST
(In reply to comment #25)
> After rough measurement, it takes 5 minutes before the
> wrong statistics are gone.
> 
> And I am testing with both QMF_UPDATE_INTERVAL and
> COLLECTOR_UPDATE_INTERVAL set to 1 (minute, AFAIK),
> qpidd's mgmt-pub-interval set to 5 (seconds)
> and cumin's page refresh set to 5 seconds as well.

I reproduced this behavior using the packages above.  It appears that on a job removal, the QMF object for the Collector will not contain an updated job count for 5 minutes.  Cumin sees update messages on the given interval, and sample data is logged in the database, but the job count does not change if the system is left idle until the 5 minute mark has been passed.

It seems that if a new job is submitted, however, the job count will be corrected shortly thereafter.

This does not seem to be a cumin bug -- the value in the QMF data appears to be incorrect.
Comment 27 Trevor McKay 2011-01-26 16:04:53 EST
> 
> It seems that if a new job is submitted, however, the job count will be
> corrected shortly thereafter.

Forgot to mention: assuming this is true, then the implication is that on a grid with regular job submission this bug probably would go unnoticed.  However, the root cause should be understood.
Comment 28 Matthew Farrellee 2011-01-26 20:37:12 EST
It's not a bug, it's the interval the Schedd uses to publish information about itself, which is then reflected into the QMF object space.

SCHEDD_INTERVAL

http://www.cs.wisc.edu/condor/manual/v7.5/3_3Configuration.html#17874
Comment 29 Trevor McKay 2011-01-27 08:39:25 EST
(In reply to comment #28)
> It's not a bug, it's the interval the Schedd uses to publish information about
> itself, which is then reflected into the QMF object space.
> 
> SCHEDD_INTERVAL
> 
> http://www.cs.wisc.edu/condor/manual/v7.5/3_3Configuration.html#17874

Thanks, that explains the 5 minutes.  But is it by design that a job submission causes the schedd to publish, but a job removal does not?  This is what I'm observing.  Seems inconsistent to me.
Comment 30 Matthew Farrellee 2011-01-27 08:55:39 EST
It's possible. There are a number of things that may prevent the Schedd from sending an update to the collector (and QMF object). That should be a separate BZ.
Comment 31 Jan Sarenik 2011-01-27 16:33:55 EST
Verified on
condor-qmf-7.4.5-0.7.el5
condor-qmf-7.4.5-0.7.el4
both i386 and x86_64,

RHEL4s had QMF_BROKER_HOST set to RHEL5
box with running Qpid, checked with qmfprobe.py 

The new bug which spang off above comments is
Bug 673179
Comment 32 Eva Kopalova 2011-02-09 11:38:41 EST
    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 @@
-Cause: no ref counting of jobs to submissions in job server plug-in
+Schedd QMF left the Submission QMF objects hanging after all of submission jobs finished. This happend due to absence of ref counting of jobs on submissions in the Schedd QMF plug-in. With this update, ref counting as a job is attached to every submission and QMF submission objects are deleted once all their jobs are completed or removed.-Consequences: management console would see submissions but unable to retrieve any job summaries from these 
-Fix: added ref counting as jobs are attached to submissions
-Result: QMF submission objects are "cleaned up" once all their jobs have been completed or removed
Comment 33 errata-xmlrpc 2011-02-15 07:12:47 EST
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/RHBA-2011-0217.html

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