process-job-source-groups.py will starve itself if run with multiple overlapping schedules

Bug #839659 reported by Gavin Panella
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Colin Watson

Bug Description

For bug 770721 I planned to add a new FREQUENT job source group and
schedule it to run every minute. The current MAIN group is run every 5
minutes. However, process-job-source-groups.py always creates the same
lock file - /var/lock/launchpad-processjobsourcegroups.lock - so every
five minutes there will be a race to the lock.

process-job-source-groups.py could be made to create a lock file named
after the group it is attempting to run. (In which case it ought to be
limited to a single group at a time so it doesn't have to create
multiple lock files too.)

Tags: qa-ok

Related branches

Revision history for this message
Colin Watson (cjwatson) wrote :

Is there any reason this script needs to take a lock at all? All it's doing is looking up bits in config, and then running process-job-source.py for each one - and that script takes its own locks. I can't see how just deleting the locking from process-job-source-groups.py would cause any trouble.

If this approach sounds sensible, then I have a patch, since I'm thinking of adding a new FREQUENT job.

Revision history for this message
Gavin Panella (allenap) wrote :

Sounds good, and I can't see anything in process-job-source-groups.py that would prevent that from working. I'm a bit out of touch with this now, so propose the merge so that someone else can double-check that.

Colin Watson (cjwatson)
Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Colin Watson (cjwatson)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Colin Watson (cjwatson)
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.