Page MenuHomePhabricator

Solve transferpy concurrency issue with auto port detection and checksum file names
Closed, ResolvedPublic

Description

The transferpy is a package used for database backup and recovery. It has the capability to automatically detect a free port for netcat to listen. If we start two instances of transferpy simultaneously for the same destination machine, there is a possibility that both instances detect the same port as the free port (race condition). This need to be solved.

This ticket also needs to solve the transferpy checksum filename concurrency issue.

Event Timeline

Privacybatm moved this task from Triage to GSOC2020 on the DBA board.

This race condition can be solved/reduced by making a directory (mkdir) in temp as soon as we see a free port.

Change 608274 had a related patch set uploaded (by Privacybatm; owner: Privacybatm):
[operations/software/transferpy@master] Firewall.py: Solve auto port detection concurrency issue

https://gerrit.wikimedia.org/r/c/operations/software/transferpy/ /608274

Change 608274 merged by jenkins-bot:
[operations/software/transferpy@master] Firewall.py: Solve auto port detection concurrency issue

https://gerrit.wikimedia.org/r/608274

The shared checksum path on parallel execution issue should get top priority, as this was already observed problematic when running to independent executions of transfer.py to the same host as target. While they had no issues coordinating which port to use, they were reusing the same file for checksums.

Yeah, I agree with you, I am working in this issue currently. Thank you.

Change 613633 had a related patch set uploaded (by Privacybatm; owner: Privacybatm):
[operations/software/transferpy@master] Transferer.py: Resolve concurrency issue with checksum file names

https://gerrit.wikimedia.org/r/613633

Privacybatm renamed this task from Solve transferpy concurrency issue with auto port detection to Solve transferpy concurrency issue with auto port detection and checksum file names.Jul 17 2020, 1:33 PM
Privacybatm updated the task description. (Show Details)

Change 614686 had a related patch set uploaded (by Privacybatm; owner: Privacybatm):
[operations/software/transferpy@master] Transferer.py: Add proper cleanup

https://gerrit.wikimedia.org/r/614686

Change 613633 merged by jenkins-bot:
[operations/software/transferpy@master] Transferer.py: Resolve concurrency issue with checksum file names

https://gerrit.wikimedia.org/r/613633

Almost ready to be closed- no more known concurrency issues.

Change 614686 merged by jenkins-bot:
[operations/software/transferpy@master] Transferer.py: Add proper cleanup

https://gerrit.wikimedia.org/r/614686

I think we can close this! What do you think?