Details
Details
This is tricky. You need:
- Hoax blueprint with limits and a rule where leases of a given "flavor" can only be satisfied by resources of the same flavor.
- Reduce the 3-minute "wait before resources can be released" to 3 seconds.
- Limit Hoaxes to 1.
- Allocate one "cherry" flavored Hoax and release the lease.
- Add a sleep(15) to releaseResource() in DrydockResourceUpdateWorker, after the canReclaimResource() check, with a print.
Now:
- Run bin/phd debug task in two windows.
- Run bin/drydock lease --type host --attributes flavor=banana in a third window.
- This will start to reclaim the existing "cherry" resource. Once one of the phd windows prints the "RECLAIMING" message run bin/drydock lease --type host --attributes flavor=cherry in a fourth window.
- Before patch: the "cherry" lease acquired immediately, then was released and destroyed moments later.
- After patch: the "cherry" lease yields.
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable