phase1: provide upload/download locking
This patch offers an optional locking mechanism to ensure that specific
build slaves do not perform concurrent network operations
Each slave definition can feature two additional options:
ul_lock = <lock identifier string>
dl_lock = <lock identifier string>
In the scenario where a group of build slaves share the same physical
network link, these variables can be used as follows:
If the link is full duplex capable, each slave from the target group
would be configured with e.g.:
dl_lock = slavegroup1_dl
ul_lock = slavegroup1_ul
This enables separate locks for uplink and downlink.
If the link is not full duplex capable, then each slave from the target
group would be configured with e.g.:
dl_lock = slavegroup1
ul_lock = slavegroup1
Effectively making uplink and downlink share the same lock
If neither option is set, no lock is enforced and the patch is a no-op.
In this patch the locks are only applied to steps that cause significant
network traffic.
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>