Shared locking in glock.py can't cope with unlink()s
Bug #156795 reported by
Christian Reis
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned | ||
txpkgupload |
Fix Released
|
Low
|
Colin Watson |
Bug Description
We've run into a weird situation between process-upload and poppy (our ftp daemon) in which poppy thinks it has a valid lockfile when in fact it has been unlinked by process-upload. The situation right now is that process-upload removes the lockfile when it finishes running, but poppy doesn't. Our locking code should be robust enough to deal with this situation.
For now we're working around this by not removing lockfiles in both processes. Barry has suggested using mailman's locking code which may cope better with this situation. Alternatives are modifying glock.py to use os.open() supplying O_EXCL, but take into account that we need to cope with stale locks too.
Related branches
lp://staging/~cjwatson/txpkgupload/drop-distro-files
- William Grant (community): Approve (code)
-
Diff: 826 lines (+95/-462)8 files modifiedetc/txpkgupload.yaml (+5/-1)
src/txpkgupload/glock.py (+0/-316)
src/txpkgupload/hooks.py (+23/-106)
src/txpkgupload/plugin.py (+22/-6)
src/txpkgupload/tests/test_plugin.py (+23/-12)
src/txpkgupload/tests/test_twistedsftp.py (+8/-6)
src/txpkgupload/twistedftp.py (+11/-11)
src/txpkgupload/twistedsftp.py (+3/-4)
Changed in launchpad-foundations: | |
assignee: | barry → nobody |
importance: | Undecided → Low |
status: | New → Triaged |
tags: | added: tech-debt |
Changed in txpkgupload: | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in txpkgupload: | |
assignee: | nobody → Colin Watson (cjwatson) |
status: | Triaged → In Progress |
Changed in txpkgupload: | |
status: | In Progress → Fix Committed |
Changed in txpkgupload: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
For reference, Mailman's locking code lives at http:// codebrowse. launchpad. net/~mailman- coders/ mailman/ 3.0/annotate/ barry%40python. org-20071011032 203-w1j8qrmtlpk rvay4?file_ id=mailmanlockf ile.py- 20070507165525- 0o0kligrooe34vy c-172